gatekeeper

package
v0.0.0-...-7907c65 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 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 Gatekeeper

type Gatekeeper struct {
	mock.Mock
}

Gatekeeper is an autogenerated mock type for the Gatekeeper type

func NewGatekeeper

func NewGatekeeper(t interface {
	mock.TestingT
	Cleanup(func())
}) *Gatekeeper

NewGatekeeper creates a new instance of Gatekeeper. 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 (*Gatekeeper) Connect

func (_m *Gatekeeper) Connect(ctx context.Context) error

Connect provides a mock function with given fields: ctx

func (*Gatekeeper) Disconnect

func (_m *Gatekeeper) Disconnect(ctx context.Context) error

Disconnect provides a mock function with given fields: ctx

func (*Gatekeeper) EXPECT

func (_m *Gatekeeper) EXPECT() *Gatekeeper_Expecter

func (*Gatekeeper) Enforce

func (_m *Gatekeeper) Enforce(ctx context.Context, evaluation *entities.Evaluation, permission *entities.Permission) error

Enforce provides a mock function with given fields: ctx, evaluation, permission

func (*Gatekeeper) Grant

func (_m *Gatekeeper) Grant(ctx context.Context, evaluation *entities.Evaluation) error

Grant provides a mock function with given fields: ctx, evaluation

func (*Gatekeeper) Liveness

func (_m *Gatekeeper) Liveness() error

Liveness provides a mock function with given fields:

func (*Gatekeeper) Readiness

func (_m *Gatekeeper) Readiness() error

Readiness provides a mock function with given fields:

func (*Gatekeeper) Revoke

func (_m *Gatekeeper) Revoke(ctx context.Context, evaluation *entities.Evaluation) error

Revoke provides a mock function with given fields: ctx, evaluation

func (*Gatekeeper) Tenants

func (_m *Gatekeeper) Tenants(ctx context.Context, username string) ([]entities.Tenant, error)

Tenants provides a mock function with given fields: ctx, username

func (*Gatekeeper) Users

func (_m *Gatekeeper) Users(ctx context.Context, tenant string) ([]entities.User, error)

Users provides a mock function with given fields: ctx, tenant

type Gatekeeper_Connect_Call

type Gatekeeper_Connect_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Connect_Call) Return

func (*Gatekeeper_Connect_Call) Run

func (*Gatekeeper_Connect_Call) RunAndReturn

type Gatekeeper_Disconnect_Call

type Gatekeeper_Disconnect_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Disconnect_Call) Return

func (*Gatekeeper_Disconnect_Call) Run

func (*Gatekeeper_Disconnect_Call) RunAndReturn

type Gatekeeper_Enforce_Call

type Gatekeeper_Enforce_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Enforce_Call) Return

func (*Gatekeeper_Enforce_Call) Run

func (_c *Gatekeeper_Enforce_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation, permission *entities.Permission)) *Gatekeeper_Enforce_Call

func (*Gatekeeper_Enforce_Call) RunAndReturn

type Gatekeeper_Expecter

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

func (*Gatekeeper_Expecter) Connect

func (_e *Gatekeeper_Expecter) Connect(ctx interface{}) *Gatekeeper_Connect_Call

Connect is a helper method to define mock.On call

  • ctx context.Context

func (*Gatekeeper_Expecter) Disconnect

func (_e *Gatekeeper_Expecter) Disconnect(ctx interface{}) *Gatekeeper_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • ctx context.Context

func (*Gatekeeper_Expecter) Enforce

func (_e *Gatekeeper_Expecter) Enforce(ctx interface{}, evaluation interface{}, permission interface{}) *Gatekeeper_Enforce_Call

Enforce is a helper method to define mock.On call

  • ctx context.Context
  • evaluation *entities.Evaluation
  • permission *entities.Permission

func (*Gatekeeper_Expecter) Grant

func (_e *Gatekeeper_Expecter) Grant(ctx interface{}, evaluation interface{}) *Gatekeeper_Grant_Call

Grant is a helper method to define mock.On call

  • ctx context.Context
  • evaluation *entities.Evaluation

func (*Gatekeeper_Expecter) Liveness

Liveness is a helper method to define mock.On call

func (*Gatekeeper_Expecter) Readiness

Readiness is a helper method to define mock.On call

func (*Gatekeeper_Expecter) Revoke

func (_e *Gatekeeper_Expecter) Revoke(ctx interface{}, evaluation interface{}) *Gatekeeper_Revoke_Call

Revoke is a helper method to define mock.On call

  • ctx context.Context
  • evaluation *entities.Evaluation

func (*Gatekeeper_Expecter) Tenants

func (_e *Gatekeeper_Expecter) Tenants(ctx interface{}, username interface{}) *Gatekeeper_Tenants_Call

Tenants is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*Gatekeeper_Expecter) Users

func (_e *Gatekeeper_Expecter) Users(ctx interface{}, tenant interface{}) *Gatekeeper_Users_Call

Users is a helper method to define mock.On call

  • ctx context.Context
  • tenant string

type Gatekeeper_Grant_Call

type Gatekeeper_Grant_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Grant_Call) Return

func (*Gatekeeper_Grant_Call) Run

func (_c *Gatekeeper_Grant_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation)) *Gatekeeper_Grant_Call

func (*Gatekeeper_Grant_Call) RunAndReturn

type Gatekeeper_Liveness_Call

type Gatekeeper_Liveness_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Liveness_Call) Return

func (*Gatekeeper_Liveness_Call) Run

func (*Gatekeeper_Liveness_Call) RunAndReturn

func (_c *Gatekeeper_Liveness_Call) RunAndReturn(run func() error) *Gatekeeper_Liveness_Call

type Gatekeeper_Readiness_Call

type Gatekeeper_Readiness_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Readiness_Call) Return

func (*Gatekeeper_Readiness_Call) Run

func (*Gatekeeper_Readiness_Call) RunAndReturn

func (_c *Gatekeeper_Readiness_Call) RunAndReturn(run func() error) *Gatekeeper_Readiness_Call

type Gatekeeper_Revoke_Call

type Gatekeeper_Revoke_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Revoke_Call) Return

func (*Gatekeeper_Revoke_Call) Run

func (_c *Gatekeeper_Revoke_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation)) *Gatekeeper_Revoke_Call

func (*Gatekeeper_Revoke_Call) RunAndReturn

type Gatekeeper_Tenants_Call

type Gatekeeper_Tenants_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Tenants_Call) Return

func (*Gatekeeper_Tenants_Call) Run

func (_c *Gatekeeper_Tenants_Call) Run(run func(ctx context.Context, username string)) *Gatekeeper_Tenants_Call

func (*Gatekeeper_Tenants_Call) RunAndReturn

type Gatekeeper_Users_Call

type Gatekeeper_Users_Call struct {
	*mock.Call
}

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

func (*Gatekeeper_Users_Call) Return

func (*Gatekeeper_Users_Call) Run

func (_c *Gatekeeper_Users_Call) Run(run func(ctx context.Context, tenant string)) *Gatekeeper_Users_Call

func (*Gatekeeper_Users_Call) RunAndReturn

Jump to

Keyboard shortcuts

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