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 Stage
- type SubordinateCertificate
- type SubordinateCertificateAuthority
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide( ProvideConfigPathResolver, ProvideConfig, ProvideEnvironment, ), )
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 Stage `mapstructure:"certificate_authority"`
}
var Configuration *Config
type ConfigFilePathResolver ¶
func ProvideConfigPathResolver ¶
func ProvideConfigPathResolver(e 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 ¶
func ProvideEnvironment ¶
func ProvideEnvironment() Environment
type FirehoseConfig ¶
type Parameter ¶
type Parameter struct {
fx.In
Environment Environment
PathResolver ConfigFilePathResolver
}
type RedisConfig ¶
type Resolver ¶
type Resolver struct {
Environment Environment
Template string
}
type Result ¶
type Result struct {
fx.Out
RawConfig *Config
ConfigProvider ConfigProvider
}
func ProvideConfig ¶
type SecretsManagerConfig ¶
type Stage ¶
type Stage 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 SubordinateCertificate ¶
type SubordinateCertificate struct {
Region string `mapstructure:"region"`
CaArn string `mapstructure:"ca_arn"`
CaActiveDay int `mapstructure:"ca_active_day"`
AssumeRole bool `mapstructure:"assume_role"`
RoleArn string `mapstructure:"role_arn"`
RootCa bool `mapstructure:"root_ca"`
Default bool `mapstructure:"default"`
}
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.