api

package
v3.0.3-beta.6+incompat... Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HttpBodySizeLimit = 1048576

Variables

This section is empty.

Functions

func DecodeBody

func DecodeBody(i interface{}, r *http.Request) error

DecodeBody unmarshals the JSON object in the HTTP request body to an object.

func ReadBody

func ReadBody(r *http.Request) ([]byte, error)

ReadBody returns the HTTP request body.

func WriteBody

func WriteBody(r *http.Request, body []byte)

WriteBody creates a new HTTP request body in an existing HTTP request.

Types

type Endpoint

type Endpoint struct {
	Name        string
	Path        string
	Method      string
	Protected   bool
	HandlerFunc http.HandlerFunc
}

Endpoint is a URL path-to-handler-function mapping.

type Endpoints

type Endpoints []Endpoint

Endpoints is a collection of URL path-to-handler-function mappings.

Directories

Path Synopsis
v1
v2

Jump to

Keyboard shortcuts

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