config

package
v1.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config defines the environment variable and command-line flags supported by this service and includes default values for particular fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr                   string   `env:"BIND_ADDR"                       flag:"bind-addr"                         flagDesc:"Bind address"`
	Collection                 string   `env:"MONGODB_COLLECTION"              flag:"mongodb-collection"                flagDesc:"MongoDB collection for data"`
	Database                   string   `env:"MONGODB_DATABASE"                flag:"mongodb-database"                  flagDesc:"MongoDB database for data"`
	MongoDBURL                 string   `env:"MONGODB_URL"                     flag:"mongodb-url"                       flagDesc:"MongoDB server URL"`
	DomainWhitelist            string   `env:"DOMAIN_WHITELIST"                flag:"domain-whitelist"                  flagDesc:"List of Valid Domains"`
	PaymentsWebURL             string   `` /* 126-byte string literal not displayed */
	PaymentsAPIURL             string   `` /* 126-byte string literal not displayed */
	GovPayURL                  string   `env:"GOV_PAY_URL"                     flag:"gov-pay-url"                       flagDesc:"URL used to make calls to GovPay"`
	GovPayBearerTokenTreasury  string   `` /* 167-byte string literal not displayed */
	GovPayBearerTokenChAccount string   `` /* 174-byte string literal not displayed */
	ExpiryTimeInMinutes        string   `` /* 140-byte string literal not displayed */
	BrokerAddr                 []string `env:"KAFKA_BROKER_ADDR"               flag:"broker-addr"                       flagDesc:"Kafka broker address"`
	SchemaRegistryURL          string   `env:"SCHEMA_REGISTRY_URL"             flag:"schema-registry-url"               flagDesc:"Schema registry url"`
	ChsAPIKey                  string   `env:"CHS_API_KEY"                     flag:"chs-api-key"                       flagDesc:"API access key"`
}

Config defines the configuration options for this service.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a pointer to a Config instance that has been populated with default values.

func Get

func Get() (*Config, error)

Get returns a pointer to a Config instance that has been populated with values provided by the environment or command-line flags, or with default values if none are provided.

Jump to

Keyboard shortcuts

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