response

package
v0.0.0-...-9b8094e Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, status int, message string, err error)

Sends an error response without notifying new relic

func Success

func Success(w http.ResponseWriter)

Sends a standard 200 response with a generic body

func SuccessWithBody

func SuccessWithBody(w http.ResponseWriter, body interface{})

Sends a 200 response with JSON representation of provided body

Types

type IdStruct

type IdStruct struct {
	Id int `json:"id"`
}

type StatusStruct

type StatusStruct struct {
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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