parse

package
v2.0.0-...-76fd7a6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(req *http.Request) (types.APIObject, error)

func GetAPIContext

func GetAPIContext(ctx context.Context) *types.APIRequest

func IsBrowser

func IsBrowser(req *http.Request, checkAccepts bool) bool

func Parse

func Parse(apiOp *types.APIRequest, urlParser URLParser) error

func QueryOptions

func QueryOptions(apiOp *types.APIRequest, schema *types.Schema) types.QueryOptions

func ReadBody

func ReadBody(req *http.Request) (types.APIObject, error)

func ValidateMethod

func ValidateMethod(request *types.APIRequest) error

Types

type Decode

type Decode func(interface{}) error

type ParsedURL

type ParsedURL struct {
	Type       string
	Name       string
	Link       string
	Method     string
	Action     string
	Prefix     string
	SubContext map[string]string
	Query      url.Values
}

func MuxURLParser

func MuxURLParser(rw http.ResponseWriter, req *http.Request, schemas *types.Schemas) (ParsedURL, error)

type Parser

type Parser func(apiOp *types.APIRequest, urlParser URLParser) error

type URLParser

type URLParser func(rw http.ResponseWriter, req *http.Request, schemas *types.Schemas) (ParsedURL, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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