Documentation ¶
Index ¶
- func CleanCache() error
- func ConnectToMySQL(dc *DatabaseConfig) *sql.DB
- func ConnectToMySQLWithDb(dc *DatabaseConfig, dbName string) *sql.DB
- func GetRedisCache(key string) (string, error)
- func MustExec(result sql.Result, err error) (sql.Result, error)
- func SQLQueryRetrieveMap(db *sql.DB, query string, args ...interface{}) ([]map[string]interface{}, error)
- func SQLQueryRetrieveMapNoCache(db *sql.DB, query string, args ...interface{}) ([]map[string]interface{}, error)
- func SQLQueryRetrieveStruct(db *sql.DB, rowStruct interface{}, query string, args ...interface{}) error
- func SetLogger(l *log.Logger)
- func SetRedis(r *redis.Client)
- func SetRedisCache(key string, value string) error
- func SetRedisWithExpiration(r *redis.Client, expiration time.Duration)
- type DatabaseConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanCache ¶ added in v0.1.2
func CleanCache() error
func ConnectToMySQL ¶
func ConnectToMySQL(dc *DatabaseConfig) *sql.DB
func ConnectToMySQLWithDb ¶ added in v0.3.1
func ConnectToMySQLWithDb(dc *DatabaseConfig, dbName string) *sql.DB
func GetRedisCache ¶ added in v0.3.2
func SQLQueryRetrieveMap ¶
func SQLQueryRetrieveStruct ¶
func SetRedisCache ¶ added in v0.3.2
func SetRedisWithExpiration ¶ added in v0.3.2
Types ¶
Click to show internal directories.
Click to hide internal directories.