config

package
v0.0.0-...-07d50f2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prod env
	Prod env = "prod"
	// Stage env
	Stage env = "stage"
	// Test env
	Test env = "test"
	// Dev env
	Dev env = "dev"
	// Trace enabled env
	Trace env = "trace"
)

Variables

This section is empty.

Functions

func LogFileName

func LogFileName() string

LogFileName returns the name of the file to writes logs to

Types

type Config

type Config struct {
	Global   global
	Database database
	Server   server
}

Config represents a shared global configuration object

func Init

func Init() (*Config, error)

Init Initializes application configuration

func (Config) DbType

func (c Config) DbType() string

DbType returns the configured database type for the application

func (Config) ServerAddress

func (c Config) ServerAddress() string

ServerAddress returns the address to listen on

Jump to

Keyboard shortcuts

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