biz

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: 20 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

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

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Authority

type Authority struct {
	*Business
}

func NewAuthority

func NewAuthority(biz *Business) *Authority

func (*Authority) CreateAuthority

func (b *Authority) CreateAuthority(auth data.SysAuthority) (authority data.SysAuthority, err error)

func (*Authority) DeleteAuthority

func (b *Authority) DeleteAuthority(auth *data.SysAuthority) error

func (*Authority) GetAuthorityInfo

func (b *Authority) GetAuthorityInfo(auth data.SysAuthority) (sa data.SysAuthority, err error)

func (*Authority) GetAuthorityInfoList

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

func (*Authority) SetDataAuthority

func (b *Authority) SetDataAuthority(auth data.SysAuthority) error

func (*Authority) UpdateAuthority

func (b *Authority) UpdateAuthority(auth data.SysAuthority) (authority data.SysAuthority, err error)

type Business

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

func NewBusiness

func NewBusiness(ctx context.Context, data *data.Data, logger *zap.Logger) *Business

type Casbin

type Casbin struct {
	*Business
}

func NewCasbin

func NewCasbin(biz *Business) *Casbin

func (*Casbin) AddPolicies

func (b *Casbin) AddPolicies(rules [][]string) error

func (*Casbin) Casbin

func (b *Casbin) Casbin() *casbin.SyncedCachedEnforcer

func (*Casbin) ClearCasbin

func (b *Casbin) ClearCasbin(v int, p ...string) bool

func (*Casbin) FreshCasbin

func (b *Casbin) FreshCasbin() (err error)

func (*Casbin) GetPolicyPathByAuthorityId

func (b *Casbin) GetPolicyPathByAuthorityId(AuthorityID uint) (pathMaps []dto.CasbinInfo)

func (*Casbin) RemoveFilteredPolicy

func (b *Casbin) RemoveFilteredPolicy(authorityId string) error

func (*Casbin) SyncPolicy

func (b *Casbin) SyncPolicy(authorityId string, rules [][]string) error

func (*Casbin) UpdateCasbin

func (b *Casbin) UpdateCasbin(AuthorityID uint, casbinInfos []dto.CasbinInfo) error

func (*Casbin) UpdateCasbinApi

func (b *Casbin) UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error

type FileUploadAndDownload

type FileUploadAndDownload struct {
	*Business
}

func NewFileUploadAndDownload

func NewFileUploadAndDownload(biz *Business) *FileUploadAndDownload

func (*FileUploadAndDownload) CreateFileChunk

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

func (*FileUploadAndDownload) DeleteFile

func (e *FileUploadAndDownload) DeleteFile(file data.ExaFileUploadAndDownload) (err error)

func (*FileUploadAndDownload) DeleteFileChunk

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

func (*FileUploadAndDownload) EditFileName

func (e *FileUploadAndDownload) EditFileName(file data.ExaFileUploadAndDownload) (err error)

EditFileName 编辑文件名或者备注

func (*FileUploadAndDownload) FindFile

func (*FileUploadAndDownload) FindOrCreateFile

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

func (*FileUploadAndDownload) GetFileRecordInfoList

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

func (*FileUploadAndDownload) Upload

func (*FileUploadAndDownload) UploadFile

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

type Jwt

type Jwt struct {
	*Business
}

func NewJwt

func NewJwt(biz *Business) *Jwt

func (*Jwt) GetRedisJWT

func (b *Jwt) GetRedisJWT(userName string) (redisJWT string, err error)

func (*Jwt) IsBlacklist

func (b *Jwt) IsBlacklist(jwt string) bool

func (*Jwt) JsonInBlacklist

func (b *Jwt) JsonInBlacklist(jwtList data.JwtBlacklist) (err error)

func (*Jwt) LoadAll

func (b *Jwt) LoadAll()

func (*Jwt) SetRedisJWT

func (b *Jwt) SetRedisJWT(jwt string, userName string) (err error)

type OperationRecord

type OperationRecord struct {
	*Business
}

func NewOperationRecord

func NewOperationRecord(biz *Business) *OperationRecord

func (*OperationRecord) CreateSysOperationRecord

func (b *OperationRecord) CreateSysOperationRecord(sysOperationRecord data.SysOperationRecord) (err error)

func (*OperationRecord) DeleteSysOperationRecord

func (b *OperationRecord) DeleteSysOperationRecord(sysOperationRecord data.SysOperationRecord) (err error)

func (*OperationRecord) DeleteSysOperationRecordByIds

func (b *OperationRecord) DeleteSysOperationRecordByIds(ids rhttp.IdsReq) (err error)

func (*OperationRecord) GetSysOperationRecord

func (b *OperationRecord) GetSysOperationRecord(id uint) (sysOperationRecord data.SysOperationRecord, err error)

func (*OperationRecord) GetSysOperationRecordInfoList

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

type User

type User struct {
	*Business
}

func NewUser

func NewUser(biz *Business) *User

NewUserService new a greeter service.

func (*User) ChangePassword

func (b *User) ChangePassword(u *data.SysUser, newPassword string) (userInter *data.SysUser, err error)

func (*User) DeleteUser

func (b *User) DeleteUser(id int) (err error)

func (*User) FindUserById

func (b *User) FindUserById(id uint) (user *data.SysUser, err error)

func (*User) GetUserInfoList

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

func (*User) Login

func (b *User) Login(u *data.SysUser) (userInter *data.SysUser, err error)

func (*User) Register

func (b *User) Register(u data.SysUser) (userInter data.SysUser, err error)

func (*User) ResetPassword

func (b *User) ResetPassword(ID uint) (err error)

func (*User) SetSelfInfo

func (b *User) SetSelfInfo(req data.SysUser) error

func (*User) SetUserAuthorities

func (b *User) SetUserAuthorities(id uint, authorityIds []uint) (err error)

func (*User) SetUserAuthority

func (b *User) SetUserAuthority(id uint, authorityId uint) (err error)

func (*User) SetUserInfo

func (b *User) SetUserInfo(req data.SysUser) error

Jump to

Keyboard shortcuts

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