config

package
v0.0.0-...-e61a738 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Protocol string `envconfig:"BACKEND_PROTOCOL" required:"true"`
	Host     string `envconfig:"BACKEND_HOST" required:"true"`
	Port     int    `envconfig:"BACKEND_PORT" required:"true"`
}

Backend - current service

type Config

type Config struct {
	Db      Db
	Backend Backend
}

Config

func New

func New() (*Config, error)

New - contructor

type Db

type Db struct {
	Driver   string `envconfig:"DB_DRIVER" required:"true"`
	Host     string `envconfig:"DB_HOST" required:"true"`
	Port     int    `envconfig:"DB_PORT" required:"true"`
	SslMode  string `envconfig:"DB_SSLMODE" required:"true"`
	User     string `envconfig:"DB_USER" required:"true"`
	Password string `envconfig:"DB_PASSWORD" required:"true"`
	Name     string `envconfig:"DB_NAME" required:"true"`
}

Db - current service general db

Jump to

Keyboard shortcuts

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