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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPv4toN

func IPv4toN(ip net.IP) (sum uint32)

IPv4toN is

Types

type Service

type Service struct {
	Managers map[int64]string
	// contains filtered or unexported fields
}

Service struct of service.

func New

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

New create service instance and return.

func (*Service) AddMedal

func (s *Service) AddMedal(c context.Context, np *model.Medal) (err error)

AddMedal add medal .

func (*Service) AddPendantGroup

func (s *Service) AddPendantGroup(c context.Context, arg *model.ArgPendantGroup) (err error)

AddPendantGroup update pendant group.

func (*Service) AddPendantInfo

func (s *Service) AddPendantInfo(c context.Context, arg *model.ArgPendantInfo) (err error)

AddPendantInfo add pendantInfo .

func (*Service) BatchAdd

func (s *Service) BatchAdd(c context.Context, nid int64, f multipart.File, h *multipart.FileHeader) (msg string, err error)

BatchAdd medal bacth add.

func (*Service) Close

func (s *Service) Close()

Close dao.

func (*Service) EquipPendant

func (s *Service) EquipPendant(c context.Context, uid, pid int64) (err error)

EquipPendant equip pendant.

func (*Service) Generate

func (s *Service) Generate(c context.Context, mid, num, expireDay int64) (res []*model.RichInvite, err error)

Generate generate invite codes in batch.

func (*Service) List

func (s *Service) List(c context.Context, mid, start, end int64) (res []*model.RichInvite, err error)

List list one's invite codes range time start and end.

func (*Service) Medal

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

Medal medal .

func (*Service) MedalGroup

func (s *Service) MedalGroup(c context.Context) (res map[int64]*model.MedalGroup, err error)

MedalGroup medal group .

func (*Service) MedalGroupAdd

func (s *Service) MedalGroupAdd(c context.Context, ng *model.MedalGroup) (err error)

MedalGroupAdd add medal group.

func (*Service) MedalGroupByGid

func (s *Service) MedalGroupByGid(c context.Context, id int64) (ng *model.MedalGroup, err error)

MedalGroupByGid nameplate by gid .

func (*Service) MedalGroupInfo

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

MedalGroupInfo medal group all info include parent group name .

func (*Service) MedalGroupParent

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

MedalGroupParent medal group all info include parent group name .

func (*Service) MedalGroupUp

func (s *Service) MedalGroupUp(c context.Context, id int64, ng *model.MedalGroup) (err error)

MedalGroupUp update medal group.

func (*Service) MedalOperlog

func (s *Service) MedalOperlog(c context.Context, mid int64, pn, ps int) (opers []*model.MedalOperLog, pager *model.Pager, err error)

MedalOperlog medal operactlog .

func (*Service) MedalOwner

func (s *Service) MedalOwner(c context.Context, mid int64) (no []*model.MedalMemberMID, err error)

MedalOwner medal onwer .

func (*Service) MedalOwnerAdd

func (s *Service) MedalOwnerAdd(c context.Context, mid, nid int64, title, msg string, oid int64) (err error)

MedalOwnerAdd medal owner add .

func (*Service) MedalOwnerAddList

func (s *Service) MedalOwnerAddList(c context.Context, mid int64) (res []*model.MedalMemberAddList, err error)

MedalOwnerAddList .

func (*Service) MedalOwnerDel

func (s *Service) MedalOwnerDel(c context.Context, mid, nid int64, isDel int8, title, msg string) (err error)

MedalOwnerDel update medal owner is_del .

func (*Service) MedalOwnerUpActivated

func (s *Service) MedalOwnerUpActivated(c context.Context, mid, nid int64) (err error)

MedalOwnerUpActivated update medal owner is_activated.

func (*Service) MedalView

func (s *Service) MedalView(c context.Context, id int64) (res *model.MedalInfo, err error)

MedalView .

func (*Service) MutliSendPendant

func (s *Service) MutliSendPendant(c context.Context, uids []int64, pid int64, day int64, msg *model.SysMsg, oid int64) (err error)

MutliSendPendant mutli send pendant.

func (*Service) PendantGroupAll

func (s *Service) PendantGroupAll(c context.Context) (pgs []*model.PendantGroup, err error)

PendantGroupAll all groups.

func (*Service) PendantGroupID

func (s *Service) PendantGroupID(c context.Context, gid int64) (pg *model.PendantGroup, err error)

PendantGroupID pendant group by ID.

func (*Service) PendantGroupList

func (s *Service) PendantGroupList(c context.Context, arg *model.ArgPendantGroupList) (pgs []*model.PendantGroup, pager *model.Pager, err error)

PendantGroupList group page.

func (*Service) PendantInfoAllNoPage

func (s *Service) PendantInfoAllNoPage(c context.Context) (pis []*model.PendantInfo, err error)

PendantInfoAllNoPage all info on no page.

func (*Service) PendantInfoID

func (s *Service) PendantInfoID(c context.Context, pid, gid int64) (pi *model.PendantInfo, err error)

PendantInfoID pendant info by pid and gid.

func (*Service) PendantInfoList

func (s *Service) PendantInfoList(c context.Context, arg *model.ArgPendantGroupList) (pis []*model.PendantInfo, pager *model.Pager, err error)

PendantInfoList pendant list by group rank.

func (*Service) PendantOperlog

func (s *Service) PendantOperlog(c context.Context, pn, ps int) (opers []*model.PendantOperLog, pager *model.Pager, err error)

PendantOperlog pendant operactlog .

func (*Service) PendantOrders

func (s *Service) PendantOrders(c context.Context, arg *model.ArgPendantOrder) (pos []*model.PendantOrder, pager *model.Pager, err error)

PendantOrders get pendant order historys.

func (*Service) PendantPKG

func (s *Service) PendantPKG(c context.Context, uid int64) (pkgs []*model.PendantPKG, equip *model.PendantPKG, err error)

PendantPKG get pendant in pkg.

func (*Service) Ping

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

Ping check server ok.

func (*Service) ReadCsv

func (s *Service) ReadCsv(f multipart.File, h *multipart.FileHeader) (rs [][]string, err error)

ReadCsv read csv file

func (*Service) UpMedal

func (s *Service) UpMedal(c context.Context, id int64, np *model.Medal) (err error)

UpMedal update medal .

func (*Service) UpPendantGroup

func (s *Service) UpPendantGroup(c context.Context, arg *model.ArgPendantGroup) (err error)

UpPendantGroup update pendant group.

func (*Service) UpPendantGroupStatus

func (s *Service) UpPendantGroupStatus(c context.Context, gid int64, status int8) (err error)

UpPendantGroupStatus update pendant group status

func (*Service) UpPendantInfo

func (s *Service) UpPendantInfo(c context.Context, arg *model.ArgPendantInfo) (err error)

UpPendantInfo update pendant info .

func (*Service) UpPendantInfoStatus

func (s *Service) UpPendantInfoStatus(c context.Context, pid int64, status int8) (err error)

UpPendantInfoStatus update pendant info status

func (*Service) UpPendantPKG

func (s *Service) UpPendantPKG(c context.Context, uid, pid int64, day int64, msg *model.SysMsg, oid int64) (err error)

UpPendantPKG update user pkg.

func (*Service) Upload

func (s *Service) Upload(c context.Context, fileName, fileType string, expire int64, body io.Reader) (location string, err error)

Upload http upload file.

func (*Service) UserPKGDetails

func (s *Service) UserPKGDetails(c context.Context, uid, pid int64) (pkg *model.PendantPKG, err error)

UserPKGDetails get user pkg 's pendant details.

Jump to

Keyboard shortcuts

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