manage_service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LoginCacheLimit 缓存 数量
	LoginCacheLimit int = 0
	// LoginCacheTtl 缓存 过期时间 2 小时
	LoginCacheTtl int64 = 1000 * 60 * 60 * 2
)

Functions

This section is empty.

Types

type LoginCache

type LoginCache struct {
	*framework.Cache[*module_manage.LoginInfo]
}

func NewLoginCache

func NewLoginCache() *LoginCache

func (*LoginCache) Add

func (this_ *LoginCache) Add(data *module_manage.LoginInfo)

func (*LoginCache) Get

func (this_ *LoginCache) Get(token string) (res *module_manage.LoginInfo)

func (*LoginCache) GetIfPresent

func (this_ *LoginCache) GetIfPresent(token string) (res *module_manage.LoginInfo)

type ManageId

type ManageId struct {
}

func NewManageId

func NewManageId() *ManageId

func (*ManageId) GenLogId

func (this_ *ManageId) GenLogId() (res int64)

func (*ManageId) GenLoginId

func (this_ *ManageId) GenLoginId() (res int64)

func (*ManageId) GenRoleId

func (this_ *ManageId) GenRoleId() (res int64)

func (*ManageId) GenUserId

func (this_ *ManageId) GenUserId() (res int64)

type ManageInitialize

type ManageInitialize struct {
}

func NewManageInitialize

func NewManageInitialize() *ManageInitialize

func (*ManageInitialize) InitManageUser

func (this_ *ManageInitialize) InitManageUser(name string, account string) (userId int64, err error)

func (*ManageInitialize) InitSuperRole

func (this_ *ManageInitialize) InitSuperRole(name string) (roleId int64, err error)

type ManageLoginService

type ManageLoginService struct {
	// contains filtered or unexported fields
}

func NewManageLoginService

func NewManageLoginService(manageLoginStorage module_manage.IManageLoginStorage) *ManageLoginService

func (*ManageLoginService) Add

func (this_ *ManageLoginService) Add(in *module_manage.ManageLogin) (err error)

func (*ManageLoginService) Delete

func (*ManageLoginService) Page

type ManageRoleService

type ManageRoleService struct {
	// contains filtered or unexported fields
}

func NewManageRoleService

func NewManageRoleService(manageRoleStorage module_manage.IManageRoleStorage, manageRoleUserStorage module_manage.IManageRoleUserStorage, manageRolePermissionStorage module_manage.IManageRolePermissionStorage) *ManageRoleService

func (*ManageRoleService) Add

func (*ManageRoleService) AddRoleUser

func (this_ *ManageRoleService) AddRoleUser(roleId int64, userId int64) (err error)

func (*ManageRoleService) AddRoleUsers

func (this_ *ManageRoleService) AddRoleUsers(roleId int64, userIds []int64) (err error)

func (*ManageRoleService) Delete

func (this_ *ManageRoleService) Delete(roleIds []int64) (err error)

func (*ManageRoleService) GetUserRoles

func (this_ *ManageRoleService) GetUserRoles(userId int64) (res []*module_manage.ManageRole, err error)

type ManageService

type ManageService struct {
}

func NewManageService

func NewManageService() *ManageService

func (*ManageService) EncodePassword

func (this_ *ManageService) EncodePassword(salt string, password string) (res string)

func (*ManageService) GetSecurityCode

func (*ManageService) LoadLogin

func (this_ *ManageService) LoadLogin(token string) (res *module_manage.LoginResponse, err error)

func (*ManageService) Login

func (*ManageService) Logout

func (this_ *ManageService) Logout(token string) (err error)

func (*ManageService) Session

func (this_ *ManageService) Session(token string) (res *module_manage.LoginResponse, err error)

type ManageUserService

type ManageUserService struct {
	// contains filtered or unexported fields
}

func NewManageUserService

func NewManageUserService(manageUserStorage module_manage.IManageUserStorage) *ManageUserService

func (*ManageUserService) A

func (this_ *ManageUserService) A(token string) (err error)

func (*ManageUserService) Aaa

func (this_ *ManageUserService) Aaa() (err error)

func (*ManageUserService) Add

func (*ManageUserService) B

func (this_ *ManageUserService) B() (err error)

func (*ManageUserService) C

func (this_ *ManageUserService) C() (err error)

func (*ManageUserService) Delete

func (*ManageUserService) Xxx

Jump to

Keyboard shortcuts

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