Documentation ¶
Index ¶
- type Gatekeeper
- func (_m *Gatekeeper) Connect(ctx context.Context) error
- func (_m *Gatekeeper) Disconnect(ctx context.Context) error
- func (_m *Gatekeeper) EXPECT() *Gatekeeper_Expecter
- func (_m *Gatekeeper) Enforce(ctx context.Context, evaluation *entities.Evaluation, ...) error
- func (_m *Gatekeeper) Grant(ctx context.Context, evaluation *entities.Evaluation) error
- func (_m *Gatekeeper) Liveness() error
- func (_m *Gatekeeper) Readiness() error
- func (_m *Gatekeeper) Revoke(ctx context.Context, evaluation *entities.Evaluation) error
- func (_m *Gatekeeper) Tenants(ctx context.Context, username string) ([]entities.Tenant, error)
- func (_m *Gatekeeper) Users(ctx context.Context, tenant string) ([]entities.User, error)
- type Gatekeeper_Connect_Call
- type Gatekeeper_Disconnect_Call
- type Gatekeeper_Enforce_Call
- func (_c *Gatekeeper_Enforce_Call) Return(_a0 error) *Gatekeeper_Enforce_Call
- func (_c *Gatekeeper_Enforce_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation, ...)) *Gatekeeper_Enforce_Call
- func (_c *Gatekeeper_Enforce_Call) RunAndReturn(run func(context.Context, *entities.Evaluation, *entities.Permission) error) *Gatekeeper_Enforce_Call
- type Gatekeeper_Expecter
- func (_e *Gatekeeper_Expecter) Connect(ctx interface{}) *Gatekeeper_Connect_Call
- func (_e *Gatekeeper_Expecter) Disconnect(ctx interface{}) *Gatekeeper_Disconnect_Call
- func (_e *Gatekeeper_Expecter) Enforce(ctx interface{}, evaluation interface{}, permission interface{}) *Gatekeeper_Enforce_Call
- func (_e *Gatekeeper_Expecter) Grant(ctx interface{}, evaluation interface{}) *Gatekeeper_Grant_Call
- func (_e *Gatekeeper_Expecter) Liveness() *Gatekeeper_Liveness_Call
- func (_e *Gatekeeper_Expecter) Readiness() *Gatekeeper_Readiness_Call
- func (_e *Gatekeeper_Expecter) Revoke(ctx interface{}, evaluation interface{}) *Gatekeeper_Revoke_Call
- func (_e *Gatekeeper_Expecter) Tenants(ctx interface{}, username interface{}) *Gatekeeper_Tenants_Call
- func (_e *Gatekeeper_Expecter) Users(ctx interface{}, tenant interface{}) *Gatekeeper_Users_Call
- type Gatekeeper_Grant_Call
- func (_c *Gatekeeper_Grant_Call) Return(_a0 error) *Gatekeeper_Grant_Call
- func (_c *Gatekeeper_Grant_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation)) *Gatekeeper_Grant_Call
- func (_c *Gatekeeper_Grant_Call) RunAndReturn(run func(context.Context, *entities.Evaluation) error) *Gatekeeper_Grant_Call
- type Gatekeeper_Liveness_Call
- type Gatekeeper_Readiness_Call
- type Gatekeeper_Revoke_Call
- func (_c *Gatekeeper_Revoke_Call) Return(_a0 error) *Gatekeeper_Revoke_Call
- func (_c *Gatekeeper_Revoke_Call) Run(run func(ctx context.Context, evaluation *entities.Evaluation)) *Gatekeeper_Revoke_Call
- func (_c *Gatekeeper_Revoke_Call) RunAndReturn(run func(context.Context, *entities.Evaluation) error) *Gatekeeper_Revoke_Call
- type Gatekeeper_Tenants_Call
- func (_c *Gatekeeper_Tenants_Call) Return(_a0 []entities.Tenant, _a1 error) *Gatekeeper_Tenants_Call
- func (_c *Gatekeeper_Tenants_Call) Run(run func(ctx context.Context, username string)) *Gatekeeper_Tenants_Call
- func (_c *Gatekeeper_Tenants_Call) RunAndReturn(run func(context.Context, string) ([]entities.Tenant, error)) *Gatekeeper_Tenants_Call
- type Gatekeeper_Users_Call
- func (_c *Gatekeeper_Users_Call) Return(_a0 []entities.User, _a1 error) *Gatekeeper_Users_Call
- func (_c *Gatekeeper_Users_Call) Run(run func(ctx context.Context, tenant string)) *Gatekeeper_Users_Call
- func (_c *Gatekeeper_Users_Call) RunAndReturn(run func(context.Context, string) ([]entities.User, error)) *Gatekeeper_Users_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gatekeeper ¶
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
type Gatekeeper_Connect_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 (_c *Gatekeeper_Connect_Call) Return(_a0 error) *Gatekeeper_Connect_Call
func (*Gatekeeper_Connect_Call) Run ¶
func (_c *Gatekeeper_Connect_Call) Run(run func(ctx context.Context)) *Gatekeeper_Connect_Call
func (*Gatekeeper_Connect_Call) RunAndReturn ¶
func (_c *Gatekeeper_Connect_Call) RunAndReturn(run func(context.Context) error) *Gatekeeper_Connect_Call
type Gatekeeper_Disconnect_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 (_c *Gatekeeper_Disconnect_Call) Return(_a0 error) *Gatekeeper_Disconnect_Call
func (*Gatekeeper_Disconnect_Call) Run ¶
func (_c *Gatekeeper_Disconnect_Call) Run(run func(ctx context.Context)) *Gatekeeper_Disconnect_Call
func (*Gatekeeper_Disconnect_Call) RunAndReturn ¶
func (_c *Gatekeeper_Disconnect_Call) RunAndReturn(run func(context.Context) error) *Gatekeeper_Disconnect_Call
type Gatekeeper_Enforce_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 (_c *Gatekeeper_Enforce_Call) Return(_a0 error) *Gatekeeper_Enforce_Call
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 ¶
func (_c *Gatekeeper_Enforce_Call) RunAndReturn(run func(context.Context, *entities.Evaluation, *entities.Permission) error) *Gatekeeper_Enforce_Call
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 ¶
func (_e *Gatekeeper_Expecter) Liveness() *Gatekeeper_Liveness_Call
Liveness is a helper method to define mock.On call
func (*Gatekeeper_Expecter) Readiness ¶
func (_e *Gatekeeper_Expecter) Readiness() *Gatekeeper_Readiness_Call
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 ¶
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 (_c *Gatekeeper_Grant_Call) Return(_a0 error) *Gatekeeper_Grant_Call
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 ¶
func (_c *Gatekeeper_Grant_Call) RunAndReturn(run func(context.Context, *entities.Evaluation) error) *Gatekeeper_Grant_Call
type Gatekeeper_Liveness_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 (_c *Gatekeeper_Liveness_Call) Return(_a0 error) *Gatekeeper_Liveness_Call
func (*Gatekeeper_Liveness_Call) Run ¶
func (_c *Gatekeeper_Liveness_Call) Run(run func()) *Gatekeeper_Liveness_Call
func (*Gatekeeper_Liveness_Call) RunAndReturn ¶
func (_c *Gatekeeper_Liveness_Call) RunAndReturn(run func() error) *Gatekeeper_Liveness_Call
type Gatekeeper_Readiness_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 (_c *Gatekeeper_Readiness_Call) Return(_a0 error) *Gatekeeper_Readiness_Call
func (*Gatekeeper_Readiness_Call) Run ¶
func (_c *Gatekeeper_Readiness_Call) Run(run func()) *Gatekeeper_Readiness_Call
func (*Gatekeeper_Readiness_Call) RunAndReturn ¶
func (_c *Gatekeeper_Readiness_Call) RunAndReturn(run func() error) *Gatekeeper_Readiness_Call
type Gatekeeper_Revoke_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 (_c *Gatekeeper_Revoke_Call) Return(_a0 error) *Gatekeeper_Revoke_Call
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 ¶
func (_c *Gatekeeper_Revoke_Call) RunAndReturn(run func(context.Context, *entities.Evaluation) error) *Gatekeeper_Revoke_Call
type Gatekeeper_Tenants_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 (_c *Gatekeeper_Tenants_Call) Return(_a0 []entities.Tenant, _a1 error) *Gatekeeper_Tenants_Call
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 ¶
func (_c *Gatekeeper_Tenants_Call) RunAndReturn(run func(context.Context, string) ([]entities.Tenant, error)) *Gatekeeper_Tenants_Call
type Gatekeeper_Users_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 (_c *Gatekeeper_Users_Call) Return(_a0 []entities.User, _a1 error) *Gatekeeper_Users_Call
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 ¶
func (_c *Gatekeeper_Users_Call) RunAndReturn(run func(context.Context, string) ([]entities.User, error)) *Gatekeeper_Users_Call