mocks

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RBAC

type RBAC struct {
	mock.Mock
}

RBAC is an autogenerated mock type for the RBAC type

func NewRBAC

func NewRBAC(t interface {
	mock.TestingT
	Cleanup(func())
}) *RBAC

NewRBAC creates a new instance of RBAC. 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 (*RBAC) Check

func (_mock *RBAC) Check(ctx context.Context, res restrict.Resource, opts ...authz.CheckOption) (entities.Subject, error)

Check provides a mock function for the type RBAC

func (*RBAC) EXPECT

func (_m *RBAC) EXPECT() *RBAC_Expecter

type RBAC_Check_Call

type RBAC_Check_Call struct {
	*mock.Call
}

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

func (*RBAC_Check_Call) Return

func (_c *RBAC_Check_Call) Return(subject entities.Subject, err error) *RBAC_Check_Call

func (*RBAC_Check_Call) Run

func (_c *RBAC_Check_Call) Run(run func(ctx context.Context, res restrict.Resource, opts ...authz.CheckOption)) *RBAC_Check_Call

func (*RBAC_Check_Call) RunAndReturn

func (_c *RBAC_Check_Call) RunAndReturn(run func(ctx context.Context, res restrict.Resource, opts ...authz.CheckOption) (entities.Subject, error)) *RBAC_Check_Call

type RBAC_Expecter

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

func (*RBAC_Expecter) Check

func (_e *RBAC_Expecter) Check(ctx interface{}, res interface{}, opts ...interface{}) *RBAC_Check_Call

Check is a helper method to define mock.On call

  • ctx context.Context
  • res restrict.Resource
  • opts ...authz.CheckOption

Jump to

Keyboard shortcuts

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