req

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	ID            string
	LoggerContext logrus.Fields
	AuthToken     *auth.Token

	RawRequest  *http.Request
	RawResponse http.ResponseWriter
}

func (*Request) ReadPayload

func (r *Request) ReadPayload(data interface{}) error

func (*Request) WritePayload

func (r *Request) WritePayload(data interface{}) error

type RouteHandler

type RouteHandler interface {
	Route() string
	Execute(Request) error
	VerifyAuthorization(*http.Request, *auth.Token) error
}

type RouteHandlerFunc

type RouteHandlerFunc struct {
	Path        string
	Func        http.HandlerFunc
	Requirement filter.Requirement
}

func (RouteHandlerFunc) Execute

func (h RouteHandlerFunc) Execute(request Request) error

func (RouteHandlerFunc) Route

func (h RouteHandlerFunc) Route() string

func (RouteHandlerFunc) VerifyAuthorization added in v0.7.0

func (h RouteHandlerFunc) VerifyAuthorization(r *http.Request, token *auth.Token) error

type WithAuthenticationRequired

type WithAuthenticationRequired struct{}

func (WithAuthenticationRequired) VerifyAuthorization added in v0.7.0

func (WithAuthenticationRequired) VerifyAuthorization(r *http.Request, token *auth.Token) error

type WithoutAdditionalAuthorization

type WithoutAdditionalAuthorization struct{}

func (WithoutAdditionalAuthorization) VerifyAuthorization added in v0.7.0

func (WithoutAdditionalAuthorization) VerifyAuthorization(r *http.Request, token *auth.Token) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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