sys

package
v0.0.0-...-10cedd8 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthority

func NewAuthority(factory dao.ShareDaoFactory) *authority

func NewMenuService

func NewMenuService(factory dao.ShareDaoFactory) *menuService

func NewOperationService

func NewOperationService(factory dao.ShareDaoFactory) *operationService

func NewUserService

func NewUserService(factory dao.ShareDaoFactory) *userService

Types

type APIService

type APIService interface {
	GetApiList(ctx context.Context) ([]model.SysApi, error)
}

func NewApiService

func NewApiService(factory dao.ShareDaoFactory) APIService

type APIServiceGetter

type APIServiceGetter interface {
	Api() APIService
}

type Authority

type Authority interface {
	SetMenuAuthority(ctx context.Context, auth *model.SysAuthority) error
	GetAuthorityList(ctx context.Context, pageInfo dto.PageInfo) (*dto.AuthorityList, error)
}

type AuthorityGetter

type AuthorityGetter interface {
	Authority() Authority
}

type CasbinService

type CasbinService interface {
	UpdateCasbin(AuthorityID uint, casbinInfos []dto.CasbinInfo) error
	UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error
	GetPolicyPathByAuthorityId(AuthorityID uint) (pathMaps []dto.CasbinInfo)
	Casbin() *casbin.CachedEnforcer
}

func NewCasbinService

func NewCasbinService(factory dao.ShareDaoFactory) CasbinService

type CasbinServiceGetter

type CasbinServiceGetter interface {
	CasbinService() CasbinService
}
type MenuGetter interface {
	Menu() MenuService
}
type MenuService interface {
	GetMenuByAuthorityID(ctx context.Context, authorityId uint) ([]model.SysMenu, error)
	GetBassMenu(ctx context.Context) ([]model.SysBaseMenu, error)
	AddBaseMenu(ctx context.Context, in *dto.AddSysMenusInput) error
	AddMenuAuthority(ctx context.Context, menus []model.SysBaseMenu, authorityId uint) error
}

type OperationService

type OperationService interface {
	CreateOperationRecord(ctx *gin.Context, record *model.SysOperationRecord) error
	DeleteRecord(ctx *gin.Context, id int) error
	DeleteRecords(ctx *gin.Context, ids []int) error
	GetPageList(ctx *gin.Context, in *dto.OperationListInput) (*dto.OperationListOutPut, error)
}

type OperationServiceGetter

type OperationServiceGetter interface {
	Operation() OperationService
}

type UserService

type UserService interface {
	Login(ctx *gin.Context, userInfo *dto.AdminLoginInput) (string, error)
	LoginOut(ctx *gin.Context, uid int) error
	GetUserInfo(ctx *gin.Context, uid int, aid uint) (*dto.UserInfoOut, error)
	SetUserAuth(ctx *gin.Context, uid int, aid uint) error
	DeleteUser(ctx *gin.Context, uid int) error
	ChangePassword(ctx *gin.Context, uid int, info *dto.ChangeUserPwdInput) error
	ResetPassword(ctx *gin.Context, uid int) error
}

type UserServiceGetter

type UserServiceGetter interface {
	User() UserService
}

Jump to

Keyboard shortcuts

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