config

package
v0.0.0-...-83f4222 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 3 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 {
	Server   Server
	Postgres Postgres
}

Config

func GetConfig

func GetConfig() *Config

Get the config file

type Postgres

type Postgres struct {
	PostgresqlHost     string `env:"POSTGRES_HOST"`
	PostgresqlUser     string `env:"POSTGRES_USER"`
	PostgresqlPassword string `env:"POSTGRES_PASSWORD"`
	PostgresqlDbname   string `env:"POSTGRES_DB"`
}

Postgresql config

type Server

type Server struct {
	Port         string `env:"PORT"`
	JwtSecretKey string `env:"JWT_SECRET_KEY"`
	ReadTimeout  int    `env:"READ_TIMEOUT"`
	WriteTimeout int    `env:"WRITE_TIMEOUT"`
	IdleTimeout  int    `env:"IDLE_TIMEOUT"`
}

Server config

Jump to

Keyboard shortcuts

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