config

package
Version: v0.0.0-...-7df1e21 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 4 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 {
	Database DatabaseConfig `json:"database"`

	OperatorToken string `env:"OPERATOR_TOKEN" json:"operator_token"`
}

Config contains the complete service configuration

func NewTestConfig

func NewTestConfig() *Config

NewTestConfig return a config object with test settings

func ReadConfig

func ReadConfig(file string) *Config

ReadConfig reads a json file and overwrite with ENV vars

type DatabaseConfig

type DatabaseConfig struct {
	Driver string `env:"DATABASE_DRIVER" json:"driver"`
	Path   string `env:"DATABASE_PATH" json:"path"`
}

DatabaseConfig by gorm settings

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL