config

package
v0.0.0-...-9ff6c00 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	SwaggerUIPath string `yaml:"swagger_ui_path,omitempty"`
}

Application holds application configuration details

type Auth

type Auth struct {
	Secret           string `yaml:"secret,omitempty"`
	ClientID         string `yaml:"clientId,omitempty"`
	SigningAlgorithm string `yaml:"signing_algorithm,omitempty"`
}

Auth holds data necessery for Auth0 and JWT verification

type Configuration

type Configuration struct {
	Server *Server      `yaml:"server,omitempty"`
	DB     *Database    `yaml:"database,omitempty"`
	Auth   *Auth        `yaml:"jwt,omitempty"`
	App    *Application `yaml:"application,omitempty"`
}

Configuration holds data necessery for configuring application

func Load

func Load(path string) (*Configuration, error)

Load returns Configuration struct instance

type Database

type Database struct {
	PSN        string `yaml:"psn,omitempty"`
	LogQueries bool   `yaml:"log_queries,omitempty"`
	Timeout    int    `yaml:"timeout_seconds,omitempty"`
}

Database holds data necessery for database configuration

type Server

type Server struct {
	Port         string `yaml:"port,omitempty"`
	Debug        bool   `yaml:"debug,omitempty"`
	ReadTimeout  int    `yaml:"read_timeout_seconds,omitempty"`
	WriteTimeout int    `yaml:"write_timeout_seconds,omitempty"`
}

Server holds data necessery for server configuration

Jump to

Keyboard shortcuts

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