rest

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package rest provides REST API common logic & variable

Index

Constants

View Source
const (
	// ContentType represents a HTTP header name "Content-Type"
	ContentType = "Content-Type"

	// ApplicationJSON represents a HTTP content type "application/json"
	ApplicationJSON = "application/json"

	// ProblemJSON represents a HTTP content type "application/problem+json"
	ProblemJSON = "application/problem+json"

	// TextPlain represents a HTTP content type "text/plain"
	TextPlain = "text/plain"

	// CharsetUTF8 represents a UTF-8 charset for HTTP response "charset=UTF-8"
	CharsetUTF8 = "charset=UTF-8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(http.ResponseWriter, *http.Request) (code int, err error)

func HandlerToRestFunc

func HandlerToRestFunc(f http.HandlerFunc) Func

Jump to

Keyboard shortcuts

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