Documentation
¶
Index ¶
- type Application
- func (e *Application) GetConfig(key string) interface{}
- func (e *Application) GetDb() *gorm.DB
- func (e *Application) GetDynamicDb(name string) *gorm.DB
- func (e *Application) GetEngine() *fiber.App
- func (e *Application) GetEs() *elasticsearch.TypedClient
- func (e *Application) GetRedis() *redisClient.RedisClient
- func (e *Application) IsDebug() bool
- func (e *Application) Mode(value ...string) string
- func (e *Application) SetConfig(key string, value interface{})
- func (e *Application) SetDb(db *gorm.DB)
- func (e *Application) SetDynamicDb(name string, db *gorm.DB)
- func (e *Application) SetEngine(engine *fiber.App)
- func (e *Application) SetEs(es *elasticsearch.TypedClient)
- func (e *Application) SetRedis(redis *redisClient.RedisClient)
- type ReflectFunc
- type Runtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) GetConfig ¶
func (e *Application) GetConfig(key string) interface{}
func (*Application) GetDynamicDb ¶
func (e *Application) GetDynamicDb(name string) *gorm.DB
GetDynamicDb 获取所有map里的db数据
func (*Application) GetEs ¶
func (e *Application) GetEs() *elasticsearch.TypedClient
func (*Application) GetRedis ¶
func (e *Application) GetRedis() *redisClient.RedisClient
func (*Application) IsDebug ¶
func (e *Application) IsDebug() bool
func (*Application) Mode ¶
func (e *Application) Mode(value ...string) string
func (*Application) SetConfig ¶
func (e *Application) SetConfig(key string, value interface{})
func (*Application) SetDynamicDb ¶
func (e *Application) SetDynamicDb(name string, db *gorm.DB)
SetDynamicDb 设置对应key的db
func (*Application) SetEs ¶
func (e *Application) SetEs(es *elasticsearch.TypedClient)
SetEs 设置对应key的es
func (*Application) SetRedis ¶
func (e *Application) SetRedis(redis *redisClient.RedisClient)
type ReflectFunc ¶
func (*ReflectFunc) Call ¶
func (r *ReflectFunc) Call(params ...any) []reflect.Value
func (*ReflectFunc) CallMethod ¶
func (r *ReflectFunc) CallMethod(name string, params ...any) []reflect.Value
func (*ReflectFunc) Of ¶
func (r *ReflectFunc) Of(f any) (params []any)
type Runtime ¶
type Runtime interface {
Mode(value ...string) string
IsDebug() bool
SetDb(db *gorm.DB)
GetDb() *gorm.DB
SetDynamicDb(name string, db *gorm.DB)
GetDynamicDb(name string) *gorm.DB
SetEs(es *elasticsearch.TypedClient)
GetEs() *elasticsearch.TypedClient
// SetEngine 使用的路由
SetEngine(engine *fiber.App)
GetEngine() *fiber.App
GetConfig(key string) interface{}
SetConfig(key string, value interface{})
SetRedis(redis *redisClient.RedisClient)
GetRedis() *redisClient.RedisClient
}
Source Files
¶
- application.go
- reflect.go
- type.go
Click to show internal directories.
Click to hide internal directories.