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: 19 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 service struct info.

func New

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

New service.

func (*Service) Auth

func (s *Service) Auth(c context.Context, system string) (res []*model.Auth)

Auth get auth.

func (*Service) AuthRelation

func (s *Service) AuthRelation(c context.Context, roleID, authID int64, state int) (err error)

AuthRelation get auth relation.

func (*Service) Close

func (s *Service) Close()

Close dao

func (*Service) Dashborad

func (s *Service) Dashborad(c context.Context, d *publish.Dashboard) (err error)

Dashborad insert dashboard info and logs.

func (*Service) DelAuth

func (s *Service) DelAuth(c context.Context, authID int64) (err error)

DelAuth del auth.

func (*Service) DelRole

func (s *Service) DelRole(c context.Context, roleID int64) (err error)

DelRole del role.

func (*Service) DelUser

func (s *Service) DelUser(c context.Context, userID int64) (err error)

DelUser del user.

func (*Service) DiffPutOss

func (s *Service) DiffPutOss(c context.Context, f io.Reader, filename string) (uri string, err error)

DiffPutOss upload diff to oss

func (*Service) GetAuths

func (s *Service) GetAuths(c context.Context, name string) (res map[string]map[string]*model.Auth, err error)

GetAuths get auths.

func (*Service) PackageList

func (s *Service) PackageList(path string) (fileList []string, err error)

PackageList list the Package Files

func (*Service) PackageUpload

func (s *Service) PackageUpload(file multipart.File, pkgInfo upload.PkgInfo) (err error)

PackageUpload upload package zip file & unzip it

func (*Service) Ping

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

Ping dao

func (*Service) Role

func (s *Service) Role(c context.Context, system string) (res []*model.Role)

Role get role.

func (*Service) SaveAuth

func (s *Service) SaveAuth(c context.Context, authID int64, system, authName, authFlag string) (err error)

SaveAuth save auth.

func (*Service) SaveRole

func (s *Service) SaveRole(c context.Context, roleID int64, system, roleName string) (err error)

SaveRole save role.

func (*Service) SaveUser

func (s *Service) SaveUser(c context.Context, roleID, userID int64, system, userName string) (err error)

SaveUser save user.

func (*Service) SendMail

func (s *Service) SendMail(c context.Context, m *mail.Mail, attach *mail.Attach) (err error)

SendMail send mail

func (*Service) User

func (s *Service) User(c context.Context, system string) (res []*model.User)

User get user.

Jump to

Keyboard shortcuts

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