Documentation ¶
Index ¶
- Constants
- func GetCache() *cache.Cache
- func GetDbAdminConnection() *sql.DB
- func GetDbConnection(name string) *sql.DB
- func GetDbUsers() map[string]map[string]string
- func GetEnv() string
- func GetNoCachedDbConnection(name string) *sql.DB
- func GetNoCachedDbUsers() map[string]map[string]string
- func GetNoCachedString(key string) string
- func GetString(key string) string
- func InitConfigFile(path string)
Constants ¶
const ( KEY_DB_USERS = "db_users" KEY_DB_URI_TEMPLATE = "db-uri-template" KEY_PASSWORD = "password" KEY_JWT_SECRET = "jwt-secret" PREFIX_TOKEN = "Bearer " DB_DRIVER_NAME = "postgres" DB_ADMIN_ROLE = "db-admin-role" )
Variables ¶
This section is empty.
Functions ¶
func GetCache ¶
func GetCache() *cache.Cache
GetCache retrieves the *cache.Cache for your Application
func GetDbAdminConnection ¶ added in v0.1.1
GetDbAdminConnection retrieves *sql.DB Cache use
func GetDbConnection ¶
GetDbConnection retrieves *sql.DB Cache use
func GetDbUsers ¶
GetDbUsers retrieves map with iformation about DB user. example: map{postgres: {name: postgres, password: postgres_user_password}} Cache use
func GetNoCachedDbConnection ¶
GetNoCachedDbConnection retrieves *sql.DB Cache doesn't use
func GetNoCachedDbUsers ¶
GetNoCachedDbUsers retrieves map with iformation about DB user. example: map{postgres: {name: postgres, password: postgres_user_password}} Cache doesn't use
func GetNoCachedString ¶
GetNoCachedString returns without cache the value associated with the key as a string.
func GetString ¶
GetString retrieves the string value of the config variable named by the key. If string value have in cache then retrieves from cache
func InitConfigFile ¶ added in v0.1.1
func InitConfigFile(path string)
Init config file from the config paths
Types ¶
This section is empty.