response

package
v0.0.0-...-8738c73 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK    = "OK"
	StatusError = "Error"
)

Variables

This section is empty.

Functions

func DataResponse

func DataResponse(w http.ResponseWriter, body any, httpStatusCode int) error

func ErrorResponse

func ErrorResponse(w http.ResponseWriter, message string, httpStatusCode int)

Types

type Err

type Err struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

Jump to

Keyboard shortcuts

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