parse

package
v0.0.0-...-eef2c6e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: Apache-2.0 Imports: 14 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

func Version

func Version(schemas *types.Schemas, path string) *types.APIVersion

Types

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          string
	Type             string
	ID               string
	Link             string
	Method           string
	Action           string
	SubContext       map[string]string
	SubContextPrefix string
}

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