service

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	DB *gorm.DB
	// contains filtered or unexported fields
}

Service biz service def.

func New

func New(c *conf.Config) (s *Service)

New new a Service and return.

func (*Service) AddActSubject

func (s *Service) AddActSubject(c context.Context, params *model.AddList) (res int64, err error)

AddActSubject .

func (*Service) AddLike

func (s *Service) AddLike(c context.Context, args *model.AddLikes) (likesRes *model.Like, err error)

AddLike .

func (*Service) AddPicContent

func (s *Service) AddPicContent(c context.Context, args *model.AddPic) (likeID int64, err error)

AddPicContent .

func (*Service) Archives

func (s *Service) Archives(c context.Context, p *lmdl.ArchiveParam) (res map[int64]*arcmdl.Arc, err error)

Archives get achives info .

func (*Service) BatchLikes

func (s *Service) BatchLikes(c context.Context, args *model.BatchLike) (err error)

BatchLikes .

func (*Service) Close

func (s *Service) Close()

Close close all dao.

func (*Service) GetArticleMetas

func (s *Service) GetArticleMetas(c context.Context, aids []int64) (res map[int64]*articlemodel.Meta, err error)

GetArticleMetas from rpc .

func (*Service) GetContent

func (s *Service) GetContent(c context.Context, likeSubType int, likes map[int64]*model.Like, ids []int64, wids []int64, mids []int64) (err error)

GetContent get act_subjet extensions .

func (*Service) ItemAdd

func (s *Service) ItemAdd(c context.Context, args *model.AddLikes) (likeList *model.Like, err error)

ItemAdd .

func (*Service) ItemUp

func (s *Service) ItemUp(c context.Context, sid, wid int64, state int) (likeList *model.Like, err error)

ItemUp .

func (*Service) Likes

func (s *Service) Likes(c context.Context, Sid int64, lids []int64) (likeList map[int64]*model.Like, err error)

Likes .

func (*Service) LikesList

func (s *Service) LikesList(c context.Context, arg *model.LikesParam) (outRes *model.LikesRes, err error)

LikesList .

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping check dao health.

func (*Service) SubProtocol

func (s *Service) SubProtocol(c context.Context, sid int64) (res *model.ActSubjectProtocol, err error)

SubProtocol .

func (*Service) SubjectList

func (s *Service) SubjectList(c context.Context, listParams *model.ListSub) (listRes *model.SubListRes, err error)

SubjectList get subject list .

func (*Service) TimeConf

func (s *Service) TimeConf(c context.Context, sid int64) (res *model.ActTimeConfig, err error)

TimeConf .

func (*Service) UpActSubject

func (s *Service) UpActSubject(c context.Context, params *model.AddList, sid int64) (res int64, err error)

UpActSubject .

func (*Service) UpLike

func (s *Service) UpLike(c context.Context, args *model.UpLike, username string) (res int64, err error)

UpLike .

func (*Service) UpLikesState

func (s *Service) UpLikesState(c context.Context, IDs []int64, state int, reply string, username string) (err error)

UpLikesState .

func (*Service) UpWid

func (s *Service) UpWid(c context.Context, args *model.UpWid) (err error)

UpWid .

func (*Service) VideoAdd

func (s *Service) VideoAdd(c context.Context, args *model.AddLikes) (likeList *model.Like, err error)

VideoAdd .

func (*Service) VideoList

func (s *Service) VideoList(c context.Context) (res []*model.ActSubjectResult, err error)

VideoList .

func (*Service) Wait

func (s *Service) Wait()

Wait wait all closed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL