mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mocks contains generated test doubles for authorization ports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuthorizer

type MockAuthorizer struct {
	mock.Mock
}

MockAuthorizer is an autogenerated mock type for the Authorizer type

func NewMockAuthorizer

func NewMockAuthorizer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthorizer

NewMockAuthorizer creates a new instance of MockAuthorizer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAuthorizer) Authorize

func (_mock *MockAuthorizer) Authorize(context1 context.Context, authorizationInput authz.AuthorizationInput) error

Authorize provides a mock function for the type MockAuthorizer

func (*MockAuthorizer) EXPECT

type MockAuthorizer_Authorize_Call

type MockAuthorizer_Authorize_Call struct {
	*mock.Call
}

MockAuthorizer_Authorize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authorize'

func (*MockAuthorizer_Authorize_Call) Return

func (*MockAuthorizer_Authorize_Call) Run

func (*MockAuthorizer_Authorize_Call) RunAndReturn

func (_c *MockAuthorizer_Authorize_Call) RunAndReturn(run func(context1 context.Context, authorizationInput authz.AuthorizationInput) error) *MockAuthorizer_Authorize_Call

type MockAuthorizer_Expecter

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

func (*MockAuthorizer_Expecter) Authorize

func (_e *MockAuthorizer_Expecter) Authorize(context1 any, authorizationInput any) *MockAuthorizer_Authorize_Call

Authorize is a helper method to define mock.On call

  • context1 context.Context
  • authorizationInput authz.AuthorizationInput

Jump to

Keyboard shortcuts

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