parse

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 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 IsBrowser

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

func MatchBrowser

func MatchBrowser(req *http.Request, _ *mux.RouteMatch) bool

func MatchNotBrowser

func MatchNotBrowser(req *http.Request, match *mux.RouteMatch) bool

func Parse

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

func ReadBody

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

func Set

func Set(v Vars) mux.MatcherFunc

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
	Namespace  string
	Link       string
	Method     string
	Action     string
	Prefix     string
	SubContext map[string]string
	Query      url.Values
}

func MuxURLParser

func MuxURLParser(req *http.Request) (ParsedURL, error)

type Parser

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

type URLParser

type URLParser func(req *http.Request) (ParsedURL, error)

type Vars

type Vars struct {
	Type      string
	Name      string
	Namespace string
	Link      string
	Prefix    string
	Action    string
}

Jump to

Keyboard shortcuts

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