config

package
v0.0.0-...-155fe22 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 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 {
	Server   *ServerOptions   `json:"server"`
	Database *DatabaseOptions `json:"database"`
}

Config holds the application configurations.

func Load

func Load() (*Config, error)

Load loads the configuration.

type DatabaseOptions

type DatabaseOptions struct {
	User     string `json:"user" pg:"user"`
	Password string `json:"password" pg:"password"`
	Host     string `json:"host" pg:"host"`
	Port     int    `json:"port" pg:"port"`
	SSLMode  string `json:"sslmode" pg:"sslmode"`
}

DatabaseOptions holds the database configurations.

type ServerOptions

type ServerOptions struct {
	Address string `json:"address"`
}

ServerOptions holds the server configurations.

Jump to

Keyboard shortcuts

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