config

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

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

Go to latest
Published: Jan 22, 2022 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 Config

type Config struct {
	Postgres PostgresConfig
	HTTP     HTTPConfig
	Redis    RedisConfig
	State    StateConfig
	ApiKey   string
}

configuration struct

func Init

func Init(configDir string, local bool) (*Config, error)

get variables from yaml and env files

type HTTPConfig

type HTTPConfig struct {
	Host           string
	Port           string
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	MaxHeaderBytes int
}

http server vars

type PostgresConfig

type PostgresConfig struct {
	Host     string
	Port     string
	Username string
	DBName   string
	SSLMode  string
	Password string
}

postgres vars

type RedisConfig

type RedisConfig struct {
	Addr string
}

redis cache vars

type StateConfig

type StateConfig struct {
	DataBase string
}

Jump to

Keyboard shortcuts

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