Documentation ¶
Index ¶
Constants ¶
const ( EnvServerPort = "server.port" EnvServerHost = "server.host" EnvEnvironment = "env.environment" EnvMainNet = "env.mainnet" EnvRegion = "env.region" EnvVersion = "env.version" EnvCommit = "env.commit" EnvBuildDate = "env.builddate" EnvLogLevel = "log.level" EnvNodeHost = "node.host" EnvNodePort = "node.port" EnvNodeUser = "node.username" EnvNodePassword = "node.password" EnvNodeSSL = "node.usessl" EnvAblyKey = "ably.key" EnvAblyUsername = "ably.username" EnvAblyMaxMessage = "ably.maxmessage" LogDebug = "debug" LogInfo = "info" LogError = "error" LogWarn = "warn" )
Environment variable constants.
Variables ¶
This section is empty.
Functions ¶
func SetDefaults ¶
func SetDefaults()
Types ¶
type BitcoinNode ¶
BitcoinNode config params for connecting to a bitcoin node.
type Config ¶
type Config struct { Logging *Logging Server *Server Deployment *Deployment Node *BitcoinNode Ably *Ably }
Config returns strongly typed config values.
func NewViperConfig ¶
NewViperConfig will setup and return a new viper based configuration handler.
func (*Config) Validate ¶
Validate will check config values are valid and return a list of failures if any have been found.
func (*Config) WithAbly ¶
WithAbly sets up the header client with the type of syncing we wish to do.
func (*Config) WithBitcoinNode ¶
WithBitcoinNode sets up and returns bitcoin node configuration.
func (*Config) WithDeployment ¶
WithDeployment sets up the deployment configuration if required.
func (*Config) WithServer ¶
WithServer will setup the web server configuration if required.
type Deployment ¶
type Deployment struct { Environment string AppName string Region string Version string Commit string BuildDate time.Time MainNet bool }
Deployment contains information relating to the current deployed instance.
func (*Deployment) IsDev ¶
func (d *Deployment) IsDev() bool
IsDev determines if this app is running on a dev environment.
func (*Deployment) String ¶
func (d *Deployment) String() string