response

package
v0.0.0-...-d58163c Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteCustomJSON

func WriteCustomJSON(respWriter http.ResponseWriter, resp interface{})

WriteCustomJSON will write the custom response to the http response writer as json

func WriteError

func WriteError(respWriter http.ResponseWriter, errorString string)

WriteError will write the passed error to the http response writer

func WriteSuccess

func WriteSuccess(respWriter http.ResponseWriter, optionalMessage string)

WriteSuccess will write the a success status and optional message to the http response writer

Types

type SGTCustomResponse

type SGTCustomResponse map[string]interface{}

SGTCustomResponse is an alias for a map that allows for storing custom endpoint response values

Jump to

Keyboard shortcuts

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