config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 7 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 {
	Env        string `koanf:"env"`
	Storage    `koanf:"storage"`
	HTTPServer `koanf:"http_server"`
}

func Load

func Load() (*Config, error)

type HTTPServer

type HTTPServer struct {
	Address       string        `koanf:"address"`
	Timeout       time.Duration `koanf:"timeout"`
	IdleTimeout   time.Duration `koanf:"idle_timeout"`
	TemplatesPath string        `koanf:"templates_path"`
	Mode          string        `koanf:"mode"`
	User          string        `koanf:"user"`
	Password      string        `koanf:"password" env-required:"true" env:"PC_INFO_PASSWORD"`
}

type Storage

type Storage struct {
	Path string `koanf:"path"`
}

Jump to

Keyboard shortcuts

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