svc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheSvc added in v1.0.1

type CacheSvc struct {
	*svc.Svc[mdl.Cache]
}

func NewCacheSvc added in v1.0.1

func NewCacheSvc(i *do.Injector) (*CacheSvc, error)

func (*CacheSvc) ListCaches added in v1.0.1

func (s *CacheSvc) ListCaches(typ string, keywords ...string) ([]mdl.Cache, int64, error)

func (*CacheSvc) RemoveCaches added in v1.0.1

func (s *CacheSvc) RemoveCaches(typ string, keys ...string) error

type DeptSvc

type DeptSvc struct {
	*svc.DataSvc[mdl.Dept]
}

func NewDeptSvc

func NewDeptSvc(i *do.Injector) (*DeptSvc, error)

func (*DeptSvc) ListDepts

func (s *DeptSvc) ListDepts(conds map[string]any) ([]mdl.Dept, int64, error)

type DictSvc

type DictSvc struct {
	*svc.DataSvc[mdl.Dict]
}

func NewDictSvc

func NewDictSvc(i *do.Injector) (*DictSvc, error)

type IJob

type IJob interface {
	cron.Job
	GetName() string
	GetDesc() string
	GetCron() string
	GetArg() string
	GetArgDesc() string
	SetArg(arg string)
}

type JobSvc

type JobSvc struct {
	*svc.DataSvc[mdl.Job]
	// contains filtered or unexported fields
}

func NewJobSvc

func NewJobSvc(i *do.Injector) (*JobSvc, error)

func (*JobSvc) AddJobs added in v1.0.2

func (s *JobSvc) AddJobs(jobs ...IJob) error

func (*JobSvc) StartJob

func (s *JobSvc) StartJob(id int64) error

func (*JobSvc) StopJob

func (s *JobSvc) StopJob(id int64) error

type ResourceSvc

type ResourceSvc struct {
	*svc.DataSvc[mdl.Resource]
	// contains filtered or unexported fields
}

func NewResourceSvc

func NewResourceSvc(i *do.Injector) (*ResourceSvc, error)

func (*ResourceSvc) ListMenus

func (s *ResourceSvc) ListMenus(userId string) ([]mdl.Resource, error)

func (*ResourceSvc) ListResources

func (s *ResourceSvc) ListResources(conds map[string]any) ([]mdl.Resource, int64, error)

type RoleSvc

type RoleSvc struct {
	*svc.DataSvc[mdl.Role]
	// contains filtered or unexported fields
}

func NewRoleSvc

func NewRoleSvc(i *do.Injector) (*RoleSvc, error)

func (*RoleSvc) ListRoleResources

func (s *RoleSvc) ListRoleResources(id string) ([]int64, error)

func (*RoleSvc) SaveRoleResources

func (s *RoleSvc) SaveRoleResources(id string, resources []mdl.Resource) error

type ServerSvc

type ServerSvc struct {
}

func NewServerSvc

func NewServerSvc(i *do.Injector) (*ServerSvc, error)

func (*ServerSvc) GetServer

func (s *ServerSvc) GetServer() mdl.Server

type UpgradeSvc

type UpgradeSvc struct {
}

func NewUpgradeSvc

func NewUpgradeSvc(i *do.Injector) (*UpgradeSvc, error)

func (*UpgradeSvc) Upgrade

func (s *UpgradeSvc) Upgrade(ver string) (string, string, error)

type UserSvc

type UserSvc struct {
	*svc.DataSvc[mdl.User]
	Perm      *casbin.SyncedEnforcer
	SignedKey []byte
}

func NewUserSvc

func NewUserSvc(i *do.Injector) (*UserSvc, error)

func (*UserSvc) ListUserRoles

func (s *UserSvc) ListUserRoles(id string) ([]int64, error)

func (*UserSvc) ListUsers

func (s *UserSvc) ListUsers(conds map[string]any) ([]mdl.User, int64, error)

func (*UserSvc) Login

func (s *UserSvc) Login(userName, password string) (*mdl.User, error)

func (*UserSvc) RemoveUsers

func (s *UserSvc) RemoveUsers(ids []string) error

func (*UserSvc) SaveUser

func (s *UserSvc) SaveUser(user mdl.User) error

func (*UserSvc) SaveUserRoles

func (s *UserSvc) SaveUserRoles(id string, roles []int64) error

type VisitSvc

type VisitSvc struct {
	*svc.DataSvc[mdl.Visit]
}

func NewVisitSvc

func NewVisitSvc(i *do.Injector) (*VisitSvc, error)

Jump to

Keyboard shortcuts

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