config

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: BSD-3-Clause-Clear Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DevMode  bool                                     `mapstructure:"dev_mode"`
	DB       db.Config                                `yaml:"db"`
	Server   server.Config                            `yaml:"server"`
	Logger   logger.Config                            `yaml:"logger"`
	Services map[string]serviceregistry.ServiceConfig `` /* 241-byte string literal not displayed */
}

func LoadConfig

func LoadConfig(key string, file string) (*Config, error)

LoadConfig Load config with viper.

func (*Config) LogValue added in v0.4.7

func (c *Config) LogValue() slog.Value

type Error

type Error string
const (
	ErrLoadingConfig       Error = "error loading config"
	ErrUnmarshallingConfig Error = "error unmarshalling config"
	ErrSettingConfig       Error = "error setting config"
)

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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