Documentation
¶
Index ¶
- Variables
- func BuildViper(path string) (*viper.Viper, error)
- type Config
- type ConfigFilePathResolver
- type ConfigProvider
- type DatabaseConfig
- type Environment
- type FirehoseConfig
- type KMSConfig
- type Parameter
- type RedisConfig
- type Resolver
- type Result
- type SecretsManagerConfig
- type SubordinateCertificate
- type SubordinateCertificateAuthority
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide( ProvideConfigPathResolver, ProvideConfig, ), )
Functions ¶
Types ¶
type Config ¶
type Config struct {
GRPCServerAddress string `mapstructure:"grpc_server_address"`
OCSPServer []string `mapstructure:"ocsp_server"`
Database DatabaseConfig `mapstructure:"database"`
Redis RedisConfig `mapstructure:"redis"`
KMS KMSConfig `mapstructure:"kms"`
Firehose FirehoseConfig `mapstructure:"firehose"`
Domains []string `mapstructure:"domains"`
ACMPCA map[string]SubordinateCertificate `mapstructure:"acm_pca"`
SecretsManager SecretsManagerConfig `mapstructure:"secrets_manager"`
SubordinateMetadata SubordinateCertificateAuthority `mapstructure:"subordinate_ca_metadata"`
Environment Environment `mapstructure:"certificate_authority"`
}
var Configuration *Config
type ConfigFilePathResolver ¶
func ProvideConfigPathResolver ¶
func ProvideConfigPathResolver(e environment.Environment) ConfigFilePathResolver
type ConfigProvider ¶
func NewConfigProviderFromViper ¶
func NewConfigProviderFromViper(v *viper.Viper) ConfigProvider
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver string `mapstructure:"database_driver"`
Table string `mapstructure:"database_table"`
Endpoint string `mapstructure:"database_endpoint"`
ReaderEndpoint string `mapstructure:"database_reader_endpoint"`
User string `mapstructure:"database_user"`
Port int `mapstructure:"database_port"`
Region string `mapstructure:"region"`
SSLMode string `mapstructure:"ssl_mode"`
}
type Environment ¶
type Environment struct {
Local []string `mapstructure:"local"`
Sandbox []string `mapstructure:"sandbox"`
Development []string `mapstructure:"development"`
Staging []string `mapstructure:"staging"`
PreProduction []string `mapstructure:"pre_production"`
Production []string `mapstructure:"production"`
Corporate []string `mapstructure:"corporate"`
}
type FirehoseConfig ¶
type Parameter ¶
type Parameter struct {
fx.In
Environment environment.Environment
PathResolver ConfigFilePathResolver
}
type RedisConfig ¶
type Resolver ¶
type Resolver struct {
Environment environment.Environment
Template string
}
type Result ¶
type Result struct {
fx.Out
RawConfig *Config
ConfigProvider ConfigProvider
}
func ProvideConfig ¶
type SecretsManagerConfig ¶
type SubordinateCertificate ¶
type SubordinateCertificateAuthority ¶
type SubordinateCertificateAuthority struct {
BaseDirectory string `mapstructure:"directory"`
Country string `mapstructure:"country"`
Province string `mapstructure:"province"`
Locality string `mapstructure:"locality"`
Organization string `mapstructure:"organization"`
OrganizationUnit string `mapstructure:"organization_unit"`
Email string `mapstructure:"email"`
SigningAlgorithm string `mapstructure:"signing_algorithm"`
KeyAlgorithm string `mapstructure:"key_algorithm"`
KeySize int `mapstructure:"key_size"`
}
Click to show internal directories.
Click to hide internal directories.