handler

package
v0.0.0-...-075af76 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mux *mux.Router
)

Mux contains all the HTTP handlers

Functions

func Danger

func Danger(args ...interface{})

Danger will log information with "ERROR" prefix to logger

func Info

func Info(args ...interface{})

Info will log information with "INFO" prefix to logger

func ReportStatus

func ReportStatus(w http.ResponseWriter, success bool, err *data.APIError)

ReportStatus is a helper function to return a JSON response indicating outcome success/failure

func Warning

func Warning(args ...interface{})

Warning will log information with "WARNING" prefix to logger

Types

type Configuration

type Configuration struct {
	Address      string
	RedisURL     string
	ReadTimeout  int64
	WriteTimeout int64
	Static       string
}

Configuration stores config info of server

var Config Configuration

Config captures parsed input from config.json

Jump to

Keyboard shortcuts

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