parser

package
v0.0.0-...-be0592b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAttribute

func ParseAttribute(req *restful.Request, engine *backbone.Engine) (*meta.AuthAttribute, error)

func ParseCommonInfo

func ParseCommonInfo(requestHeader *http.Header) (*meta.CommonInfo, error)

ParseCommonInfo get common info from req, aims at avoiding too much repeat code

func ParseUserInfo

func ParseUserInfo(requestHeader *http.Header) (*meta.UserInfo, error)

Types

type RequestContext

type RequestContext struct {
	// http header
	Header http.Header
	// http method
	Method string
	// request's url path
	URI string
	// elements parsed from url, started with api field
	// 0: api field
	// 1: version field
	// 2: action field
	// >=3: resource fields
	Elements []string
	// http request body contents.
	Body []byte

	Metadata metadata.Metadata
}

Jump to

Keyboard shortcuts

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