Documentation ¶
Index ¶
- Variables
- func GetCache() storage.AdapterCache
- func GetDB(ctx *gin.Context, table schema.Tabler) *gorm.DB
- func GetLocker() storage.AdapterLocker
- func GetProfiler() *pyroscope.Profiler
- func GetQueue() storage.AdapterQueue
- func GetRouter() gin.IRouter
- func GetServerManager() server.Manager
- func Stage() string
- type AppConfigImp
- type Center
- type ConfigImp
- type CustomConfigImp
- type DefaultCenter
- func SetAppConfig(a AppConfigImp) *DefaultCenter
- func SetCache(c storage.AdapterCache) *DefaultCenter
- func SetConfig(e ConfigImp) *DefaultCenter
- func SetCustomConfig(e CustomConfigImp) *DefaultCenter
- func SetGRPCClient(g GRPCClientImp) *DefaultCenter
- func SetLocker(l storage.AdapterLocker) *DefaultCenter
- func SetMakeRouter(m MakeRouterImp) *DefaultCenter
- func SetNotice(n NoticeImp) *DefaultCenter
- func SetProfiler(p *pyroscope.Profiler) *DefaultCenter
- func SetQueue(q storage.AdapterQueue) *DefaultCenter
- func SetRouter(r gin.IRouter) *DefaultCenter
- func SetServerManager(m server.Manager) *DefaultCenter
- func SetStatistics(s StatisticsImp) *DefaultCenter
- func SetTenant(t TenantImp) *DefaultCenter
- func SetTenantMigrator(t TenantMigrator) *DefaultCenter
- func SetUserConfig(u UserConfigImp) *DefaultCenter
- func SetVerify(v security.Verifier) *DefaultCenter
- func SetVerifyCodeStore(v VerifyCodeStoreImp) *DefaultCenter
- func SetVirtualModel(v VirtualModelImp) *DefaultCenter
- func (d *DefaultCenter) GetAppConfig() AppConfigImp
- func (d *DefaultCenter) GetCache() storage.AdapterCache
- func (d *DefaultCenter) GetConfig() ConfigImp
- func (d *DefaultCenter) GetCustomConfig() CustomConfigImp
- func (d *DefaultCenter) GetGRPCClient() GRPCClientImp
- func (d *DefaultCenter) GetLocker() storage.AdapterLocker
- func (d *DefaultCenter) GetMakeRouter() MakeRouterImp
- func (d *DefaultCenter) GetNotice() NoticeImp
- func (d *DefaultCenter) GetProfiler() *pyroscope.Profiler
- func (d *DefaultCenter) GetQueue() storage.AdapterQueue
- func (d *DefaultCenter) GetRouter() gin.IRouter
- func (d *DefaultCenter) GetServerManager() server.Manager
- func (d *DefaultCenter) GetStatistics() StatisticsImp
- func (d *DefaultCenter) GetTenant() TenantImp
- func (d *DefaultCenter) GetTenantMigrator() TenantMigrator
- func (d *DefaultCenter) GetUserConfig() UserConfigImp
- func (d *DefaultCenter) GetVerify() UserImp
- func (d *DefaultCenter) GetVerifyCodeStore() VerifyCodeStoreImp
- func (d *DefaultCenter) GetVirtualModel() VirtualModelImp
- func (d *DefaultCenter) SetAppConfig(a AppConfigImp)
- func (d *DefaultCenter) SetCache(c storage.AdapterCache)
- func (d *DefaultCenter) SetConfig(e ConfigImp)
- func (d *DefaultCenter) SetCustomConfig(e CustomConfigImp)
- func (d *DefaultCenter) SetGRPCClient(g GRPCClientImp)
- func (d *DefaultCenter) SetLocker(l storage.AdapterLocker)
- func (d *DefaultCenter) SetMakeRouter(m MakeRouterImp)
- func (d *DefaultCenter) SetNotice(n NoticeImp)
- func (d *DefaultCenter) SetProfiler(p *pyroscope.Profiler)
- func (d *DefaultCenter) SetQueue(q storage.AdapterQueue)
- func (d *DefaultCenter) SetRouter(r gin.IRouter)
- func (d *DefaultCenter) SetServerManager(m server.Manager)
- func (d *DefaultCenter) SetStatistics(s StatisticsImp)
- func (d *DefaultCenter) SetTenant(t TenantImp)
- func (d *DefaultCenter) SetTenantMigrator(t TenantMigrator)
- func (d *DefaultCenter) SetUserConfig(u UserConfigImp)
- func (d *DefaultCenter) SetVerify(v UserImp)
- func (d *DefaultCenter) SetVerifyCodeStore(v VerifyCodeStoreImp)
- func (d *DefaultCenter) SetVirtualModel(v VirtualModelImp)
- func (d *DefaultCenter) Stage() string
- type GRPCClientImp
- type MakeRouterImp
- type NoticeImp
- type StageImp
- type StatisticsImp
- type StatisticsObject
- type TenantImp
- type TenantMigrator
- type UserConfigImp
- type UserImp
- type VerifyCodeStoreImp
- type VirtualModelImp
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &DefaultCenter{ Manager: server.New(), }
Functions ¶
func GetCache ¶ added in v0.3.0
func GetCache() storage.AdapterCache
func GetLocker ¶ added in v0.3.0
func GetLocker() storage.AdapterLocker
func GetProfiler ¶
func GetProfiler() *pyroscope.Profiler
func GetQueue ¶ added in v0.3.0
func GetQueue() storage.AdapterQueue
func GetServerManager ¶
Types ¶
type AppConfigImp ¶
type AppConfigImp interface { SetAppConfig(ctx *gin.Context, key string, auth bool, value string) error GetAppConfig(ctx *gin.Context, key string) (string, bool) }
func GetAppConfig ¶
func GetAppConfig() AppConfigImp
type CustomConfigImp ¶ added in v0.4.6
type CustomConfigImp interface { ConfigImp }
func GetCustomConfig ¶ added in v0.4.6
func GetCustomConfig() CustomConfigImp
type DefaultCenter ¶
type DefaultCenter struct { NoticeImp TenantImp TenantMigrator UserImp VirtualModelImp ConfigImp CustomConfigImp server.Manager gin.IRouter StageImp AppConfigImp UserConfigImp Profiler *pyroscope.Profiler StatisticsImp MakeRouterImp GRPCClientImp storage.AdapterCache storage.AdapterQueue storage.AdapterLocker VerifyCodeStoreImp }
func SetAppConfig ¶
func SetAppConfig(a AppConfigImp) *DefaultCenter
func SetCache ¶ added in v0.3.0
func SetCache(c storage.AdapterCache) *DefaultCenter
func SetConfig ¶
func SetConfig(e ConfigImp) *DefaultCenter
func SetCustomConfig ¶ added in v0.4.6
func SetCustomConfig(e CustomConfigImp) *DefaultCenter
func SetGRPCClient ¶
func SetGRPCClient(g GRPCClientImp) *DefaultCenter
func SetLocker ¶ added in v0.3.0
func SetLocker(l storage.AdapterLocker) *DefaultCenter
func SetMakeRouter ¶
func SetMakeRouter(m MakeRouterImp) *DefaultCenter
func SetNotice ¶
func SetNotice(n NoticeImp) *DefaultCenter
func SetProfiler ¶
func SetProfiler(p *pyroscope.Profiler) *DefaultCenter
func SetQueue ¶ added in v0.3.0
func SetQueue(q storage.AdapterQueue) *DefaultCenter
func SetRouter ¶
func SetRouter(r gin.IRouter) *DefaultCenter
func SetServerManager ¶
func SetServerManager(m server.Manager) *DefaultCenter
func SetStatistics ¶
func SetStatistics(s StatisticsImp) *DefaultCenter
func SetTenant ¶
func SetTenant(t TenantImp) *DefaultCenter
func SetTenantMigrator ¶ added in v0.4.4
func SetTenantMigrator(t TenantMigrator) *DefaultCenter
func SetUserConfig ¶ added in v0.3.0
func SetUserConfig(u UserConfigImp) *DefaultCenter
func SetVerify ¶
func SetVerify(v security.Verifier) *DefaultCenter
func SetVerifyCodeStore ¶ added in v0.4.6
func SetVerifyCodeStore(v VerifyCodeStoreImp) *DefaultCenter
func SetVirtualModel ¶
func SetVirtualModel(v VirtualModelImp) *DefaultCenter
func (*DefaultCenter) GetAppConfig ¶
func (d *DefaultCenter) GetAppConfig() AppConfigImp
func (*DefaultCenter) GetCache ¶ added in v0.3.0
func (d *DefaultCenter) GetCache() storage.AdapterCache
func (*DefaultCenter) GetConfig ¶
func (d *DefaultCenter) GetConfig() ConfigImp
func (*DefaultCenter) GetCustomConfig ¶ added in v0.4.6
func (d *DefaultCenter) GetCustomConfig() CustomConfigImp
func (*DefaultCenter) GetGRPCClient ¶ added in v0.3.0
func (d *DefaultCenter) GetGRPCClient() GRPCClientImp
func (*DefaultCenter) GetLocker ¶ added in v0.3.0
func (d *DefaultCenter) GetLocker() storage.AdapterLocker
func (*DefaultCenter) GetMakeRouter ¶
func (d *DefaultCenter) GetMakeRouter() MakeRouterImp
func (*DefaultCenter) GetNotice ¶
func (d *DefaultCenter) GetNotice() NoticeImp
func (*DefaultCenter) GetProfiler ¶
func (d *DefaultCenter) GetProfiler() *pyroscope.Profiler
func (*DefaultCenter) GetQueue ¶ added in v0.3.0
func (d *DefaultCenter) GetQueue() storage.AdapterQueue
func (*DefaultCenter) GetRouter ¶
func (d *DefaultCenter) GetRouter() gin.IRouter
func (*DefaultCenter) GetServerManager ¶
func (d *DefaultCenter) GetServerManager() server.Manager
func (*DefaultCenter) GetStatistics ¶
func (d *DefaultCenter) GetStatistics() StatisticsImp
func (*DefaultCenter) GetTenant ¶
func (d *DefaultCenter) GetTenant() TenantImp
func (*DefaultCenter) GetTenantMigrator ¶ added in v0.4.4
func (d *DefaultCenter) GetTenantMigrator() TenantMigrator
func (*DefaultCenter) GetUserConfig ¶ added in v0.3.0
func (d *DefaultCenter) GetUserConfig() UserConfigImp
func (*DefaultCenter) GetVerify ¶
func (d *DefaultCenter) GetVerify() UserImp
func (*DefaultCenter) GetVerifyCodeStore ¶ added in v0.4.6
func (d *DefaultCenter) GetVerifyCodeStore() VerifyCodeStoreImp
func (*DefaultCenter) GetVirtualModel ¶
func (d *DefaultCenter) GetVirtualModel() VirtualModelImp
func (*DefaultCenter) SetAppConfig ¶
func (d *DefaultCenter) SetAppConfig(a AppConfigImp)
func (*DefaultCenter) SetCache ¶ added in v0.3.0
func (d *DefaultCenter) SetCache(c storage.AdapterCache)
func (*DefaultCenter) SetConfig ¶
func (d *DefaultCenter) SetConfig(e ConfigImp)
func (*DefaultCenter) SetCustomConfig ¶ added in v0.4.6
func (d *DefaultCenter) SetCustomConfig(e CustomConfigImp)
func (*DefaultCenter) SetGRPCClient ¶
func (d *DefaultCenter) SetGRPCClient(g GRPCClientImp)
func (*DefaultCenter) SetLocker ¶ added in v0.3.0
func (d *DefaultCenter) SetLocker(l storage.AdapterLocker)
func (*DefaultCenter) SetMakeRouter ¶
func (d *DefaultCenter) SetMakeRouter(m MakeRouterImp)
func (*DefaultCenter) SetNotice ¶
func (d *DefaultCenter) SetNotice(n NoticeImp)
func (*DefaultCenter) SetProfiler ¶
func (d *DefaultCenter) SetProfiler(p *pyroscope.Profiler)
func (*DefaultCenter) SetQueue ¶ added in v0.3.0
func (d *DefaultCenter) SetQueue(q storage.AdapterQueue)
func (*DefaultCenter) SetRouter ¶
func (d *DefaultCenter) SetRouter(r gin.IRouter)
func (*DefaultCenter) SetServerManager ¶
func (d *DefaultCenter) SetServerManager(m server.Manager)
func (*DefaultCenter) SetStatistics ¶
func (d *DefaultCenter) SetStatistics(s StatisticsImp)
func (*DefaultCenter) SetTenant ¶
func (d *DefaultCenter) SetTenant(t TenantImp)
func (*DefaultCenter) SetTenantMigrator ¶ added in v0.4.4
func (d *DefaultCenter) SetTenantMigrator(t TenantMigrator)
func (*DefaultCenter) SetUserConfig ¶ added in v0.3.0
func (d *DefaultCenter) SetUserConfig(u UserConfigImp)
func (*DefaultCenter) SetVerify ¶
func (d *DefaultCenter) SetVerify(v UserImp)
func (*DefaultCenter) SetVerifyCodeStore ¶ added in v0.4.6
func (d *DefaultCenter) SetVerifyCodeStore(v VerifyCodeStoreImp)
func (*DefaultCenter) SetVirtualModel ¶
func (d *DefaultCenter) SetVirtualModel(v VirtualModelImp)
func (*DefaultCenter) Stage ¶
func (d *DefaultCenter) Stage() string
type GRPCClientImp ¶
type GRPCClientImp interface {
GetGRPCClient(string, ...grpc.DialOption) *grpc.ClientConn
}
func GetGRPCClient ¶ added in v0.3.0
func GetGRPCClient() GRPCClientImp
type MakeRouterImp ¶
type MakeRouterImp interface { SetFunc(...func(*gin.RouterGroup)) GetFunc() []func(*gin.RouterGroup) MakeRouter(*gin.RouterGroup) }
func GetMakeRouter ¶
func GetMakeRouter() MakeRouterImp
type NoticeImp ¶
type StatisticsImp ¶
type StatisticsImp interface { Calibrate(ctx *gin.Context, object StatisticsObject) error NowIncrease(ctx *gin.Context, object StatisticsObject) error NowReduce(ctx *gin.Context, object StatisticsObject) error }
func GetStatistics ¶
func GetStatistics() StatisticsImp
type StatisticsObject ¶
type TenantImp ¶
type TenantMigrator ¶ added in v0.4.4
func GetTenantMigrator ¶ added in v0.4.4
func GetTenantMigrator() TenantMigrator
type UserConfigImp ¶ added in v0.3.0
type UserConfigImp interface { SetUserConfig(ctx *gin.Context, userID, key, value string) error GetUserConfig(ctx *gin.Context, userID, key string) (string, bool) }
func GetUserConfig ¶ added in v0.3.0
func GetUserConfig() UserConfigImp
type VerifyCodeStoreImp ¶ added in v0.4.6
type VerifyCodeStoreImp interface { GenerateCode(ctx context.Context, key string, expire time.Duration) (string, error) VerifyCode(ctx context.Context, key, code string) (bool, error) }
func GetVerifyCodeStore ¶ added in v0.4.6
func GetVerifyCodeStore() VerifyCodeStoreImp
type VirtualModelImp ¶
type VirtualModelImp interface { GetModels(ctx *gin.Context) ([]VirtualModelImp, error) Make() *model.Model GetKey() string }
func GetVirtualModel ¶
func GetVirtualModel() VirtualModelImp
Click to show internal directories.
Click to hide internal directories.