Documentation
¶
Index ¶
- type Gate
- func (_m *Gate) After(...)
- func (_m *Gate) Allows(ability string, arguments map[string]interface{}) bool
- func (_m *Gate) Any(abilities []string, arguments map[string]interface{}) bool
- func (_m *Gate) Before(callback func(context.Context, string, map[string]interface{}) access.Response)
- func (_m *Gate) Define(ability string, ...)
- func (_m *Gate) Denies(ability string, arguments map[string]interface{}) bool
- func (_m *Gate) EXPECT() *Gate_Expecter
- func (_m *Gate) Inspect(ability string, arguments map[string]interface{}) access.Response
- func (_m *Gate) None(abilities []string, arguments map[string]interface{}) bool
- func (_m *Gate) WithContext(ctx context.Context) access.Gate
- type Gate_After_Call
- type Gate_Allows_Call
- type Gate_Any_Call
- type Gate_Before_Call
- type Gate_Define_Call
- type Gate_Denies_Call
- type Gate_Expecter
- func (_e *Gate_Expecter) After(callback interface{}) *Gate_After_Call
- func (_e *Gate_Expecter) Allows(ability interface{}, arguments interface{}) *Gate_Allows_Call
- func (_e *Gate_Expecter) Any(abilities interface{}, arguments interface{}) *Gate_Any_Call
- func (_e *Gate_Expecter) Before(callback interface{}) *Gate_Before_Call
- func (_e *Gate_Expecter) Define(ability interface{}, callback interface{}) *Gate_Define_Call
- func (_e *Gate_Expecter) Denies(ability interface{}, arguments interface{}) *Gate_Denies_Call
- func (_e *Gate_Expecter) Inspect(ability interface{}, arguments interface{}) *Gate_Inspect_Call
- func (_e *Gate_Expecter) None(abilities interface{}, arguments interface{}) *Gate_None_Call
- func (_e *Gate_Expecter) WithContext(ctx interface{}) *Gate_WithContext_Call
- type Gate_Inspect_Call
- func (_c *Gate_Inspect_Call) Return(_a0 access.Response) *Gate_Inspect_Call
- func (_c *Gate_Inspect_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Inspect_Call
- func (_c *Gate_Inspect_Call) RunAndReturn(run func(string, map[string]interface{}) access.Response) *Gate_Inspect_Call
- type Gate_None_Call
- type Gate_WithContext_Call
- type Response
- type Response_Allowed_Call
- type Response_Expecter
- type Response_Message_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gate ¶
Gate is an autogenerated mock type for the Gate type
func NewGate ¶
NewGate creates a new instance of Gate. 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 (*Gate) After ¶
func (_m *Gate) After(callback func(context.Context, string, map[string]interface{}, access.Response) access.Response)
After provides a mock function with given fields: callback
func (*Gate) Before ¶
func (_m *Gate) Before(callback func(context.Context, string, map[string]interface{}) access.Response)
Before provides a mock function with given fields: callback
func (*Gate) Define ¶
func (_m *Gate) Define(ability string, callback func(context.Context, map[string]interface{}) access.Response)
Define provides a mock function with given fields: ability, callback
func (*Gate) EXPECT ¶
func (_m *Gate) EXPECT() *Gate_Expecter
type Gate_After_Call ¶
Gate_After_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'After'
func (*Gate_After_Call) Return ¶
func (_c *Gate_After_Call) Return() *Gate_After_Call
func (*Gate_After_Call) Run ¶
func (_c *Gate_After_Call) Run(run func(callback func(context.Context, string, map[string]interface{}, access.Response) access.Response)) *Gate_After_Call
func (*Gate_After_Call) RunAndReturn ¶
func (_c *Gate_After_Call) RunAndReturn(run func(func(context.Context, string, map[string]interface{}, access.Response) access.Response)) *Gate_After_Call
type Gate_Allows_Call ¶
Gate_Allows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Allows'
func (*Gate_Allows_Call) Return ¶
func (_c *Gate_Allows_Call) Return(_a0 bool) *Gate_Allows_Call
func (*Gate_Allows_Call) Run ¶
func (_c *Gate_Allows_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Allows_Call
func (*Gate_Allows_Call) RunAndReturn ¶
func (_c *Gate_Allows_Call) RunAndReturn(run func(string, map[string]interface{}) bool) *Gate_Allows_Call
type Gate_Any_Call ¶
Gate_Any_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Any'
func (*Gate_Any_Call) Return ¶
func (_c *Gate_Any_Call) Return(_a0 bool) *Gate_Any_Call
func (*Gate_Any_Call) Run ¶
func (_c *Gate_Any_Call) Run(run func(abilities []string, arguments map[string]interface{})) *Gate_Any_Call
func (*Gate_Any_Call) RunAndReturn ¶
func (_c *Gate_Any_Call) RunAndReturn(run func([]string, map[string]interface{}) bool) *Gate_Any_Call
type Gate_Before_Call ¶
Gate_Before_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Before'
func (*Gate_Before_Call) Return ¶
func (_c *Gate_Before_Call) Return() *Gate_Before_Call
func (*Gate_Before_Call) Run ¶
func (_c *Gate_Before_Call) Run(run func(callback func(context.Context, string, map[string]interface{}) access.Response)) *Gate_Before_Call
func (*Gate_Before_Call) RunAndReturn ¶
func (_c *Gate_Before_Call) RunAndReturn(run func(func(context.Context, string, map[string]interface{}) access.Response)) *Gate_Before_Call
type Gate_Define_Call ¶
Gate_Define_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Define'
func (*Gate_Define_Call) Return ¶
func (_c *Gate_Define_Call) Return() *Gate_Define_Call
func (*Gate_Define_Call) Run ¶
func (_c *Gate_Define_Call) Run(run func(ability string, callback func(context.Context, map[string]interface{}) access.Response)) *Gate_Define_Call
func (*Gate_Define_Call) RunAndReturn ¶
func (_c *Gate_Define_Call) RunAndReturn(run func(string, func(context.Context, map[string]interface{}) access.Response)) *Gate_Define_Call
type Gate_Denies_Call ¶
Gate_Denies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Denies'
func (*Gate_Denies_Call) Return ¶
func (_c *Gate_Denies_Call) Return(_a0 bool) *Gate_Denies_Call
func (*Gate_Denies_Call) Run ¶
func (_c *Gate_Denies_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Denies_Call
func (*Gate_Denies_Call) RunAndReturn ¶
func (_c *Gate_Denies_Call) RunAndReturn(run func(string, map[string]interface{}) bool) *Gate_Denies_Call
type Gate_Expecter ¶
type Gate_Expecter struct {
// contains filtered or unexported fields
}
func (*Gate_Expecter) After ¶
func (_e *Gate_Expecter) After(callback interface{}) *Gate_After_Call
After is a helper method to define mock.On call
- callback func(context.Context , string , map[string]interface{} , access.Response) access.Response
func (*Gate_Expecter) Allows ¶
func (_e *Gate_Expecter) Allows(ability interface{}, arguments interface{}) *Gate_Allows_Call
Allows is a helper method to define mock.On call
- ability string
- arguments map[string]interface{}
func (*Gate_Expecter) Any ¶
func (_e *Gate_Expecter) Any(abilities interface{}, arguments interface{}) *Gate_Any_Call
Any is a helper method to define mock.On call
- abilities []string
- arguments map[string]interface{}
func (*Gate_Expecter) Before ¶
func (_e *Gate_Expecter) Before(callback interface{}) *Gate_Before_Call
Before is a helper method to define mock.On call
- callback func(context.Context , string , map[string]interface{}) access.Response
func (*Gate_Expecter) Define ¶
func (_e *Gate_Expecter) Define(ability interface{}, callback interface{}) *Gate_Define_Call
Define is a helper method to define mock.On call
- ability string
- callback func(context.Context , map[string]interface{}) access.Response
func (*Gate_Expecter) Denies ¶
func (_e *Gate_Expecter) Denies(ability interface{}, arguments interface{}) *Gate_Denies_Call
Denies is a helper method to define mock.On call
- ability string
- arguments map[string]interface{}
func (*Gate_Expecter) Inspect ¶
func (_e *Gate_Expecter) Inspect(ability interface{}, arguments interface{}) *Gate_Inspect_Call
Inspect is a helper method to define mock.On call
- ability string
- arguments map[string]interface{}
func (*Gate_Expecter) None ¶
func (_e *Gate_Expecter) None(abilities interface{}, arguments interface{}) *Gate_None_Call
None is a helper method to define mock.On call
- abilities []string
- arguments map[string]interface{}
func (*Gate_Expecter) WithContext ¶
func (_e *Gate_Expecter) WithContext(ctx interface{}) *Gate_WithContext_Call
WithContext is a helper method to define mock.On call
- ctx context.Context
type Gate_Inspect_Call ¶
Gate_Inspect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inspect'
func (*Gate_Inspect_Call) Return ¶
func (_c *Gate_Inspect_Call) Return(_a0 access.Response) *Gate_Inspect_Call
func (*Gate_Inspect_Call) Run ¶
func (_c *Gate_Inspect_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Inspect_Call
func (*Gate_Inspect_Call) RunAndReturn ¶
func (_c *Gate_Inspect_Call) RunAndReturn(run func(string, map[string]interface{}) access.Response) *Gate_Inspect_Call
type Gate_None_Call ¶
Gate_None_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'None'
func (*Gate_None_Call) Return ¶
func (_c *Gate_None_Call) Return(_a0 bool) *Gate_None_Call
func (*Gate_None_Call) Run ¶
func (_c *Gate_None_Call) Run(run func(abilities []string, arguments map[string]interface{})) *Gate_None_Call
func (*Gate_None_Call) RunAndReturn ¶
func (_c *Gate_None_Call) RunAndReturn(run func([]string, map[string]interface{}) bool) *Gate_None_Call
type Gate_WithContext_Call ¶
Gate_WithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithContext'
func (*Gate_WithContext_Call) Return ¶
func (_c *Gate_WithContext_Call) Return(_a0 access.Gate) *Gate_WithContext_Call
func (*Gate_WithContext_Call) Run ¶
func (_c *Gate_WithContext_Call) Run(run func(ctx context.Context)) *Gate_WithContext_Call
func (*Gate_WithContext_Call) RunAndReturn ¶
func (_c *Gate_WithContext_Call) RunAndReturn(run func(context.Context) access.Gate) *Gate_WithContext_Call
type Response ¶
Response is an autogenerated mock type for the Response type
func NewResponse ¶
NewResponse creates a new instance of Response. 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 (*Response) EXPECT ¶
func (_m *Response) EXPECT() *Response_Expecter
type Response_Allowed_Call ¶
Response_Allowed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Allowed'
func (*Response_Allowed_Call) Return ¶
func (_c *Response_Allowed_Call) Return(_a0 bool) *Response_Allowed_Call
func (*Response_Allowed_Call) Run ¶
func (_c *Response_Allowed_Call) Run(run func()) *Response_Allowed_Call
func (*Response_Allowed_Call) RunAndReturn ¶
func (_c *Response_Allowed_Call) RunAndReturn(run func() bool) *Response_Allowed_Call
type Response_Expecter ¶
type Response_Expecter struct {
// contains filtered or unexported fields
}
func (*Response_Expecter) Allowed ¶
func (_e *Response_Expecter) Allowed() *Response_Allowed_Call
Allowed is a helper method to define mock.On call
func (*Response_Expecter) Message ¶
func (_e *Response_Expecter) Message() *Response_Message_Call
Message is a helper method to define mock.On call
type Response_Message_Call ¶
Response_Message_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Message'
func (*Response_Message_Call) Return ¶
func (_c *Response_Message_Call) Return(_a0 string) *Response_Message_Call
func (*Response_Message_Call) Run ¶
func (_c *Response_Message_Call) Run(run func()) *Response_Message_Call
func (*Response_Message_Call) RunAndReturn ¶
func (_c *Response_Message_Call) RunAndReturn(run func() string) *Response_Message_Call