Documentation ¶
Index ¶
- type Guard
- func (_m *Guard) CreatePolicy(pol ladon.Policy) error
- func (_m *Guard) DeletePolicy(pol ladon.Policy) error
- func (_m *Guard) EXPECT() *Guard_Expecter
- func (_m *Guard) GetPolicies() (ladon.Policies, error)
- func (_m *Guard) GetPoliciesBySubject(subject string) (ladon.Policies, error)
- func (_m *Guard) GetPolicy(id string) (ladon.Policy, error)
- func (_m *Guard) IsAllowed(request *ladon.Request) error
- func (_m *Guard) UpdatePolicy(pol ladon.Policy) error
- type Guard_CreatePolicy_Call
- type Guard_DeletePolicy_Call
- type Guard_Expecter
- func (_e *Guard_Expecter) CreatePolicy(pol interface{}) *Guard_CreatePolicy_Call
- func (_e *Guard_Expecter) DeletePolicy(pol interface{}) *Guard_DeletePolicy_Call
- func (_e *Guard_Expecter) GetPolicies() *Guard_GetPolicies_Call
- func (_e *Guard_Expecter) GetPoliciesBySubject(subject interface{}) *Guard_GetPoliciesBySubject_Call
- func (_e *Guard_Expecter) GetPolicy(id interface{}) *Guard_GetPolicy_Call
- func (_e *Guard_Expecter) IsAllowed(request interface{}) *Guard_IsAllowed_Call
- func (_e *Guard_Expecter) UpdatePolicy(pol interface{}) *Guard_UpdatePolicy_Call
- type Guard_GetPoliciesBySubject_Call
- func (_c *Guard_GetPoliciesBySubject_Call) Return(_a0 ladon.Policies, _a1 error) *Guard_GetPoliciesBySubject_Call
- func (_c *Guard_GetPoliciesBySubject_Call) Run(run func(subject string)) *Guard_GetPoliciesBySubject_Call
- func (_c *Guard_GetPoliciesBySubject_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Guard_GetPoliciesBySubject_Call
- type Guard_GetPolicies_Call
- type Guard_GetPolicy_Call
- type Guard_IsAllowed_Call
- type Guard_UpdatePolicy_Call
- type Manager
- func (_m *Manager) Create(policy ladon.Policy) error
- func (_m *Manager) Delete(id string) error
- func (_m *Manager) EXPECT() *Manager_Expecter
- func (_m *Manager) FindPoliciesForResource(resource string) (ladon.Policies, error)
- func (_m *Manager) FindPoliciesForSubject(subject string) (ladon.Policies, error)
- func (_m *Manager) FindRequestCandidates(r *ladon.Request) (ladon.Policies, error)
- func (_m *Manager) Get(id string) (ladon.Policy, error)
- func (_m *Manager) GetAll(limit int64, offset int64) (ladon.Policies, error)
- func (_m *Manager) Update(policy ladon.Policy) error
- type Manager_Create_Call
- type Manager_Delete_Call
- type Manager_Expecter
- func (_e *Manager_Expecter) Create(policy interface{}) *Manager_Create_Call
- func (_e *Manager_Expecter) Delete(id interface{}) *Manager_Delete_Call
- func (_e *Manager_Expecter) FindPoliciesForResource(resource interface{}) *Manager_FindPoliciesForResource_Call
- func (_e *Manager_Expecter) FindPoliciesForSubject(subject interface{}) *Manager_FindPoliciesForSubject_Call
- func (_e *Manager_Expecter) FindRequestCandidates(r interface{}) *Manager_FindRequestCandidates_Call
- func (_e *Manager_Expecter) Get(id interface{}) *Manager_Get_Call
- func (_e *Manager_Expecter) GetAll(limit interface{}, offset interface{}) *Manager_GetAll_Call
- func (_e *Manager_Expecter) Update(policy interface{}) *Manager_Update_Call
- type Manager_FindPoliciesForResource_Call
- func (_c *Manager_FindPoliciesForResource_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindPoliciesForResource_Call
- func (_c *Manager_FindPoliciesForResource_Call) Run(run func(resource string)) *Manager_FindPoliciesForResource_Call
- func (_c *Manager_FindPoliciesForResource_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Manager_FindPoliciesForResource_Call
- type Manager_FindPoliciesForSubject_Call
- func (_c *Manager_FindPoliciesForSubject_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindPoliciesForSubject_Call
- func (_c *Manager_FindPoliciesForSubject_Call) Run(run func(subject string)) *Manager_FindPoliciesForSubject_Call
- func (_c *Manager_FindPoliciesForSubject_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Manager_FindPoliciesForSubject_Call
- type Manager_FindRequestCandidates_Call
- func (_c *Manager_FindRequestCandidates_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindRequestCandidates_Call
- func (_c *Manager_FindRequestCandidates_Call) Run(run func(r *ladon.Request)) *Manager_FindRequestCandidates_Call
- func (_c *Manager_FindRequestCandidates_Call) RunAndReturn(run func(*ladon.Request) (ladon.Policies, error)) *Manager_FindRequestCandidates_Call
- type Manager_GetAll_Call
- type Manager_Get_Call
- type Manager_Update_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
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 ¶
CreatePolicy provides a mock function with given fields: pol
func (*Guard) DeletePolicy ¶
DeletePolicy provides a mock function with given fields: pol
func (*Guard) EXPECT ¶
func (_m *Guard) EXPECT() *Guard_Expecter
func (*Guard) GetPolicies ¶
GetPolicies provides a mock function with given fields:
func (*Guard) GetPoliciesBySubject ¶
GetPoliciesBySubject provides a mock function with given fields: subject
type Guard_CreatePolicy_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 (_c *Guard_CreatePolicy_Call) Return(_a0 error) *Guard_CreatePolicy_Call
func (*Guard_CreatePolicy_Call) Run ¶
func (_c *Guard_CreatePolicy_Call) Run(run func(pol ladon.Policy)) *Guard_CreatePolicy_Call
func (*Guard_CreatePolicy_Call) RunAndReturn ¶
func (_c *Guard_CreatePolicy_Call) RunAndReturn(run func(ladon.Policy) error) *Guard_CreatePolicy_Call
type Guard_DeletePolicy_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 (_c *Guard_DeletePolicy_Call) Return(_a0 error) *Guard_DeletePolicy_Call
func (*Guard_DeletePolicy_Call) Run ¶
func (_c *Guard_DeletePolicy_Call) Run(run func(pol ladon.Policy)) *Guard_DeletePolicy_Call
func (*Guard_DeletePolicy_Call) RunAndReturn ¶
func (_c *Guard_DeletePolicy_Call) RunAndReturn(run func(ladon.Policy) error) *Guard_DeletePolicy_Call
type Guard_Expecter ¶
type Guard_Expecter struct {
// contains filtered or unexported fields
}
func (*Guard_Expecter) CreatePolicy ¶
func (_e *Guard_Expecter) CreatePolicy(pol interface{}) *Guard_CreatePolicy_Call
CreatePolicy is a helper method to define mock.On call
- pol ladon.Policy
func (*Guard_Expecter) DeletePolicy ¶
func (_e *Guard_Expecter) DeletePolicy(pol interface{}) *Guard_DeletePolicy_Call
DeletePolicy is a helper method to define mock.On call
- pol ladon.Policy
func (*Guard_Expecter) GetPolicies ¶
func (_e *Guard_Expecter) GetPolicies() *Guard_GetPolicies_Call
GetPolicies is a helper method to define mock.On call
func (*Guard_Expecter) GetPoliciesBySubject ¶
func (_e *Guard_Expecter) GetPoliciesBySubject(subject interface{}) *Guard_GetPoliciesBySubject_Call
GetPoliciesBySubject is a helper method to define mock.On call
- subject string
func (*Guard_Expecter) GetPolicy ¶
func (_e *Guard_Expecter) GetPolicy(id interface{}) *Guard_GetPolicy_Call
GetPolicy is a helper method to define mock.On call
- id string
func (*Guard_Expecter) IsAllowed ¶
func (_e *Guard_Expecter) IsAllowed(request interface{}) *Guard_IsAllowed_Call
IsAllowed is a helper method to define mock.On call
- request *ladon.Request
func (*Guard_Expecter) UpdatePolicy ¶
func (_e *Guard_Expecter) UpdatePolicy(pol interface{}) *Guard_UpdatePolicy_Call
UpdatePolicy is a helper method to define mock.On call
- pol ladon.Policy
type Guard_GetPoliciesBySubject_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 (_c *Guard_GetPoliciesBySubject_Call) Return(_a0 ladon.Policies, _a1 error) *Guard_GetPoliciesBySubject_Call
func (*Guard_GetPoliciesBySubject_Call) Run ¶
func (_c *Guard_GetPoliciesBySubject_Call) Run(run func(subject string)) *Guard_GetPoliciesBySubject_Call
func (*Guard_GetPoliciesBySubject_Call) RunAndReturn ¶
func (_c *Guard_GetPoliciesBySubject_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Guard_GetPoliciesBySubject_Call
type Guard_GetPolicies_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 (_c *Guard_GetPolicies_Call) Return(_a0 ladon.Policies, _a1 error) *Guard_GetPolicies_Call
func (*Guard_GetPolicies_Call) Run ¶
func (_c *Guard_GetPolicies_Call) Run(run func()) *Guard_GetPolicies_Call
func (*Guard_GetPolicies_Call) RunAndReturn ¶
func (_c *Guard_GetPolicies_Call) RunAndReturn(run func() (ladon.Policies, error)) *Guard_GetPolicies_Call
type Guard_GetPolicy_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 (_c *Guard_GetPolicy_Call) Return(_a0 ladon.Policy, _a1 error) *Guard_GetPolicy_Call
func (*Guard_GetPolicy_Call) Run ¶
func (_c *Guard_GetPolicy_Call) Run(run func(id string)) *Guard_GetPolicy_Call
func (*Guard_GetPolicy_Call) RunAndReturn ¶
func (_c *Guard_GetPolicy_Call) RunAndReturn(run func(string) (ladon.Policy, error)) *Guard_GetPolicy_Call
type Guard_IsAllowed_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 (_c *Guard_IsAllowed_Call) Return(_a0 error) *Guard_IsAllowed_Call
func (*Guard_IsAllowed_Call) Run ¶
func (_c *Guard_IsAllowed_Call) Run(run func(request *ladon.Request)) *Guard_IsAllowed_Call
func (*Guard_IsAllowed_Call) RunAndReturn ¶
func (_c *Guard_IsAllowed_Call) RunAndReturn(run func(*ladon.Request) error) *Guard_IsAllowed_Call
type Guard_UpdatePolicy_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 (_c *Guard_UpdatePolicy_Call) Return(_a0 error) *Guard_UpdatePolicy_Call
func (*Guard_UpdatePolicy_Call) Run ¶
func (_c *Guard_UpdatePolicy_Call) Run(run func(pol ladon.Policy)) *Guard_UpdatePolicy_Call
func (*Guard_UpdatePolicy_Call) RunAndReturn ¶
func (_c *Guard_UpdatePolicy_Call) RunAndReturn(run func(ladon.Policy) error) *Guard_UpdatePolicy_Call
type Manager ¶
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) EXPECT ¶
func (_m *Manager) EXPECT() *Manager_Expecter
func (*Manager) FindPoliciesForResource ¶
FindPoliciesForResource provides a mock function with given fields: resource
func (*Manager) FindPoliciesForSubject ¶
FindPoliciesForSubject provides a mock function with given fields: subject
func (*Manager) FindRequestCandidates ¶
FindRequestCandidates provides a mock function with given fields: r
type Manager_Create_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 (_c *Manager_Create_Call) Return(_a0 error) *Manager_Create_Call
func (*Manager_Create_Call) Run ¶
func (_c *Manager_Create_Call) Run(run func(policy ladon.Policy)) *Manager_Create_Call
func (*Manager_Create_Call) RunAndReturn ¶
func (_c *Manager_Create_Call) RunAndReturn(run func(ladon.Policy) error) *Manager_Create_Call
type Manager_Delete_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 (_c *Manager_Delete_Call) Return(_a0 error) *Manager_Delete_Call
func (*Manager_Delete_Call) Run ¶
func (_c *Manager_Delete_Call) Run(run func(id string)) *Manager_Delete_Call
func (*Manager_Delete_Call) RunAndReturn ¶
func (_c *Manager_Delete_Call) RunAndReturn(run func(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(policy interface{}) *Manager_Create_Call
Create is a helper method to define mock.On call
- policy ladon.Policy
func (*Manager_Expecter) Delete ¶
func (_e *Manager_Expecter) Delete(id interface{}) *Manager_Delete_Call
Delete is a helper method to define mock.On call
- id string
func (*Manager_Expecter) FindPoliciesForResource ¶
func (_e *Manager_Expecter) FindPoliciesForResource(resource interface{}) *Manager_FindPoliciesForResource_Call
FindPoliciesForResource is a helper method to define mock.On call
- resource string
func (*Manager_Expecter) FindPoliciesForSubject ¶
func (_e *Manager_Expecter) FindPoliciesForSubject(subject interface{}) *Manager_FindPoliciesForSubject_Call
FindPoliciesForSubject is a helper method to define mock.On call
- subject string
func (*Manager_Expecter) FindRequestCandidates ¶
func (_e *Manager_Expecter) FindRequestCandidates(r interface{}) *Manager_FindRequestCandidates_Call
FindRequestCandidates is a helper method to define mock.On call
- r *ladon.Request
func (*Manager_Expecter) Get ¶
func (_e *Manager_Expecter) Get(id interface{}) *Manager_Get_Call
Get is a helper method to define mock.On call
- id string
func (*Manager_Expecter) GetAll ¶
func (_e *Manager_Expecter) GetAll(limit interface{}, offset interface{}) *Manager_GetAll_Call
GetAll is a helper method to define mock.On call
- limit int64
- offset int64
func (*Manager_Expecter) Update ¶
func (_e *Manager_Expecter) Update(policy interface{}) *Manager_Update_Call
Update is a helper method to define mock.On call
- policy ladon.Policy
type Manager_FindPoliciesForResource_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 (_c *Manager_FindPoliciesForResource_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindPoliciesForResource_Call
func (*Manager_FindPoliciesForResource_Call) Run ¶
func (_c *Manager_FindPoliciesForResource_Call) Run(run func(resource string)) *Manager_FindPoliciesForResource_Call
func (*Manager_FindPoliciesForResource_Call) RunAndReturn ¶
func (_c *Manager_FindPoliciesForResource_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Manager_FindPoliciesForResource_Call
type Manager_FindPoliciesForSubject_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 (_c *Manager_FindPoliciesForSubject_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindPoliciesForSubject_Call
func (*Manager_FindPoliciesForSubject_Call) Run ¶
func (_c *Manager_FindPoliciesForSubject_Call) Run(run func(subject string)) *Manager_FindPoliciesForSubject_Call
func (*Manager_FindPoliciesForSubject_Call) RunAndReturn ¶
func (_c *Manager_FindPoliciesForSubject_Call) RunAndReturn(run func(string) (ladon.Policies, error)) *Manager_FindPoliciesForSubject_Call
type Manager_FindRequestCandidates_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 (_c *Manager_FindRequestCandidates_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_FindRequestCandidates_Call
func (*Manager_FindRequestCandidates_Call) Run ¶
func (_c *Manager_FindRequestCandidates_Call) Run(run func(r *ladon.Request)) *Manager_FindRequestCandidates_Call
func (*Manager_FindRequestCandidates_Call) RunAndReturn ¶
func (_c *Manager_FindRequestCandidates_Call) RunAndReturn(run func(*ladon.Request) (ladon.Policies, error)) *Manager_FindRequestCandidates_Call
type Manager_GetAll_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 (_c *Manager_GetAll_Call) Return(_a0 ladon.Policies, _a1 error) *Manager_GetAll_Call
func (*Manager_GetAll_Call) Run ¶
func (_c *Manager_GetAll_Call) Run(run func(limit int64, offset int64)) *Manager_GetAll_Call
func (*Manager_GetAll_Call) RunAndReturn ¶
func (_c *Manager_GetAll_Call) RunAndReturn(run func(int64, int64) (ladon.Policies, error)) *Manager_GetAll_Call
type Manager_Get_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(id string)) *Manager_Get_Call
func (*Manager_Get_Call) RunAndReturn ¶
func (_c *Manager_Get_Call) RunAndReturn(run func(string) (ladon.Policy, error)) *Manager_Get_Call
type Manager_Update_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 (_c *Manager_Update_Call) Return(_a0 error) *Manager_Update_Call
func (*Manager_Update_Call) Run ¶
func (_c *Manager_Update_Call) Run(run func(policy ladon.Policy)) *Manager_Update_Call
func (*Manager_Update_Call) RunAndReturn ¶
func (_c *Manager_Update_Call) RunAndReturn(run func(ladon.Policy) error) *Manager_Update_Call