config

package
v0.0.0-...-b0ec221 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 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 Config

type Config struct {
	Srv Server   `yaml:"server"`
	Pg  Postgres `yaml:"postgres"`
	Log Logrus   `yaml:"logrus"`
	JWT JWT      `yaml:"jwt"`
}

func NewConfig

func NewConfig(filePath string) (*Config, error)

type JWT

type JWT struct {
	Expire time.Duration `yaml:"expire"`
	Key    string        `yaml:"key"`
}

type Logrus

type Logrus struct {
	LogLevel string `yaml:"log_level"`
}

type Postgres

type Postgres struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DBName   string `yaml:"dbname"`
	SSLMode  string `yaml:"sslmode"`
}

type Server

type Server struct {
	BindAddr string `yaml:"bind_addr"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳