Documentation ¶
Index ¶
- Constants
- func AutoLoadSaveSessionStore(a *atreugo.Router)
- func Close()
- func GetAtreugo() *atreugo.Atreugo
- func GetAtreugoSession() *session.Session
- func GetLogger() *zerolog.Logger
- func GetMQTT() *mqtt.Client
- func GetRedis() *redis.Client
- func GetRedisKeyPrefix() string
- func GetRunEnv() int
- func GetSqlxMysqlClient() *sqlx.DB
- func GetSqlxMysqlTablePrefix() string
- func NewService(source DataSource)
- func SetAccessLog(a *atreugo.Router)
- func SetHealthResponse(a *atreugo.Atreugo)
- func SetJsonContentType(a *atreugo.Router)
- func SetRequestId(a *atreugo.Router)
- type CloseFunc
- type DataSource
Constants ¶
View Source
const ( // Local 本地生产环境 Local = iota // Development dev/daily/development 日常开发环境 Development // Prepub pre/prepub 预生产环境 Prepub // Production prod/production 生产环境 Production // UnitTest test/unittest 单元测试环境 UnitTest // Benchmark benchmark 性能测试环境 Benchmark )
View Source
const RunEnvField = "RUNTIME_ENV"
Variables ¶
This section is empty.
Functions ¶
func AutoLoadSaveSessionStore ¶
func AutoLoadSaveSessionStore(a *atreugo.Router)
AutoLoadSaveSessionStore 自动加载保存会话存储
func GetAtreugo ¶
func GetAtreugo() *atreugo.Atreugo
func GetAtreugoSession ¶
func GetRedisKeyPrefix ¶
func GetRedisKeyPrefix() string
func GetSqlxMysqlClient ¶
func GetSqlxMysqlTablePrefix ¶
func GetSqlxMysqlTablePrefix() string
func NewService ¶
func NewService(source DataSource)
func SetAccessLog ¶
func SetAccessLog(a *atreugo.Router)
func SetHealthResponse ¶
func SetHealthResponse(a *atreugo.Atreugo)
func SetJsonContentType ¶
func SetJsonContentType(a *atreugo.Router)
func SetRequestId ¶
func SetRequestId(a *atreugo.Router)
Types ¶
type DataSource ¶
func GetService ¶
func GetService() DataSource
Click to show internal directories.
Click to hide internal directories.