Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultEnvVar = "ACME_CONFIG"
DefaultEnvVar is the default environment variable the points to the config file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DSN is the data source name (format: https://github.com/go-sql-driver/mysql/#dsn-data-source-name) DSN string // Address is the IP address and port to bind this rest to Address string // BasePrice is the price of registration BasePrice float64 // ExchangeRateBaseURL is the server and protocol part of the URL from which to load the exchange rate ExchangeRateBaseURL string // ExchangeRateAPIKey is the API for the exchange rate API ExchangeRateAPIKey string // contains filtered or unexported fields }
Config defines the JSON format for the config file
func (*Config) BindAddress ¶
BindAddress returns the host and port this service should bind to
func (*Config) ExchangeAPIKey ¶
ExchangeAPIKey returns the DSN
func (*Config) ExchangeBaseURL ¶
ExchangeBaseURL returns the Base URL from which we can load exchange rates
func (*Config) RegistrationBasePrice ¶
RegistrationBasePrice returns the base price for registrations
Click to show internal directories.
Click to hide internal directories.