Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DBDialectMysql rdbms dialect name for MySQL DBDialectMysql = "mysql" // DBDialectPostgres rdbms dialect name for PostgreSQL DBDialectPostgres = "postgres" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct {
// contains filtered or unexported fields
}
AppContext the app context struct
func NewAppContext ¶
func NewAppContext(config config.Provider) *AppContext
NewAppContext initiate appcontext object
func (*AppContext) GetCachePool ¶
func (a *AppContext) GetCachePool() *redis.Pool
GetCachePool get cache pool connection
func (*AppContext) GetDBInstance ¶
func (a *AppContext) GetDBInstance(dbType string) (*gorp.DbMap, error)
GetDBInstance getting gorp instance, param: dbType can be "mysql" or "postgre"
func (*AppContext) GetInfluxDBClient ¶
func (a *AppContext) GetInfluxDBClient() (c *influx.Client, err error)
GetInfluxDBClient get Influx DB client
Click to show internal directories.
Click to hide internal directories.