cfg

package
v0.0.0-...-1f6e3fe Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Token string        `validate:"required"`
	TTL   time.Duration `validate:"required"`
}

type Config

type Config struct {
	JWT Auth     `validate:"required"`
	DB  Database `validate:"required"`
}

func Load

func Load(getEnv envFetcher) (*Config, error)

type Database

type Database struct {
	Host          string `validate:"required"`
	User          string `validate:"required"`
	Password      string `validate:"required"`
	Port          string `validate:"required,numeric"`
	Schema        string `validate:"required"`
	EnableLogging bool
}

Jump to

Keyboard shortcuts

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