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: 10 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 {
	// 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) AddEvent

func (s *Service) AddEvent(c context.Context, f *model.Event) (err error)

AddEvent add event

func (*Service) AddFactor

func (s *Service) AddFactor(c context.Context, f *model.Factor) (err error)

AddFactor add factor

func (*Service) AddGroup

func (s *Service) AddGroup(c context.Context, f *model.FactorGroup) (err error)

AddGroup add group

func (*Service) AddLog

func (s *Service) AddLog(c context.Context, name string, m int8, v interface{}) (err error)

AddLog add log.

func (*Service) AddLog2

func (s *Service) AddLog2(c context.Context, l *model.Log) (err error)

AddLog2 add log.

func (*Service) AddRemarkLog

func (s *Service) AddRemarkLog(refID int64, remark string) (log string)

AddRemarkLog add reamrk log.

func (*Service) AddService

func (s *Service) AddService(c context.Context, f *model.Service) (err error)

AddService add service

func (*Service) ClearCount

func (s *Service) ClearCount(c context.Context, mid int64, operator string) (err error)

ClearCount clear count.

func (*Service) Close

func (s *Service) Close()

Close close all dao.

func (*Service) DeleteStat

func (s *Service) DeleteStat(c context.Context, isdel int8, id int64, operater string) (err error)

DeleteStat delete stat.

func (*Service) DeleteStatLog

func (s *Service) DeleteStatLog(refID int64) (log string)

DeleteStatLog delete log .

func (*Service) Factors

func (s *Service) Factors(c context.Context) (fs []*model.Factors, err error)

Factors get all factor.

func (*Service) HisoryPage

func (s *Service) HisoryPage(c context.Context, h *model.HisParamReq) (page *model.HistoryPage, err error)

HisoryPage history page.

func (*Service) LogList

func (s *Service) LogList(c context.Context, refID int64, module int8) (list []*model.Log, err error)

LogList add log.

func (*Service) Ping

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

Ping check dao health.

func (*Service) RefreshBase

func (s *Service) RefreshBase(c context.Context, mid int64, operator string) (err error)

Refresh reset user base score.

func (*Service) ReportList

func (s *Service) ReportList(c context.Context, ps, pn int) (page *model.ReportPage, err error)

ReportList report list.

func (*Service) ResetBase

func (s *Service) ResetBase(c context.Context, mid int64, operator string) (err error)

ResetBase reset user base score.

func (*Service) ResetEvent

func (s *Service) ResetEvent(c context.Context, mid int64, operator string) (err error)

ResetEvent reset user event score.

func (*Service) SettingList

func (s *Service) SettingList(c context.Context) (list []*model.Setting, err error)

SettingList get all setting

func (*Service) StatPage

func (s *Service) StatPage(c context.Context, mid, id int64, t int8, pn, ps int) (page *model.StatPage, err error)

StatPage get stat list.

func (*Service) UpdateEventName

func (s *Service) UpdateEventName(c context.Context, event *model.Event) (err error)

UpdateEventName update event name.

func (*Service) UpdateFactor

func (s *Service) UpdateFactor(c context.Context, fs []*model.Factor, name string) (err error)

UpdateFactor update factor.

func (*Service) UpdateSetting

func (s *Service) UpdateSetting(c context.Context, name string, property string, val string) (err error)

UpdateSetting update setting

func (*Service) UpdateStatCountLog

func (s *Service) UpdateStatCountLog(refID int64, old int64, new int64) (log string)

UpdateStatCountLog update stat count log.

func (*Service) UpdateStatQuantity

func (s *Service) UpdateStatQuantity(c context.Context, count, id int64, operater string) (err error)

UpdateStatQuantity update stat quantity.

func (*Service) UpdateState

func (s *Service) UpdateState(c context.Context, state int8, id int64, operater string) (err error)

UpdateState update spy state.

func (*Service) UpdateStateLog

func (s *Service) UpdateStateLog(refID int64, state string) (log string)

UpdateStateLog get log.

func (*Service) UserInfo

func (s *Service) UserInfo(c context.Context, mid int64) (u *model.UserInfoDto, err error)

UserInfo get UserInfo by mid , from cache or db or generate.

func (*Service) Wait

func (s *Service) Wait()

Wait wait all closed.

Jump to

Keyboard shortcuts

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