config

package
v0.0.0-...-fd95499 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 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 Configuration

type Configuration struct {
	Server      *Server      `yaml:"server,omitempty"`
	DB          *Database    `yaml:"database,omitempty"`
	UserRoles   []string     `yaml:"user_roles,omitempty"`
	URLServices *URLServices `yaml:"url_services"`
}

Configuration holds data for configuring application

func Load

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

Load returns Configuration struct

type Database

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

Database holds data 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 for server configuration

type URLServices

type URLServices struct {
	ClientsSvcBaseURL string `yaml:"client_svc_base_url"`
}

URLServices url address other services

Jump to

Keyboard shortcuts

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