config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: GPL-3.0 Imports: 6 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 `yaml:"server"`

	TBA struct {
		URL    string `yaml:"URL"`
		APIKey string `yaml:"apiKey"`
	} `yaml:"tba"`

	DSN string `yaml:"dsn"`
}

Config holds information about how the peregrine backend is configured.

func Open

func Open(basePath string) (Config, error)

Open opens basePath/etc/config.$GO_ENV.json as a Config

type Server

type Server struct {
	HTTPAddress  string `yaml:"httpAddress"`
	HTTPSAddress string `yaml:"httpsAddress"`
	KeyFile      string `yaml:"keyFile"`
	CertFile     string `yaml:"certFile"`
	Origin       string `yaml:"origin"`
	Year         int    `yaml:"year"`
	LogJSON      bool   `yaml:"logJSON"`
	Secret       string `yaml:"secret"`
}

Server holds information about the peregrine backend HTTP server.

Jump to

Keyboard shortcuts

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