status

package
v0.0.0-...-1cc1a95 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteErrorResponse

func WriteErrorResponse(w http.ResponseWriter, err error)

Types

type HttpStatus

type HttpStatus struct {
	Status  int         `json:"status"`
	Message string      `json:"message"`
	Body    interface{} `json:"body"`
}

func Http200

func Http200(message string, body interface{}) (int, HttpStatus)

func Http400

func Http400(message string, body interface{}) (int, HttpStatus)

func Http401

func Http401(message string, body interface{}) (int, HttpStatus)

func Http500

func Http500(message string, body interface{}) (int, HttpStatus)

Jump to

Keyboard shortcuts

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