Documentation ¶
Index ¶
- func NewGoroutineAwareTestReporter(t gomock.TestReporter) gomock.TestReporter
- type FuncProcessor
- type MockGateway
- type SingleRouteRouter
- type SingleUserAuthProvider
- func (p *SingleUserAuthProvider) Info(ctx context.Context, authData map[string]interface{}) (newAuthData map[string]interface{}, err error)
- func (p *SingleUserAuthProvider) Login(ctx context.Context, authData map[string]interface{}) (principalID string, newAuthData map[string]interface{}, err error)
- func (p *SingleUserAuthProvider) Logout(ctx context.Context, authData map[string]interface{}) (newAuthData map[string]interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoroutineAwareTestReporter ¶ added in v1.1.0
func NewGoroutineAwareTestReporter(t gomock.TestReporter) gomock.TestReporter
NewGoroutineAwareTestReporter returns a test reporter that is safe to call in different goroutine. The returned test reporter does not fail immediately in fatal condition, but will panic instead.
Types ¶
type FuncProcessor ¶
func (FuncProcessor) Preprocess ¶
type MockGateway ¶
func NewMockGateway ¶
func (*MockGateway) Request ¶
func (g *MockGateway) Request(method string, body string) *httptest.ResponseRecorder
type SingleRouteRouter ¶
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 ¶
func (r *SingleRouteRouter) POST(body string) *httptest.ResponseRecorder
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(ctx context.Context, authData map[string]interface{}) (newAuthData map[string]interface{}, err error)
Info implements the AuthProvider's Info interface.