config

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggerConfig

func NewLoggerConfig(configPath Path, overrides Overrider) (*logger.Config, error)

NewLoggerConfig creates a new LoggerConfig.

Types

type Config

type Config struct {
	FileStoreRoot    string            `json:"file_store_root" yaml:"file_store_root"`
	DefaultDomain    string            `json:"default_domain" yaml:"default_domain"`
	Logging          logger.Config     `json:"logging" yaml:"logging"`
	CA               []string          `json:"ca" yaml:"ca"`
	Insecure         bool              `json:"insecure" yaml:"insecure"`
	TokenDefaults    map[string]string `json:"token_defaults" yaml:"token_defaults"`
	CredentialsStore credentials.Store `json:"-"`
}

Config holds the configuration for the app.

func NewConfig

func NewConfig(configPath Path, log *zerolog.Logger, overrides Overrider) (*Config, error)

NewConfig creates the configuration by reading env & files.

func (*Config) LoadDefaultDomain added in v0.2.0

func (c *Config) LoadDefaultDomain() error

func (*Config) PoliciesRoot added in v0.0.33

func (c *Config) PoliciesRoot() string

func (*Config) ReplHistoryFile added in v0.0.33

func (c *Config) ReplHistoryFile() string

func (*Config) SaveDefaultDomain added in v0.2.0

func (c *Config) SaveDefaultDomain() error

type Overrider

type Overrider func(*Config)

Overrider is a func that mutates configuration.

type Path

type Path string

Path is a string that points to a config file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL