config

package
v0.0.0-...-b235061 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

config/config.go

Index

Constants

This section is empty.

Variables

Set provides a Wire provider for the Config struct.

Functions

func LoadConfig

func LoadConfig(v *viper.Viper) (interfaces.Config, error)

LoadConfig unmarshals the configuration from Viper into the Config struct.

func NewViper

func NewViper(configPath ConfigPath) (*viper.Viper, error)

NewConfig creates a new Viper instance and loads the configuration from the given path.

Types

type Config

type Config struct {
	LoggerConfig  logging.LoggingConfig `mapstructure:"logger"`
	ServiceConfig service.ServiceConfig `mapstructure:"service"`
}

Config is the configuration for the config package.

func (*Config) GetLoggingConfig

func (c *Config) GetLoggingConfig() interfaces.LoggingConfig

GetLoggerConfig returns the logger configuration.

func (*Config) GetServiceConfig

func (c *Config) GetServiceConfig() interfaces.ServiceConfig

GetServiceConfig returns the service configuration.

type ConfigPath

type ConfigPath string

func ProvideDefaultConfig

func ProvideDefaultConfig() ConfigPath

func (ConfigPath) String

func (c ConfigPath) String() string

Jump to

Keyboard shortcuts

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