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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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