mocks

package
v3.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecurityVoter

type SecurityVoter struct {
	mock.Mock
}

SecurityVoter is an autogenerated mock type for the SecurityVoter type

func NewSecurityVoter added in v3.4.0

func NewSecurityVoter(t interface {
	mock.TestingT
	Cleanup(func())
}) *SecurityVoter

NewSecurityVoter creates a new instance of SecurityVoter. 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 (*SecurityVoter) EXPECT added in v3.5.1

func (_m *SecurityVoter) EXPECT() *SecurityVoter_Expecter

func (*SecurityVoter) Vote

func (_m *SecurityVoter) Vote(allAssignedPermissions []string, desiredPermission string, forObject interface{}) voter.AccessDecision

Vote provides a mock function with given fields: allAssignedPermissions, desiredPermission, forObject

type SecurityVoter_Expecter added in v3.5.1

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

func (*SecurityVoter_Expecter) Vote added in v3.5.1

func (_e *SecurityVoter_Expecter) Vote(allAssignedPermissions interface{}, desiredPermission interface{}, forObject interface{}) *SecurityVoter_Vote_Call

Vote is a helper method to define mock.On call

  • allAssignedPermissions []string
  • desiredPermission string
  • forObject interface{}

type SecurityVoter_Vote_Call added in v3.5.1

type SecurityVoter_Vote_Call struct {
	*mock.Call
}

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

func (*SecurityVoter_Vote_Call) Return added in v3.5.1

func (*SecurityVoter_Vote_Call) Run added in v3.5.1

func (_c *SecurityVoter_Vote_Call) Run(run func(allAssignedPermissions []string, desiredPermission string, forObject interface{})) *SecurityVoter_Vote_Call

func (*SecurityVoter_Vote_Call) RunAndReturn added in v3.5.1

func (_c *SecurityVoter_Vote_Call) RunAndReturn(run func([]string, string, interface{}) voter.AccessDecision) *SecurityVoter_Vote_Call

Jump to

Keyboard shortcuts

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