config

package
v0.0.0-...-44226c5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 4 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 {
	ConfigPath string   `env:"CONFIG_PATH" yaml:"config_path"`
	ConfigSrc  string   `env:"CONFIG_SRC" yaml:"config_src"`
	DB         DBConfig `envPrefix:"DB_" yaml:"db"`
}

func Default

func Default() *Config

func (*Config) Exists

func (c *Config) Exists() bool

func (*Config) Parse

func (c *Config) Parse() error

type DBConfig

type DBConfig struct {
	Driver string `env:"DRIVER" yaml:"driver"` // Currently supported: `mysql`, `sqlite3`
	DSN    string `env:"DSN" yaml:"dsn"`
}

Jump to

Keyboard shortcuts

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