configs

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 1 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 struct {
		ListenAddr      string `default:""`
		Port            int    `default:"80"`
		ResponseHeaders map[string]string
	}
	Database struct {
		Dbname     string `default:""`
		Connection string `default:""`
	}
	GinMode struct {
		Mode string `default:"Debug"`
	}
}

Configuration is stuff that can be configured externally per env variables or config file (config.yml).

func Get

func Get() *Configuration

Get returns the configuration extracted from env variables or config file.

type Error

type Error struct {
	// The general error message
	//
	// required: true
	// example: Unauthorized
	Error string `json:"error"`
	// The http error code.
	//
	// required: true
	// example: 401
	ErrorCode int `json:"errorCode"`
	// The http error code.
	//
	// required: true
	// example: you need to provide a valid access token or user credentials to access this api
	ErrorDescription string `json:"errorDescription"`
}

Error contains error relevant information.

type Version

type Version struct {
	// Version example: 5.2.6
	Version string `json:"version"`

	// Commit: ae9512b6b6feea56a110d59a3353ea3b9c293864
	Commit string `json:"commit"`

	// BuildDate: 2018-02-27T19:36:10.5045044+01:00
	BuildDate string `json:"buildDate"`
}

Version struct

Jump to

Keyboard shortcuts

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