response

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBody added in v0.0.34

func GetBody(r *http.Request) (e.Json, error)

func HTTPAlert

func HTTPAlert(w http.ResponseWriter, r *http.Request, message string) error

func HTTPApp

func HTTPApp(r chi.Router, path string, root http.FileSystem)

func HTTPError

func HTTPError(w http.ResponseWriter, r *http.Request, statusCode int, message string) error

func ITEM

func ITEM(w http.ResponseWriter, r *http.Request, statusCode int, dt e.Item) error

func ITEMS

func ITEMS(w http.ResponseWriter, r *http.Request, statusCode int, dt e.Items) error

func JSON

func JSON(w http.ResponseWriter, r *http.Request, statusCode int, dt interface{}) error

func Stream

func Stream(w http.ResponseWriter, r *http.Request, statusCode int, dt interface{}) error

func WriteResponse added in v0.0.52

func WriteResponse(w http.ResponseWriter, statusCode int, e []byte) error

Types

type Result

type Result struct {
	Ok     bool        `json:"ok"`
	Result interface{} `json:"result"`
}

Jump to

Keyboard shortcuts

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