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: 18 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) AddAssociation

func (s *Service) AddAssociation(c context.Context, arg *model.Association) (err error)

AddAssociation .

func (*Service) AddBusiness

func (s *Service) AddBusiness(c context.Context, b *model.Business) (err error)

AddBusiness .

func (*Service) AddCateSecExt

func (s *Service) AddCateSecExt(c context.Context, arg *model.CateSecExt) (err error)

AddCateSecExt .

func (*Service) AddControl

func (s *Service) AddControl(c context.Context, tc *model.TagControl) (err error)

AddControl .

func (*Service) AddRankGroup

func (s *Service) AddRankGroup(c context.Context, g *model.RankGroup, auths []int64) (id int64, err error)

AddRankGroup adds rank group.

func (*Service) AddRankUser

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

AddRankUser adds rank user.

func (*Service) AddReason

func (s *Service) AddReason(c context.Context, arg *model.Reason) (err error)

AddReason .

func (*Service) AddRole

func (s *Service) AddRole(c context.Context, br *model.BusinessRole) (err error)

AddRole .

func (*Service) AddTag

func (s *Service) AddTag(c context.Context, t *model.Tag) (err error)

AddTag .

func (*Service) AddType

func (s *Service) AddType(c context.Context, tt *model.TagType) (err error)

AddType .

func (*Service) AddUser

func (s *Service) AddUser(c context.Context, bur *model.BusinessUserRole) (err error)

AddUser .

func (*Service) AllRoles

func (s *Service) AllRoles(c context.Context, pid, uid int64) (res []*model.UserRole, err error)

AllRoles .

func (*Service) AssociationList

func (s *Service) AssociationList(c context.Context, e *model.Association) (res []*model.Association, err error)

AssociationList .

func (*Service) AttrList

func (s *Service) AttrList(c context.Context, tba *model.TagBusinessAttr) (res *model.TagBusinessAttr, err error)

AttrList .

func (*Service) AttrUpdate

func (s *Service) AttrUpdate(c context.Context, tba *model.TagBusinessAttr) (err error)

AttrUpdate .

func (*Service) Auth

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

Auth return user's auth infomation.

func (*Service) BanAssociation

func (s *Service) BanAssociation(c context.Context, arg *model.Association) (err error)

BanAssociation .

func (*Service) BanCateSecExt

func (s *Service) BanCateSecExt(c context.Context, arg *model.CateSecExt) (err error)

BanCateSecExt .

func (*Service) BatchUpdateReasonState

func (s *Service) BatchUpdateReasonState(c context.Context, b *model.BatchUpdateReasonState) (err error)

BatchUpdateReasonState .

func (*Service) BatchUpdateState

func (s *Service) BatchUpdateState(c context.Context, b *model.BatchUpdateState) (err error)

BatchUpdateState .

func (*Service) BusinessAttr

func (s *Service) BusinessAttr(c context.Context, b *model.BusinessAttr) (res map[string]bool, err error)

BusinessAttr .

func (*Service) BusinessList

func (s *Service) BusinessList(c context.Context, bp *model.BusinessListParams) (res []*model.BusinessList, err error)

BusinessList .

func (*Service) CateSecExtList

func (s *Service) CateSecExtList(c context.Context, e *model.CateSecExt) (res []*model.CateSecExt, err error)

CateSecExtList .

func (*Service) Close

func (s *Service) Close()

Close close all dao.

func (*Service) DelRankGroup

func (s *Service) DelRankGroup(c context.Context, id int64) (err error)

DelRankGroup deletes rank group...

func (*Service) DelRankUser

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

DelRankUser deletes user.

func (*Service) DeleteType

func (s *Service) DeleteType(c context.Context, td *model.TagTypeDel) (err error)

DeleteType .

func (*Service) DeleteUser

func (s *Service) DeleteUser(c context.Context, bur *model.BusinessUserRole) (err error)

DeleteUser .

func (*Service) Departments

func (s *Service) Departments(c *bm.Context) (res []*model.DepartCustom, err error)

Departments .

func (*Service) DropDownList

func (s *Service) DropDownList(c context.Context, e *model.Association) (res []*model.DropList, err error)

DropDownList .

func (*Service) FlowList

func (s *Service) FlowList(c context.Context, bp *model.BusinessListParams) (res []*model.BusinessList, err error)

FlowList .

func (*Service) Heartbeat

func (s *Service) Heartbeat(c context.Context, username string) (err error)

Heartbeat user activity record

func (*Service) IsAdmin

func (s *Service) IsAdmin(c context.Context, bid, uid int64) bool

IsAdmin .

func (*Service) Login

func (s *Service) Login(ctx context.Context, mngsid, dsbsid string) (sid, uname string, err error)

Login .

func (*Service) Permissions

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

Permissions return user's permissions.

func (*Service) Ping

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

Ping check dao health.

func (*Service) RankGroup

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

RankGroup gets rank group info.

func (*Service) RankGroups

func (s *Service) RankGroups(c context.Context, pn, ps int) (res []*model.RankGroup, total int, err error)

RankGroups gets archive groups.

func (*Service) RankUsers

func (s *Service) RankUsers(c context.Context, pn, ps int, username string) (res []*model.RankUserScores, total int, err error)

RankUsers gets rank user list.

func (*Service) ReasonList

func (s *Service) ReasonList(c context.Context, e *model.SearchReasonParams) (res []*model.Reason, total int64, err error)

ReasonList .

func (*Service) RoleList

func (s *Service) RoleList(c context.Context, br *model.BusinessRole) (res []*model.BusinessRole, err error)

RoleList .

func (*Service) Roles

func (s *Service) Roles(c *bm.Context) (res []*model.RoleCustom, err error)

Roles .

func (*Service) SaveRankUser

func (s *Service) SaveRankUser(c context.Context, uid int64, ranks map[int64]int) (err error)

SaveRankUser saves user group's rank.

func (*Service) SearchLogAction

func (s *Service) SearchLogAction(c *bm.Context) (result []byte, err error)

SearchLogAction .

func (*Service) SearchLogAudit

func (s *Service) SearchLogAudit(c *bm.Context) (result []byte, err error)

SearchLogAudit .

func (*Service) StateUp

func (s *Service) StateUp(c context.Context, p *model.UserStateUp) (err error)

StateUp .

func (*Service) TagControl

func (s *Service) TagControl(c context.Context, tc *model.TagControlParam) (res []*model.TagControl, err error)

TagControl .

func (*Service) TagList

func (s *Service) TagList(c context.Context, t *model.SearchTagParams) (res []*model.Tag, total int64, err error)

TagList .

func (*Service) TypeList

func (s *Service) TypeList(c context.Context, tt *model.TagTypeList) (res []*model.TagType, err error)

TypeList .

func (*Service) UIds

func (s *Service) UIds(c context.Context, unames []string) (res map[string]int64)

UIds treats the param "unames" and give back the uids data

func (*Service) Udepts

func (s *Service) Udepts(c context.Context, uids []int64) (res map[int64]string)

Udepts treats the param "uids" and give back the users' department data

func (*Service) Unames

func (s *Service) Unames(c context.Context, uids []int64) (res map[int64]string)

Unames treats the param "uids" and give back the unames data

func (*Service) UpdateAssociation

func (s *Service) UpdateAssociation(c context.Context, arg *model.Association) (err error)

UpdateAssociation .

func (*Service) UpdateBusiness

func (s *Service) UpdateBusiness(c context.Context, b *model.Business) (err error)

UpdateBusiness .

func (*Service) UpdateCateSecExt

func (s *Service) UpdateCateSecExt(c context.Context, arg *model.CateSecExt) (err error)

UpdateCateSecExt .

func (*Service) UpdateControl

func (s *Service) UpdateControl(c context.Context, tc *model.TagControl) (err error)

UpdateControl .

func (*Service) UpdateRankGroup

func (s *Service) UpdateRankGroup(c context.Context, g *model.RankGroup, auths []int64) (err error)

UpdateRankGroup udpates rank group.

func (*Service) UpdateReason

func (s *Service) UpdateReason(c context.Context, arg *model.Reason) (err error)

UpdateReason .

func (*Service) UpdateRole

func (s *Service) UpdateRole(c context.Context, br *model.BusinessRole) (err error)

UpdateRole .

func (*Service) UpdateState

func (s *Service) UpdateState(c context.Context, su *model.StateUpdate) (err error)

UpdateState .

func (*Service) UpdateTag

func (s *Service) UpdateTag(c context.Context, t *model.Tag) (err error)

UpdateTag .

func (*Service) UpdateType

func (s *Service) UpdateType(c context.Context, tt *model.TagType) (err error)

UpdateType .

func (*Service) UpdateUser

func (s *Service) UpdateUser(c context.Context, bur *model.BusinessUserRole) (err error)

UpdateUser .

func (*Service) UserList

func (s *Service) UserList(c context.Context, u *model.UserListParams) (res []*model.BusinessUserRoleList, total int64, err error)

UserList .

func (*Service) UserRole

func (s *Service) UserRole(c context.Context, brl *model.BusinessUserRoleList) (res []*model.UserRole, err error)

UserRole .

func (*Service) UserRoles

func (s *Service) UserRoles(c context.Context, uid int64) (res []*model.UserRole, err error)

UserRoles .

func (*Service) Users

func (s *Service) Users(c context.Context, pn, ps int) (res *model.UserPager, err error)

Users get user list.

func (*Service) UsersByDepartment

func (s *Service) UsersByDepartment(c *bm.Context, ID int64) (res []*model.UserCustom, err error)

UsersByDepartment .

func (*Service) UsersByRole

func (s *Service) UsersByRole(c *bm.Context, ID int64) (res []*model.UserCustom, err error)

UsersByRole .

func (*Service) UsersTotal

func (s *Service) UsersTotal(c context.Context) (total int64, err error)

UsersTotal get user total

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