config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = &Config{}

Cfg is the global config

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		HTTP struct {
			Addr string `mapstructure:"addr"`
		}
		GRPC struct {
			Addr string `mapstructure:"addr"`
		}
		Debug struct {
			Addr string `mapstructure:"addr"`
		}
	}

	Data struct {
		Database struct {
			DSN string `mapstructure:"dsn"`
		}
	}
}

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader is the config loader

func NewLoader

func NewLoader() *Loader

NewLoader creates a new Loader instance.

func (*Loader) MustLoad

func (loader *Loader) MustLoad()

MustLoad loads the config from the config file and environment variables

Jump to

Keyboard shortcuts

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