toolbox

package
v0.0.0-...-da2f3a4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

The "config" functionality common to many parts of the application. A part of the toolbox (utility) methods for the rest-api-go application. Governed by the license that can be found in the LICENSE file

The "toolbox" functionality common to many parts of the application. A part of the toolbox (utility) methods for the rest-api-go application. Governed by the license that can be found in the LICENSE file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

respondWithError generates JSON formatted response values for error messages

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

respondWithJSON generates JSON formatted response values for non error messages

Types

type Configuration

type Configuration struct {
	Port        int
	Version     string
	ReleaseDate string
	Environment string
	DbHost      string
	DbUser      string
	DbName      string
	DbPassword  string
}

Configuration type, settings common to application

var Conf Configuration

Jump to

Keyboard shortcuts

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