mocks

package
v1.27.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthZReq

type AuthZReq struct {
	Principal *models.Principal
	Verb      string
	Resource  string
}

type FakeAuthorizer

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

func NewMockAuthorizer

func NewMockAuthorizer() *FakeAuthorizer

func (*FakeAuthorizer) Authorize

func (a *FakeAuthorizer) Authorize(principal *models.Principal, verb string, resource string) error

Authorize provides a mock function with given fields: principal, verb, resource

func (*FakeAuthorizer) Calls

func (a *FakeAuthorizer) Calls() []AuthZReq

func (*FakeAuthorizer) SetErr

func (a *FakeAuthorizer) SetErr(err error)

Jump to

Keyboard shortcuts

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