mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	mock.Mock
}

Authenticator is an autogenerated mock type for the Authenticator type

func (*Authenticator) Authenticate

func (_m *Authenticator) Authenticate(authHeader string) (map[string]any, error)

Authenticate provides a mock function with given fields: authHeader

type Authorizer

type Authorizer struct {
	mock.Mock
}

Authorizer is an autogenerated mock type for the Authorizer type

func (*Authorizer) Authorize

func (_m *Authorizer) Authorize(policyNames []string, claims map[string]any) (string, error)

Authorize provides a mock function with given fields: policyNames, claims

func (*Authorizer) IsAnonymousAllowed

func (_m *Authorizer) IsAnonymousAllowed(matchedPolicies []models.RoutePolicy, method string) bool

IsAnonymousAllowed provides a mock function with given fields: matchedPolicies, method

type Handler

type Handler struct {
	mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func (*Handler) ServeHTTP

func (_m *Handler) ServeHTTP(_a0 http.ResponseWriter, _a1 *http.Request)

ServeHTTP provides a mock function with given fields: _a0, _a1

type ResponseWriter

type ResponseWriter struct {
	mock.Mock
}

ResponseWriter is an autogenerated mock type for the ResponseWriter type

func (*ResponseWriter) Header

func (_m *ResponseWriter) Header() http.Header

Header provides a mock function with given fields:

func (*ResponseWriter) Write

func (_m *ResponseWriter) Write(_a0 []byte) (int, error)

Write provides a mock function with given fields: _a0

func (*ResponseWriter) WriteHeader

func (_m *ResponseWriter) WriteHeader(statusCode int)

WriteHeader provides a mock function with given fields: statusCode

type RouteMatcher

type RouteMatcher struct {
	mock.Mock
}

RouteMatcher is an autogenerated mock type for the RouteMatcher type

func (*RouteMatcher) MatchRoutePolicies

func (_m *RouteMatcher) MatchRoutePolicies(path string, method string) ([]models.RoutePolicy, error)

MatchRoutePolicies provides a mock function with given fields: path, method

Jump to

Keyboard shortcuts

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