service

package
v3.0.0-...-64a4d8a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CasbinEnforcer

func CasbinEnforcer(ctx context.Context) (enforcer *casbin.SyncedEnforcer, err error)

CasbinEnforcer 获取adapter单例对象

func EventBus

func EventBus() eventBus.Bus

func RegisterCache

func RegisterCache(che ICache)

func RegisterCaptcha

func RegisterCaptcha(i ICaptcha)

func RegisterEventBus

func RegisterEventBus(i eventBus.Bus)

func RegisterMiddleware

func RegisterMiddleware(i IMiddleware)

func RegisterSysConfig

func RegisterSysConfig(i ISysConfig)

func RegisterSysDictData

func RegisterSysDictData(i ISysDictData)

func RegisterSysDictType

func RegisterSysDictType(i ISysDictType)

Types

type ICache

type ICache interface {
	cache.IGCache
}

func Cache

func Cache() ICache

type ICaptcha

type ICaptcha interface {
	GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error)
	VerifyString(id, answer string) bool
}

func Captcha

func Captcha() ICaptcha

type IMiddleware

type IMiddleware interface {
	MiddlewareCORS(r *ghttp.Request)
}

func Middleware

func Middleware() IMiddleware

type ISysConfig

type ISysConfig interface {
	List(ctx context.Context, req *system.ConfigSearchReq) (res *system.ConfigSearchRes, err error)
	Add(ctx context.Context, req *system.ConfigAddReq, userId uint64) (err error)
	CheckConfigKeyUnique(ctx context.Context, configKey string, configId ...int64) (err error)
	Get(ctx context.Context, id int) (res *system.ConfigGetRes, err error)
	Edit(ctx context.Context, req *system.ConfigEditReq, userId uint64) (err error)
	Delete(ctx context.Context, ids []int) (err error)
	GetConfigByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
	GetByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
}

func SysConfig

func SysConfig() ISysConfig

type ISysDictData

type ISysDictData interface {
	GetDictWithDataByType(ctx context.Context, dictType, defaultValue string) (dict *system.GetDictRes, err error)
	List(ctx context.Context, req *system.DictDataSearchReq) (res *system.DictDataSearchRes, err error)
	Add(ctx context.Context, req *system.DictDataAddReq, userId uint64) (err error)
	Get(ctx context.Context, dictCode uint) (res *system.DictDataGetRes, err error)
	Edit(ctx context.Context, req *system.DictDataEditReq, userId uint64) (err error)
	Delete(ctx context.Context, ids []int) (err error)
}

func SysDictData

func SysDictData() ISysDictData

type ISysDictType

type ISysDictType interface {
	List(ctx context.Context, req *system.DictTypeSearchReq) (res *system.DictTypeSearchRes, err error)
	Add(ctx context.Context, req *system.DictTypeAddReq, userId uint64) (err error)
	Edit(ctx context.Context, req *system.DictTypeEditReq, userId uint64) (err error)
	Get(ctx context.Context, req *system.DictTypeGetReq) (dictType *entity.SysDictType, err error)
	ExistsDictType(ctx context.Context, dictType string, dictId ...int64) (err error)
	Delete(ctx context.Context, dictIds []int) (err error)
	GetAllDictType(ctx context.Context) (list []*entity.SysDictType, err error)
}

func SysDictType

func SysDictType() ISysDictType

Jump to

Keyboard shortcuts

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