mocks

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 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 AuditLogger added in v0.8.4

type AuditLogger struct {
	mock.Mock
}

AuditLogger is an autogenerated mock type for the AuditLogger type

func NewAuditLogger added in v0.8.4

func NewAuditLogger(t mockConstructorTestingTNewAuditLogger) *AuditLogger

NewAuditLogger creates a new instance of AuditLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AuditLogger) EXPECT added in v0.8.4

func (_m *AuditLogger) EXPECT() *AuditLogger_Expecter

func (*AuditLogger) LogGrantedAccessRequest added in v0.8.4

func (_m *AuditLogger) LogGrantedAccessRequest(ctx context.Context, request *ladon.Request, pool ladon.Policies, deciders ladon.Policies)

LogGrantedAccessRequest provides a mock function with given fields: ctx, request, pool, deciders

func (*AuditLogger) LogRejectedAccessRequest added in v0.8.4

func (_m *AuditLogger) LogRejectedAccessRequest(ctx context.Context, request *ladon.Request, pool ladon.Policies, deciders ladon.Policies)

LogRejectedAccessRequest provides a mock function with given fields: ctx, request, pool, deciders

type AuditLogger_Expecter added in v0.8.4

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

func (*AuditLogger_Expecter) LogGrantedAccessRequest added in v0.8.4

func (_e *AuditLogger_Expecter) LogGrantedAccessRequest(ctx interface{}, request interface{}, pool interface{}, deciders interface{}) *AuditLogger_LogGrantedAccessRequest_Call

LogGrantedAccessRequest is a helper method to define mock.On call

  • ctx context.Context
  • request *ladon.Request
  • pool ladon.Policies
  • deciders ladon.Policies

func (*AuditLogger_Expecter) LogRejectedAccessRequest added in v0.8.4

func (_e *AuditLogger_Expecter) LogRejectedAccessRequest(ctx interface{}, request interface{}, pool interface{}, deciders interface{}) *AuditLogger_LogRejectedAccessRequest_Call

LogRejectedAccessRequest is a helper method to define mock.On call

  • ctx context.Context
  • request *ladon.Request
  • pool ladon.Policies
  • deciders ladon.Policies

type AuditLogger_LogGrantedAccessRequest_Call added in v0.8.4

type AuditLogger_LogGrantedAccessRequest_Call struct {
	*mock.Call
}

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

func (*AuditLogger_LogGrantedAccessRequest_Call) Return added in v0.8.4

func (*AuditLogger_LogGrantedAccessRequest_Call) Run added in v0.8.4

func (*AuditLogger_LogGrantedAccessRequest_Call) RunAndReturn added in v0.8.4

type AuditLogger_LogRejectedAccessRequest_Call added in v0.8.4

type AuditLogger_LogRejectedAccessRequest_Call struct {
	*mock.Call
}

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

func (*AuditLogger_LogRejectedAccessRequest_Call) Return added in v0.8.4

func (*AuditLogger_LogRejectedAccessRequest_Call) Run added in v0.8.4

func (*AuditLogger_LogRejectedAccessRequest_Call) RunAndReturn added in v0.8.4

type Guard

type Guard struct {
	mock.Mock
}

Guard is an autogenerated mock type for the Guard type

func NewGuard

func NewGuard(t mockConstructorTestingTNewGuard) *Guard

NewGuard creates a new instance of Guard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Guard) CreatePolicy

func (_m *Guard) CreatePolicy(ctx context.Context, pol ladon.Policy) error

CreatePolicy provides a mock function with given fields: ctx, pol

func (*Guard) DeletePolicy

func (_m *Guard) DeletePolicy(ctx context.Context, pol ladon.Policy) error

DeletePolicy provides a mock function with given fields: ctx, pol

func (*Guard) EXPECT

func (_m *Guard) EXPECT() *Guard_Expecter

func (*Guard) GetPolicies

func (_m *Guard) GetPolicies(ctx context.Context) (ladon.Policies, error)

GetPolicies provides a mock function with given fields: ctx

func (*Guard) GetPoliciesBySubject

func (_m *Guard) GetPoliciesBySubject(ctx context.Context, subject string) (ladon.Policies, error)

GetPoliciesBySubject provides a mock function with given fields: ctx, subject

func (*Guard) GetPolicy

func (_m *Guard) GetPolicy(ctx context.Context, id string) (ladon.Policy, error)

GetPolicy provides a mock function with given fields: ctx, id

func (*Guard) IsAllowed

func (_m *Guard) IsAllowed(ctx context.Context, request *ladon.Request) error

IsAllowed provides a mock function with given fields: ctx, request

func (*Guard) UpdatePolicy

func (_m *Guard) UpdatePolicy(ctx context.Context, pol ladon.Policy) error

UpdatePolicy provides a mock function with given fields: ctx, pol

type Guard_CreatePolicy_Call

type Guard_CreatePolicy_Call struct {
	*mock.Call
}

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

func (*Guard_CreatePolicy_Call) Return

func (*Guard_CreatePolicy_Call) Run

func (*Guard_CreatePolicy_Call) RunAndReturn

type Guard_DeletePolicy_Call

type Guard_DeletePolicy_Call struct {
	*mock.Call
}

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

func (*Guard_DeletePolicy_Call) Return

func (*Guard_DeletePolicy_Call) Run

func (*Guard_DeletePolicy_Call) RunAndReturn

type Guard_Expecter

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

func (*Guard_Expecter) CreatePolicy

func (_e *Guard_Expecter) CreatePolicy(ctx interface{}, pol interface{}) *Guard_CreatePolicy_Call

CreatePolicy is a helper method to define mock.On call

  • ctx context.Context
  • pol ladon.Policy

func (*Guard_Expecter) DeletePolicy

func (_e *Guard_Expecter) DeletePolicy(ctx interface{}, pol interface{}) *Guard_DeletePolicy_Call

DeletePolicy is a helper method to define mock.On call

  • ctx context.Context
  • pol ladon.Policy

func (*Guard_Expecter) GetPolicies

func (_e *Guard_Expecter) GetPolicies(ctx interface{}) *Guard_GetPolicies_Call

GetPolicies is a helper method to define mock.On call

  • ctx context.Context

func (*Guard_Expecter) GetPoliciesBySubject

func (_e *Guard_Expecter) GetPoliciesBySubject(ctx interface{}, subject interface{}) *Guard_GetPoliciesBySubject_Call

GetPoliciesBySubject is a helper method to define mock.On call

  • ctx context.Context
  • subject string

func (*Guard_Expecter) GetPolicy

func (_e *Guard_Expecter) GetPolicy(ctx interface{}, id interface{}) *Guard_GetPolicy_Call

GetPolicy is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Guard_Expecter) IsAllowed

func (_e *Guard_Expecter) IsAllowed(ctx interface{}, request interface{}) *Guard_IsAllowed_Call

IsAllowed is a helper method to define mock.On call

  • ctx context.Context
  • request *ladon.Request

func (*Guard_Expecter) UpdatePolicy

func (_e *Guard_Expecter) UpdatePolicy(ctx interface{}, pol interface{}) *Guard_UpdatePolicy_Call

UpdatePolicy is a helper method to define mock.On call

  • ctx context.Context
  • pol ladon.Policy

type Guard_GetPoliciesBySubject_Call

type Guard_GetPoliciesBySubject_Call struct {
	*mock.Call
}

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

func (*Guard_GetPoliciesBySubject_Call) Return

func (*Guard_GetPoliciesBySubject_Call) Run

func (*Guard_GetPoliciesBySubject_Call) RunAndReturn

type Guard_GetPolicies_Call

type Guard_GetPolicies_Call struct {
	*mock.Call
}

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

func (*Guard_GetPolicies_Call) Return

func (*Guard_GetPolicies_Call) Run

func (*Guard_GetPolicies_Call) RunAndReturn

type Guard_GetPolicy_Call

type Guard_GetPolicy_Call struct {
	*mock.Call
}

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

func (*Guard_GetPolicy_Call) Return

func (*Guard_GetPolicy_Call) Run

func (_c *Guard_GetPolicy_Call) Run(run func(ctx context.Context, id string)) *Guard_GetPolicy_Call

func (*Guard_GetPolicy_Call) RunAndReturn

type Guard_IsAllowed_Call

type Guard_IsAllowed_Call struct {
	*mock.Call
}

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

func (*Guard_IsAllowed_Call) Return

func (*Guard_IsAllowed_Call) Run

func (_c *Guard_IsAllowed_Call) Run(run func(ctx context.Context, request *ladon.Request)) *Guard_IsAllowed_Call

func (*Guard_IsAllowed_Call) RunAndReturn

type Guard_UpdatePolicy_Call

type Guard_UpdatePolicy_Call struct {
	*mock.Call
}

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

func (*Guard_UpdatePolicy_Call) Return

func (*Guard_UpdatePolicy_Call) Run

func (*Guard_UpdatePolicy_Call) RunAndReturn

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t mockConstructorTestingTNewManager) *Manager

NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Manager) Create

func (_m *Manager) Create(ctx context.Context, policy ladon.Policy) error

Create provides a mock function with given fields: ctx, policy

func (*Manager) Delete

func (_m *Manager) Delete(ctx context.Context, id string) error

Delete provides a mock function with given fields: ctx, id

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) FindPoliciesForResource

func (_m *Manager) FindPoliciesForResource(ctx context.Context, resource string) (ladon.Policies, error)

FindPoliciesForResource provides a mock function with given fields: ctx, resource

func (*Manager) FindPoliciesForSubject

func (_m *Manager) FindPoliciesForSubject(ctx context.Context, subject string) (ladon.Policies, error)

FindPoliciesForSubject provides a mock function with given fields: ctx, subject

func (*Manager) FindRequestCandidates

func (_m *Manager) FindRequestCandidates(ctx context.Context, r *ladon.Request) (ladon.Policies, error)

FindRequestCandidates provides a mock function with given fields: ctx, r

func (*Manager) Get

func (_m *Manager) Get(ctx context.Context, id string) (ladon.Policy, error)

Get provides a mock function with given fields: ctx, id

func (*Manager) GetAll

func (_m *Manager) GetAll(ctx context.Context, limit int64, offset int64) (ladon.Policies, error)

GetAll provides a mock function with given fields: ctx, limit, offset

func (*Manager) Update

func (_m *Manager) Update(ctx context.Context, policy ladon.Policy) error

Update provides a mock function with given fields: ctx, policy

type Manager_Create_Call

type Manager_Create_Call struct {
	*mock.Call
}

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

func (*Manager_Create_Call) Return

func (*Manager_Create_Call) Run

func (_c *Manager_Create_Call) Run(run func(ctx context.Context, policy ladon.Policy)) *Manager_Create_Call

func (*Manager_Create_Call) RunAndReturn

type Manager_Delete_Call

type Manager_Delete_Call struct {
	*mock.Call
}

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

func (*Manager_Delete_Call) Return

func (*Manager_Delete_Call) Run

func (_c *Manager_Delete_Call) Run(run func(ctx context.Context, id string)) *Manager_Delete_Call

func (*Manager_Delete_Call) RunAndReturn

func (_c *Manager_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Manager_Delete_Call

type Manager_Expecter

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

func (*Manager_Expecter) Create

func (_e *Manager_Expecter) Create(ctx interface{}, policy interface{}) *Manager_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • policy ladon.Policy

func (*Manager_Expecter) Delete

func (_e *Manager_Expecter) Delete(ctx interface{}, id interface{}) *Manager_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Manager_Expecter) FindPoliciesForResource

func (_e *Manager_Expecter) FindPoliciesForResource(ctx interface{}, resource interface{}) *Manager_FindPoliciesForResource_Call

FindPoliciesForResource is a helper method to define mock.On call

  • ctx context.Context
  • resource string

func (*Manager_Expecter) FindPoliciesForSubject

func (_e *Manager_Expecter) FindPoliciesForSubject(ctx interface{}, subject interface{}) *Manager_FindPoliciesForSubject_Call

FindPoliciesForSubject is a helper method to define mock.On call

  • ctx context.Context
  • subject string

func (*Manager_Expecter) FindRequestCandidates

func (_e *Manager_Expecter) FindRequestCandidates(ctx interface{}, r interface{}) *Manager_FindRequestCandidates_Call

FindRequestCandidates is a helper method to define mock.On call

  • ctx context.Context
  • r *ladon.Request

func (*Manager_Expecter) Get

func (_e *Manager_Expecter) Get(ctx interface{}, id interface{}) *Manager_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Manager_Expecter) GetAll

func (_e *Manager_Expecter) GetAll(ctx interface{}, limit interface{}, offset interface{}) *Manager_GetAll_Call

GetAll is a helper method to define mock.On call

  • ctx context.Context
  • limit int64
  • offset int64

func (*Manager_Expecter) Update

func (_e *Manager_Expecter) Update(ctx interface{}, policy interface{}) *Manager_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • policy ladon.Policy

type Manager_FindPoliciesForResource_Call

type Manager_FindPoliciesForResource_Call struct {
	*mock.Call
}

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

func (*Manager_FindPoliciesForResource_Call) Return

func (*Manager_FindPoliciesForResource_Call) Run

func (*Manager_FindPoliciesForResource_Call) RunAndReturn

type Manager_FindPoliciesForSubject_Call

type Manager_FindPoliciesForSubject_Call struct {
	*mock.Call
}

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

func (*Manager_FindPoliciesForSubject_Call) Return

func (*Manager_FindPoliciesForSubject_Call) Run

func (*Manager_FindPoliciesForSubject_Call) RunAndReturn

type Manager_FindRequestCandidates_Call

type Manager_FindRequestCandidates_Call struct {
	*mock.Call
}

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

func (*Manager_FindRequestCandidates_Call) Return

func (*Manager_FindRequestCandidates_Call) Run

func (*Manager_FindRequestCandidates_Call) RunAndReturn

type Manager_GetAll_Call

type Manager_GetAll_Call struct {
	*mock.Call
}

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

func (*Manager_GetAll_Call) Return

func (*Manager_GetAll_Call) Run

func (_c *Manager_GetAll_Call) Run(run func(ctx context.Context, limit int64, offset int64)) *Manager_GetAll_Call

func (*Manager_GetAll_Call) RunAndReturn

type Manager_Get_Call

type Manager_Get_Call struct {
	*mock.Call
}

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

func (*Manager_Get_Call) Return

func (_c *Manager_Get_Call) Return(_a0 ladon.Policy, _a1 error) *Manager_Get_Call

func (*Manager_Get_Call) Run

func (_c *Manager_Get_Call) Run(run func(ctx context.Context, id string)) *Manager_Get_Call

func (*Manager_Get_Call) RunAndReturn

func (_c *Manager_Get_Call) RunAndReturn(run func(context.Context, string) (ladon.Policy, error)) *Manager_Get_Call

type Manager_Update_Call

type Manager_Update_Call struct {
	*mock.Call
}

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

func (*Manager_Update_Call) Return

func (*Manager_Update_Call) Run

func (_c *Manager_Update_Call) Run(run func(ctx context.Context, policy ladon.Policy)) *Manager_Update_Call

func (*Manager_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

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