Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFlag = &cli.StringFlag{ Name: configCLIName, Usage: "The path to the configuration file.", Value: "config.yaml", Sources: cli.EnvVars("CONFIG"), TakesFile: true, OnlyOnce: true, Local: true, }
ConfigFlag for CLI to load the configuration file
Functions ¶
Types ¶
type Config ¶
type Config struct {
LogLevel LogLevel `yaml:"logLevel,omitempty" json:"logLevel,omitempty"`
Events EventsConfig `yaml:"events" json:"events"`
Storage PostgreSQLConfig `yaml:"storage" json:"storage"`
}
func (*Config) JSONSchema ¶
func (cfg *Config) JSONSchema() *jsonschema.Schema
type EventsConfig ¶
type FromEnv ¶
type FromEnv struct {
Content string `yaml:"-" json:"-" jsonschema:"-"`
}
func (FromEnv) JSONSchema ¶
func (fe FromEnv) JSONSchema() *jsonschema.Schema
func (*FromEnv) MarshalYAML ¶
type PostgreSQLConfig ¶
type PostgreSQLConfig struct {
// The PostgreSQL DSN to persist data. Example: postgres://user:secret@localhost:5432/mulval
DSN string `yaml:"dsn" json:"dsn"`
// An optional schema to store data into. Example: mulval
Schema string `yaml:"schema,omitempty" json:"schema,omitempty"`
// If turned on, run the PostgreSQL migrations before starting.
Migrate bool `yaml:"migrate,omitempty" json:"migrate,omitempty"`
// The minimum connections to the PostgreSQL pool.
// Default to 4.
MinConns int32 `yaml:"minConns,omitempty" json:"minConns,omitempty" jsonschema:"default=4"`
// The maximum connections to the PostgreSQL pool.
// If none set, defaults to minConns.
MaxConns int32 `yaml:"maxConns,omitempty" json:"maxConns,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.