parse

package
v0.0.0-...-1a9dce7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(req *http.Request) (map[string]interface{}, error)

func DefaultResolver

func DefaultResolver(typeName string, apiContext *types.APIContext) error

func IsBrowser

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

func Parse

func Parse(rw http.ResponseWriter, req *http.Request, schemas *types.Schemas, urlParser URLParser, resolverFunc ResolverFunc) (*types.APIContext, error)

func QueryOptions

func QueryOptions(apiContext *types.APIContext, schema *types.Schema) types.QueryOptions

func ReadBody

func ReadBody(req *http.Request) (map[string]interface{}, error)

func ValidateMethod

func ValidateMethod(request *types.APIContext) error

Types

type Decode

type Decode func(interface{}) error

type DefaultSubContextAttributeProvider

type DefaultSubContextAttributeProvider struct {
}

func (*DefaultSubContextAttributeProvider) Create

func (d *DefaultSubContextAttributeProvider) Create(apiContext *types.APIContext, schema *types.Schema) map[string]interface{}

func (*DefaultSubContextAttributeProvider) Query

type ParsedURL

type ParsedURL struct {
	Version          *types.APIVersion
	SchemasVersion   *types.APIVersion
	Type             string
	ID               string
	Link             string
	Method           string
	Action           string
	SubContext       map[string]string
	SubContextPrefix string
	Query            url.Values
}

func DefaultURLParser

func DefaultURLParser(schemas *types.Schemas, url *url.URL) (ParsedURL, error)

type ResolverFunc

type ResolverFunc func(typeName string, context *types.APIContext) error

type URLParser

type URLParser func(schema *types.Schemas, url *url.URL) (ParsedURL, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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