Documentation
¶
Index ¶
Constants ¶
View Source
const ( ENV_PORT = "PORT" ENV_CONSUL_HOST = "CONSUL_HOST" ENV_CONSUL_KEY_FOLDER = "CONSUL_KEY_FOLDER" ENV_CONSUL_KEY_VERSION = "CONSUL_KEY_VERSION" ENV_CONSUL_KEY_FILE = "CONSUL_KEY_FILE" ENV_VAULT_SCHEME = "VAULT_SCHEME" ENV_VAULT_HOST = "VAULT_HOST" ENV_VAULT_TOKEN = "VAULT_TOKEN" ENV_VAULT_MOUNT_PATH = "VAULT_MOUNT_PATH" ENV_VAULT_KEY_PUBLIC_PATH = "VAULT_KEY_PUBLIC_PATH" ENV_VAULT_KEY_PRIVATE_PATH = "VAULT_KEY_PRIVATE_PATH" ENV_VAULT_KEY_VERSION = "VAULT_KEY_VERSION" ENV_GENERATE_RSA_KEYS = "GENERATE_RSA_KEYS" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ReadConfig ¶
func (*Config) ReadVaultKeys ¶
func (*Config) Redis ¶
func (c *Config) Redis() *RedisConfig
func (*Config) WatchConsul ¶
func (c *Config) WatchConsul(env *EnvConsul, newConfigs []WatchConsulBody) error
type Configurator ¶
type Configurator interface {
ConsulWatcher
ReadConfig(env *EnvConsul) error
Redis() *RedisConfig
JWT() *JWTConfig
ReadVaultKeys(vaultClient *vault.Client, env *EnvVault) (*KeysConfig, error)
}
func NewConfig ¶
func NewConfig() Configurator
TODO: replace with ReadConfig instead NewConfig and config.ReadConfig
type ConsulWatcher ¶
type ConsulWatcher interface {
WatchConsul(env *EnvConsul, newConfigs []WatchConsulBody) error
}
type EnvConsul ¶
type EnvConsul struct {
Host string `yaml:"host"`
Key EnvConsulKey `yaml:"key"`
}
type EnvConsulKey ¶
type EnvConsulKey struct {
Folder string `yaml:"folder"`
Version string `yaml:"version"`
File string `yaml:"file"`
}
func (*EnvConsulKey) String ¶
func (e *EnvConsulKey) String() string
type EnvLocal ¶
type EnvVault ¶
type EnvVault struct {
Scheme string `yaml:"scheme"`
Host string `yaml:"host"`
Token string `yaml:"token"`
MountPath string `yaml:"mount_path"`
Key EnvVaultKey `yaml:"key"`
}
type EnvVaultKey ¶
type KeysConfig ¶
type MainConfig ¶
type MainConfig struct {
Redis RedisConfig `yaml:"redis"`
JWT JWTConfig `yaml:"jwt"`
}
type RedisConfig ¶
Click to show internal directories.
Click to hide internal directories.