config

package
v0.0.0-...-e764b3d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapters

type Adapters struct {
	Secondary Secondary `yaml:"secondary"`
	Primary   Primary   `yaml:"primary"`
}

type Config

type Config struct {
	Adapters Adapters `yaml:"adapters"`
}

type Database

type Database struct {
	Type     string `yaml:"type"`
	Host     string `env:"RESTAURANT_HOST"     env-required:"true" yaml:"host"`
	Port     string `env:"RESTAURANT_PORT"     env-required:"true" yaml:"port"`
	User     string `env:"RESTAURANT_USER"     env-required:"true" yaml:"user"`
	Password string `env:"RESTAURANT_PASSWORD" env-required:"true" yaml:"password"`
	Name     string `yaml:"name"`
}

type Databases

type Databases struct {
	Restaurant Database `yaml:"restaurant"`
}

type HttpAdapter

type HttpAdapter struct {
	Port              string        `yaml:"port"`
	ReadHeaderTimeout time.Duration `yaml:"readHeaderTimeout"`
	WriteTimeout      time.Duration `yaml:"writeTimeout"`
	ReadTimeout       time.Duration `yaml:"readTimeout"`
	ShutdownTimeout   time.Duration `yaml:"shutdownTimeout"`
}

type Primary

type Primary struct {
	HttpAdapter HttpAdapter `yaml:"httpAdapter"`
}

type Secondary

type Secondary struct {
	Databases Databases `yaml:"databases"`
}

Jump to

Keyboard shortcuts

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