Documentation ¶
Index ¶
- Variables
- func SetupRuntimeForTest(dbFilename string)
- type Application
- func (e *Application) Cache() storage.AdapterCache
- func (e *Application) GetCasbin() *casbin.SyncedEnforcer
- func (e *Application) GetCrontab() *cronjob.CronJob
- func (e *Application) GetDb() *gorm.DB
- func (e *Application) GetEngine() http.Handler
- func (e *Application) GetMiddleware() *jwt.GinJWTMiddleware
- func (e *Application) GetOss() oss.Oss
- func (e *Application) GetRouter() []Router
- func (e *Application) GetSms() sms.Sms
- func (e *Application) GetStreamMessage(id, stream string, value map[string]interface{}) (storage.Messager, error)
- func (e *Application) Locker() storage.AdapterLocker
- func (e *Application) Queue() storage.AdapterQueue
- func (e *Application) SetCacheAdapter(c storage.AdapterCache)
- func (e *Application) SetCasbin(enforcer *casbin.SyncedEnforcer)
- func (e *Application) SetCrontab(crontab *cronjob.CronJob)
- func (e *Application) SetDb(db *gorm.DB)
- func (e *Application) SetEngine(engine http.Handler)
- func (e *Application) SetLockerAdapter(c storage.AdapterLocker)
- func (e *Application) SetMiddleware(mw *jwt.GinJWTMiddleware)
- func (e *Application) SetOss(oss oss.Oss)
- func (e *Application) SetQueueAdapter(c storage.AdapterQueue)
- func (e *Application) SetSms(sms sms.Sms)
- type Router
- type Routers
Constants ¶
This section is empty.
Variables ¶
View Source
var Runtime = NewApplication()
Functions ¶
func SetupRuntimeForTest ¶ added in v1.0.20
func SetupRuntimeForTest(dbFilename string)
SetupRuntimeForTest for test purpose
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) GetCasbin ¶
func (e *Application) GetCasbin() *casbin.SyncedEnforcer
func (*Application) GetCrontab ¶
func (e *Application) GetCrontab() *cronjob.CronJob
GetCrontab 获取所有map里的crontab数据
func (*Application) GetMiddleware ¶ added in v1.1.15
func (e *Application) GetMiddleware() *jwt.GinJWTMiddleware
GetEngine 获取mw
func (*Application) GetOss ¶ added in v1.0.20
func (e *Application) GetOss() oss.Oss
SetOss 设置Oss service
func (*Application) GetSms ¶ added in v1.0.20
func (e *Application) GetSms() sms.Sms
SetSms 设置Sms service
func (*Application) GetStreamMessage ¶
func (e *Application) GetStreamMessage(id, stream string, value map[string]interface{}) (storage.Messager, error)
GetStreamMessage 获取队列需要用的message
func (*Application) SetCacheAdapter ¶
func (e *Application) SetCacheAdapter(c storage.AdapterCache)
SetCacheAdapter 设置缓存
func (*Application) SetCasbin ¶
func (e *Application) SetCasbin(enforcer *casbin.SyncedEnforcer)
func (*Application) SetCrontab ¶
func (e *Application) SetCrontab(crontab *cronjob.CronJob)
SetCrontab 设置对应key的crontab
func (*Application) SetEngine ¶
func (e *Application) SetEngine(engine http.Handler)
SetEngine 设置路由引擎
func (*Application) SetLockerAdapter ¶
func (e *Application) SetLockerAdapter(c storage.AdapterLocker)
SetLockerAdapter 设置分布式锁
func (*Application) SetMiddleware ¶ added in v1.1.15
func (e *Application) SetMiddleware(mw *jwt.GinJWTMiddleware)
SetEngine 设置mw
func (*Application) SetOss ¶ added in v1.0.20
func (e *Application) SetOss(oss oss.Oss)
SetOss 设置Oss service
func (*Application) SetQueueAdapter ¶
func (e *Application) SetQueueAdapter(c storage.AdapterQueue)
SetQueueAdapter 设置队列适配器
func (*Application) SetSms ¶ added in v1.0.20
func (e *Application) SetSms(sms sms.Sms)
SetSms 设置Sms service
Click to show internal directories.
Click to hide internal directories.