writer

package
v0.0.0-...-36fa105 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r *http.Request, d interface{}) error

Decode function

func Encode

func Encode(w http.ResponseWriter, r *http.Request, data interface{}) error

Encode function

func Err

func Err(w http.ResponseWriter, r *http.Request, m ErrorRes)

Err return a error based on the ErroRes struct format

Types

type ErrorRes

type ErrorRes struct {
	Error  string
	Detail interface{}
}

ErrorRes struct

Jump to

Keyboard shortcuts

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