service

package
v0.0.0-...-1246224 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 12 Imported by: 0

README

Service

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRoleExistence = errors.New("存在相同角色id")
View Source
var ProviderSet = wire.NewSet(NewService)

ProviderSet is service providers.

Functions

This section is empty.

Types

type AuthorityService

type AuthorityService struct {
	*Service
}

func NewAuthorityService

func NewAuthorityService(service *Service) *AuthorityService

func (*AuthorityService) CreateAuthority

func (svc *AuthorityService) CreateAuthority(auth data.SysAuthority) (authority data.SysAuthority, err error)

func (*AuthorityService) DeleteAuthority

func (svc *AuthorityService) DeleteAuthority(auth *data.SysAuthority) error

func (*AuthorityService) GetAuthorityInfo

func (svc *AuthorityService) GetAuthorityInfo(auth data.SysAuthority) (sa data.SysAuthority, err error)

func (*AuthorityService) GetAuthorityInfoList

func (svc *AuthorityService) GetAuthorityInfoList(info rhttp.PageInfo) (list interface{}, total int64, err error)

func (*AuthorityService) SetDataAuthority

func (svc *AuthorityService) SetDataAuthority(auth data.SysAuthority) error

func (*AuthorityService) UpdateAuthority

func (svc *AuthorityService) UpdateAuthority(auth data.SysAuthority) (authority data.SysAuthority, err error)

type CasbinService

type CasbinService struct {
	*Service
}

func NewCasbinService

func NewCasbinService(service *Service) *CasbinService

func (*CasbinService) AddPolicies

func (svc *CasbinService) AddPolicies(rules [][]string) error

func (*CasbinService) Casbin

func (svc *CasbinService) Casbin() *casbin.SyncedCachedEnforcer

func (*CasbinService) ClearCasbin

func (svc *CasbinService) ClearCasbin(v int, p ...string) bool

func (*CasbinService) FreshCasbin

func (svc *CasbinService) FreshCasbin() (err error)

func (*CasbinService) GetPolicyPathByAuthorityId

func (svc *CasbinService) GetPolicyPathByAuthorityId(AuthorityID uint) (pathMaps []dto.CasbinInfo)

func (*CasbinService) RemoveFilteredPolicy

func (svc *CasbinService) RemoveFilteredPolicy(authorityId string) error

func (*CasbinService) SyncPolicy

func (svc *CasbinService) SyncPolicy(authorityId string, rules [][]string) error

func (*CasbinService) UpdateCasbin

func (svc *CasbinService) UpdateCasbin(AuthorityID uint, casbinInfos []dto.CasbinInfo) error

func (*CasbinService) UpdateCasbinApi

func (svc *CasbinService) UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error

type FileUploadAndDownloadService

type FileUploadAndDownloadService struct {
	*Service
}

func NewFileUploadAndDownloadService

func NewFileUploadAndDownloadService(service *Service) *FileUploadAndDownloadService

func (*FileUploadAndDownloadService) CreateFileChunk

func (e *FileUploadAndDownloadService) CreateFileChunk(id uint, fileChunkPath string, fileChunkNumber int) error

func (*FileUploadAndDownloadService) DeleteFile

func (*FileUploadAndDownloadService) DeleteFileChunk

func (e *FileUploadAndDownloadService) DeleteFileChunk(fileMd5 string, filePath string) error

func (*FileUploadAndDownloadService) EditFileName

EditFileName 编辑文件名或者备注

func (*FileUploadAndDownloadService) FindFile

func (*FileUploadAndDownloadService) FindOrCreateFile

func (e *FileUploadAndDownloadService) FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (file data.ExaFile, err error)

func (*FileUploadAndDownloadService) GetFileRecordInfoList

func (e *FileUploadAndDownloadService) GetFileRecordInfoList(info rhttp.PageInfo) (list interface{}, total int64, err error)

func (*FileUploadAndDownloadService) Upload

func (*FileUploadAndDownloadService) UploadFile

func (e *FileUploadAndDownloadService) UploadFile(header *multipart.FileHeader, noSave string) (file data.ExaFileUploadAndDownload, err error)

type JwtService

type JwtService struct {
	*Service
}

func NewJwtService

func NewJwtService(service *Service) *JwtService

func (*JwtService) GetRedisJWT

func (svc *JwtService) GetRedisJWT(userName string) (redisJWT string, err error)

func (*JwtService) IsBlacklist

func (svc *JwtService) IsBlacklist(jwt string) bool

func (*JwtService) JsonInBlacklist

func (svc *JwtService) JsonInBlacklist(jwtList data.JwtBlacklist) (err error)

func (*JwtService) LoadAll

func (svc *JwtService) LoadAll()

func (*JwtService) SetRedisJWT

func (svc *JwtService) SetRedisJWT(jwt string, userName string) (err error)

type OperationRecordService

type OperationRecordService struct {
	*Service
}

func NewOperationRecordService

func NewOperationRecordService(service *Service) *OperationRecordService

func (*OperationRecordService) CreateSysOperationRecord

func (svc *OperationRecordService) CreateSysOperationRecord(sysOperationRecord data.SysOperationRecord) (err error)

func (*OperationRecordService) DeleteSysOperationRecord

func (svc *OperationRecordService) DeleteSysOperationRecord(sysOperationRecord data.SysOperationRecord) (err error)

func (*OperationRecordService) DeleteSysOperationRecordByIds

func (svc *OperationRecordService) DeleteSysOperationRecordByIds(ids rhttp.IdsReq) (err error)

func (*OperationRecordService) GetSysOperationRecord

func (svc *OperationRecordService) GetSysOperationRecord(id uint) (sysOperationRecord data.SysOperationRecord, err error)

func (*OperationRecordService) GetSysOperationRecordInfoList

func (svc *OperationRecordService) GetSysOperationRecordInfoList(info dto.SysOperationRecordSearch) (list interface{}, total int64, err error)

type Service

type Service struct {
	Ctx context.Context
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx context.Context, biz *biz.Business, data *data.Data, logger *zap.Logger) *Service

type UserService

type UserService struct {
	*Service
}

func NewUserService

func NewUserService(service *Service) *UserService

NewUserService new a greeter service.

func (*UserService) ChangePassword

func (svc *UserService) ChangePassword(u *data.SysUser, newPassword string) (userInter *data.SysUser, err error)

func (*UserService) DeleteUser

func (svc *UserService) DeleteUser(id int) (err error)

func (*UserService) FindUserById

func (svc *UserService) FindUserById(id uint) (user *data.SysUser, err error)

func (*UserService) GetUserInfoList

func (svc *UserService) GetUserInfoList(info rhttp.PageInfo) (list interface{}, total int64, err error)

func (*UserService) Login

func (svc *UserService) Login(u *data.SysUser) (userInter *data.SysUser, err error)

func (*UserService) Register

func (svc *UserService) Register(u data.SysUser) (userInter data.SysUser, err error)

func (*UserService) ResetPassword

func (svc *UserService) ResetPassword(ID uint) (err error)

func (*UserService) SetSelfInfo

func (svc *UserService) SetSelfInfo(req data.SysUser) error

func (*UserService) SetUserAuthorities

func (svc *UserService) SetUserAuthorities(id uint, authorityIds []uint) (err error)

func (*UserService) SetUserAuthority

func (svc *UserService) SetUserAuthority(id uint, authorityId uint) (err error)

func (*UserService) SetUserInfo

func (svc *UserService) SetUserInfo(req data.SysUser) error

Jump to

Keyboard shortcuts

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