appcontext

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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