Versions in this module Expand all Collapse all v1 v1.0.1 Apr 25, 2023 Changes in this version + func NewCache(prefix string, store storage.AdapterCache, wxTokenStoreKey string) storage.AdapterCache + func NewLocker(prefix string, locker storage.AdapterLocker) storage.AdapterLocker + func NewQueue(prefix string, queue storage.AdapterQueue) storage.AdapterQueue + type Application struct + func NewConfig() *Application + func (e *Application) GetAppRouters() []func() + func (e *Application) GetCacheAdapter() storage.AdapterCache + func (e *Application) GetCachePrefix(key string) storage.AdapterCache + func (e *Application) GetCasbin() map[string]*casbin.SyncedEnforcer + func (e *Application) GetCasbinKey(key string) *casbin.SyncedEnforcer + func (e *Application) GetConfig(key string) interface{} + func (e *Application) GetCrontab() map[string]*cron.Cron + func (e *Application) GetCrontabKey(key string) *cron.Cron + func (e *Application) GetDb() map[string]*gorm.DB + func (e *Application) GetDbByKey(key string) *gorm.DB + func (e *Application) GetEngine() http.Handler + func (e *Application) GetHandler() map[string][]func(r *gin.RouterGroup, hand ...*gin.HandlerFunc) + func (e *Application) GetHandlerPrefix(key string) []func(r *gin.RouterGroup, hand ...*gin.HandlerFunc) + func (e *Application) GetLockerAdapter() storage.AdapterLocker + func (e *Application) GetLockerPrefix(key string) storage.AdapterLocker + func (e *Application) GetLogger() logger.Logger + func (e *Application) GetMemoryQueue(prefix string) storage.AdapterQueue + func (e *Application) GetMiddleware() map[string]interface{} + func (e *Application) GetMiddlewareKey(key string) interface{} + func (e *Application) GetQueueAdapter() storage.AdapterQueue + func (e *Application) GetQueuePrefix(key string) storage.AdapterQueue + func (e *Application) GetRouter() []Router + func (e *Application) GetStreamMessage(id, stream string, value map[string]interface{}) (storage.Messager, error) + func (e *Application) SetAppRouters(appRouters func()) + func (e *Application) SetCacheAdapter(c storage.AdapterCache) + func (e *Application) SetCasbin(key string, enforcer *casbin.SyncedEnforcer) + func (e *Application) SetConfig(key string, value interface{}) + func (e *Application) SetCrontab(key string, crontab *cron.Cron) + func (e *Application) SetDb(key string, db *gorm.DB) + func (e *Application) SetEngine(engine http.Handler) + func (e *Application) SetHandler(key string, routerGroup func(r *gin.RouterGroup, hand ...*gin.HandlerFunc)) + func (e *Application) SetLockerAdapter(c storage.AdapterLocker) + func (e *Application) SetLogger(l logger.Logger) + func (e *Application) SetMiddleware(key string, middleware interface{}) + func (e *Application) SetQueueAdapter(c storage.AdapterQueue) + type Cache struct + func (e *Cache) SetPrefix(prefix string) + func (e *Cache) String() string + func (e Cache) Connect() error + func (e Cache) Decrease(key string) error + func (e Cache) Del(key string) error + func (e Cache) Expire(key string, dur time.Duration) error + func (e Cache) Get(key string) (string, error) + func (e Cache) HashDel(hk, key string) error + func (e Cache) HashGet(hk, key string) (string, error) + func (e Cache) Increase(key string) error + func (e Cache) PutToken(token *oauth2.Token) error + func (e Cache) Set(key string, val interface{}, expire int) error + func (e Cache) Token() (token *oauth2.Token, err error) + type Locker struct + func (e *Locker) Lock(key string, ttl int64, options *redislock.Options) (*redislock.Lock, error) + func (e *Locker) String() string + type Queue struct + func (e *Queue) Append(message storage.Messager) error + func (e *Queue) Register(name string, f storage.ConsumerFunc) + func (e *Queue) Run() + func (e *Queue) Shutdown() + func (e *Queue) String() string + type Router struct + Handler string + HttpMethod string + RelativePath string + type Routers struct + List []Router + type Runtime interface + GetAppRouters func() []func() + GetCacheAdapter func() storage.AdapterCache + GetCachePrefix func(string) storage.AdapterCache + GetCasbin func() map[string]*casbin.SyncedEnforcer + GetCasbinKey func(key string) *casbin.SyncedEnforcer + GetConfig func(key string) interface{} + GetCrontab func() map[string]*cron.Cron + GetCrontabKey func(key string) *cron.Cron + GetDb func() map[string]*gorm.DB + GetDbByKey func(key string) *gorm.DB + GetEngine func() http.Handler + GetHandler func() map[string][]func(r *gin.RouterGroup, hand ...*gin.HandlerFunc) + GetHandlerPrefix func(key string) []func(r *gin.RouterGroup, hand ...*gin.HandlerFunc) + GetLockerAdapter func() storage.AdapterLocker + GetLockerPrefix func(string) storage.AdapterLocker + GetLogger func() logger.Logger + GetMemoryQueue func(string) storage.AdapterQueue + GetMiddleware func() map[string]interface{} + GetMiddlewareKey func(key string) interface{} + GetQueueAdapter func() storage.AdapterQueue + GetQueuePrefix func(string) storage.AdapterQueue + GetRouter func() []Router + GetStreamMessage func(id, stream string, value map[string]interface{}) (storage.Messager, error) + SetAppRouters func(appRouters func()) + SetCacheAdapter func(storage.AdapterCache) + SetCasbin func(key string, enforcer *casbin.SyncedEnforcer) + SetConfig func(key string, value interface{}) + SetCrontab func(key string, crontab *cron.Cron) + SetDb func(key string, db *gorm.DB) + SetEngine func(engine http.Handler) + SetHandler func(key string, routerGroup func(r *gin.RouterGroup, hand ...*gin.HandlerFunc)) + SetLockerAdapter func(storage.AdapterLocker) + SetLogger func(logger logger.Logger) + SetMiddleware func(string, interface{}) + SetQueueAdapter func(storage.AdapterQueue)