common

package
v0.0.0-...-bff681c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppConfig configuration

AppConfig holds the configuration values from config.json file.

Functions

func GetDBSession

func GetDBSession() *mgo.Session

func ResponseError

func ResponseError(w http.ResponseWriter, err error, message string, code int)

func StartUp

func StartUp()

StartUp loads configurations and connects to DB.

Types

type ErrorData

type ErrorData struct {
	Error      string `json:"error"`
	Message    string `json:"message"`
	HttpStatus int    `json:"status"`
}

type ErrorResponse

type ErrorResponse struct {
	Data ErrorData `json:"data"`
}

Jump to

Keyboard shortcuts

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