Documentation
¶
Index ¶
Constants ¶
const ( AppName string = "raster" ConfigDir string = "configs" ConfigFile string = "app" ConfigType string = "yaml" ConfigReadError string = "Fatal error config file" )
Configuration related constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶ added in v0.1.0
type ClientConfig struct {
Logging *logger.ZyLogOptions
}
ClientConfig ...
type Config ¶
type Config struct { Client *ClientConfig DB *DBConfig GRPCD *GRPCDConfig Logging *logger.ZyLogOptions }
Config ...
func New ¶
func New() *Config
New is a constructor that creates the full coniguration data structure for use by our application(s) and client(s) as an in-memory copy of the config data (saving from having to make repeated and somewhat expensive calls to the viper library).
Note that Viper does provide both the AllSettings() and Unmarshall() functions, but these require that you have a struct defined that will be used to dump the Viper config data into. We've already got that set up, so there's no real benefit to switching.
Furthermore, in our case, we're utilizing structs from other libraries to be used when setting those up (see how we initialize the logging component in ./components/logging.go, Setup).
func (*Config) GRPCConnectionString ¶
GRPCConnectionString ...
func (*Config) RedisConnectionString ¶
RedisConnectionString ...
func (*Config) RedixConnectionString ¶
RedixConnectionString ...
type DBConfig ¶
type DBConfig struct { Type string Redis *RedisConfig Redix *RedixConfig }
DBConfig ...
type RedisConfig ¶
RedisConfig ...