application

package
v0.0.0-...-8f74952 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 Close

func Close()

func GetAtreugo

func GetAtreugo() *atreugo.Atreugo

func GetAtreugoSession

func GetAtreugoSession() *session.Session

func GetLogger

func GetLogger() *zerolog.Logger

func GetMQTT

func GetMQTT() *mqtt.Client

func GetRedis

func GetRedis() *redis.Client

func GetRedisKeyPrefix

func GetRedisKeyPrefix() string

func GetRunEnv

func GetRunEnv() int

func GetSqlxMysqlClient

func GetSqlxMysqlClient() *sqlx.DB

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 CloseFunc

type CloseFunc func() error

type DataSource

type DataSource interface {
	GetById(id int) string
	Get() ExtErr.Err
}

func GetService

func GetService() DataSource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL