Help us shape the future of Go! Take the 2026 Go Developer Survey

rfc7807

package module
v0.0.0-...-49c08d9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTemplate = `` /* 171-byte string literal not displayed */

Functions

This section is empty.

Types

type Extension

type Extension struct {
	Key   string
	Value interface{}
}

func Ext

func Ext(key string, value interface{}) *Extension

type RFC7807

type RFC7807 struct {
	URL string
	// contains filtered or unexported fields
}

func New

func New(url string) *RFC7807

func (*RFC7807) Doc

func (rfc7807 *RFC7807) Doc(title, description string) (problemHandlerFunc, error)

func (*RFC7807) Error

func (rfc7807 *RFC7807) Error(w http.ResponseWriter, title string, status int, detail string, extensions ...*Extension)

func (*RFC7807) HtmlDoc

func (rfc7807 *RFC7807) HtmlDoc(title string, html []byte) problemHandlerFunc

func (*RFC7807) MarkdownDoc

func (rfc7807 *RFC7807) MarkdownDoc(title string, markdown []byte) problemHandlerFunc

func (*RFC7807) ServeHTTP

func (rfc7807 *RFC7807) ServeHTTP(aWriter http.ResponseWriter, aRequest *http.Request)

func (*RFC7807) TemplateDoc

func (rfc7807 *RFC7807) TemplateDoc(title string, description string, templateStr string) (problemHandlerFunc, error)

Jump to

Keyboard shortcuts

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