handlertest

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncProcessor added in v0.4.1

type FuncProcessor struct {
	Mockfunc func(*router.Payload)
}

func (FuncProcessor) Preprocess added in v0.4.1

func (p FuncProcessor) Preprocess(payload *router.Payload, _ *router.Response) int

type MockGateway added in v0.9.0

type MockGateway router.Gateway

func NewMockGateway added in v0.9.0

func NewMockGateway(pattern string, path string, methods []string, handler router.Handler, prepareFunc func(*router.Payload)) *MockGateway

func (*MockGateway) Request added in v0.9.0

func (g *MockGateway) Request(method string, body string) *httptest.ResponseRecorder

type SingleRouteRouter

type SingleRouteRouter router.Router

SingleRouteRouter is a router that only serves with a single handler, regardless of the requested action.

func NewSingleRouteRouter

func NewSingleRouteRouter(handler router.Handler, prepareFunc func(*router.Payload)) *SingleRouteRouter

NewSingleRouteRouter creates a SingleRouteRouter, mapping the specified handler as the only route.

func (*SingleRouteRouter) POST

POST invoke the only route mapped on the SingleRouteRouter.

type SingleUserAuthProvider

type SingleUserAuthProvider struct {
	// contains filtered or unexported fields
}

SingleUserAuthProvider is an AuthProvider that only authenticates a single user if the auth data provided contains the required principal name.

func NewSingleUserAuthProvider

func NewSingleUserAuthProvider(providerName string, principalName string) *SingleUserAuthProvider

NewSingleUserAuthProvider creates a new instance of SingleUserAuthProvider.

func (*SingleUserAuthProvider) Info

func (p *SingleUserAuthProvider) Info(authData map[string]interface{}) (newAuthData map[string]interface{}, err error)

Info implements the AuthProvider's Info interface.

func (*SingleUserAuthProvider) Login

func (p *SingleUserAuthProvider) Login(authData map[string]interface{}) (principalID string, newAuthData map[string]interface{}, err error)

Login implements the AuthProvider's Login interface.

func (*SingleUserAuthProvider) Logout

func (p *SingleUserAuthProvider) Logout(authData map[string]interface{}) (newAuthData map[string]interface{}, err error)

Logout implements the AuthProvider's Logout interface.

Jump to

Keyboard shortcuts

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