Documentation
¶
Index ¶
- type RuleService
- func (_mock *RuleService) Create(ctx context.Context, rule models.Rule) (models.Rule, error)
- func (_mock *RuleService) Delete(ctx context.Context, id string) error
- func (_m *RuleService) EXPECT() *RuleService_Expecter
- func (_mock *RuleService) Get(ctx context.Context, id string) (models.Rule, error)
- func (_mock *RuleService) GetAllRuleOptions(ctx context.Context) (*models.RuleOptions, error)
- func (_mock *RuleService) List(ctx context.Context) ([]models.Rule, error)
- func (_mock *RuleService) Update(ctx context.Context, id string, rule models.Rule) (models.Rule, error)
- type RuleService_Create_Call
- func (_c *RuleService_Create_Call) Return(rule1 models.Rule, err error) *RuleService_Create_Call
- func (_c *RuleService_Create_Call) Run(run func(ctx context.Context, rule models.Rule)) *RuleService_Create_Call
- func (_c *RuleService_Create_Call) RunAndReturn(run func(ctx context.Context, rule models.Rule) (models.Rule, error)) *RuleService_Create_Call
- type RuleService_Delete_Call
- func (_c *RuleService_Delete_Call) Return(err error) *RuleService_Delete_Call
- func (_c *RuleService_Delete_Call) Run(run func(ctx context.Context, id string)) *RuleService_Delete_Call
- func (_c *RuleService_Delete_Call) RunAndReturn(run func(ctx context.Context, id string) error) *RuleService_Delete_Call
- type RuleService_Expecter
- func (_e *RuleService_Expecter) Create(ctx interface{}, rule interface{}) *RuleService_Create_Call
- func (_e *RuleService_Expecter) Delete(ctx interface{}, id interface{}) *RuleService_Delete_Call
- func (_e *RuleService_Expecter) Get(ctx interface{}, id interface{}) *RuleService_Get_Call
- func (_e *RuleService_Expecter) GetAllRuleOptions(ctx interface{}) *RuleService_GetAllRuleOptions_Call
- func (_e *RuleService_Expecter) List(ctx interface{}) *RuleService_List_Call
- func (_e *RuleService_Expecter) Update(ctx interface{}, id interface{}, rule interface{}) *RuleService_Update_Call
- type RuleService_GetAllRuleOptions_Call
- func (_c *RuleService_GetAllRuleOptions_Call) Return(ruleOptions *models.RuleOptions, err error) *RuleService_GetAllRuleOptions_Call
- func (_c *RuleService_GetAllRuleOptions_Call) Run(run func(ctx context.Context)) *RuleService_GetAllRuleOptions_Call
- func (_c *RuleService_GetAllRuleOptions_Call) RunAndReturn(run func(ctx context.Context) (*models.RuleOptions, error)) *RuleService_GetAllRuleOptions_Call
- type RuleService_Get_Call
- func (_c *RuleService_Get_Call) Return(rule models.Rule, err error) *RuleService_Get_Call
- func (_c *RuleService_Get_Call) Run(run func(ctx context.Context, id string)) *RuleService_Get_Call
- func (_c *RuleService_Get_Call) RunAndReturn(run func(ctx context.Context, id string) (models.Rule, error)) *RuleService_Get_Call
- type RuleService_List_Call
- func (_c *RuleService_List_Call) Return(rules []models.Rule, err error) *RuleService_List_Call
- func (_c *RuleService_List_Call) Run(run func(ctx context.Context)) *RuleService_List_Call
- func (_c *RuleService_List_Call) RunAndReturn(run func(ctx context.Context) ([]models.Rule, error)) *RuleService_List_Call
- type RuleService_Update_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleService ¶
RuleService is an autogenerated mock type for the RuleService type
func NewRuleService ¶
func NewRuleService(t interface {
mock.TestingT
Cleanup(func())
}) *RuleService
NewRuleService creates a new instance of RuleService. 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 (*RuleService) Delete ¶
func (_mock *RuleService) Delete(ctx context.Context, id string) error
Delete provides a mock function for the type RuleService
func (*RuleService) EXPECT ¶
func (_m *RuleService) EXPECT() *RuleService_Expecter
func (*RuleService) GetAllRuleOptions ¶
func (_mock *RuleService) GetAllRuleOptions(ctx context.Context) (*models.RuleOptions, error)
GetAllRuleOptions provides a mock function for the type RuleService
type RuleService_Create_Call ¶
RuleService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*RuleService_Create_Call) Return ¶
func (_c *RuleService_Create_Call) Return(rule1 models.Rule, err error) *RuleService_Create_Call
func (*RuleService_Create_Call) Run ¶
func (_c *RuleService_Create_Call) Run(run func(ctx context.Context, rule models.Rule)) *RuleService_Create_Call
func (*RuleService_Create_Call) RunAndReturn ¶
func (_c *RuleService_Create_Call) RunAndReturn(run func(ctx context.Context, rule models.Rule) (models.Rule, error)) *RuleService_Create_Call
type RuleService_Delete_Call ¶
RuleService_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*RuleService_Delete_Call) Return ¶
func (_c *RuleService_Delete_Call) Return(err error) *RuleService_Delete_Call
func (*RuleService_Delete_Call) Run ¶
func (_c *RuleService_Delete_Call) Run(run func(ctx context.Context, id string)) *RuleService_Delete_Call
func (*RuleService_Delete_Call) RunAndReturn ¶
func (_c *RuleService_Delete_Call) RunAndReturn(run func(ctx context.Context, id string) error) *RuleService_Delete_Call
type RuleService_Expecter ¶
type RuleService_Expecter struct {
// contains filtered or unexported fields
}
func (*RuleService_Expecter) Create ¶
func (_e *RuleService_Expecter) Create(ctx interface{}, rule interface{}) *RuleService_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- rule models.Rule
func (*RuleService_Expecter) Delete ¶
func (_e *RuleService_Expecter) Delete(ctx interface{}, id interface{}) *RuleService_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id string
func (*RuleService_Expecter) Get ¶
func (_e *RuleService_Expecter) Get(ctx interface{}, id interface{}) *RuleService_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- id string
func (*RuleService_Expecter) GetAllRuleOptions ¶
func (_e *RuleService_Expecter) GetAllRuleOptions(ctx interface{}) *RuleService_GetAllRuleOptions_Call
GetAllRuleOptions is a helper method to define mock.On call
- ctx context.Context
func (*RuleService_Expecter) List ¶
func (_e *RuleService_Expecter) List(ctx interface{}) *RuleService_List_Call
List is a helper method to define mock.On call
- ctx context.Context
func (*RuleService_Expecter) Update ¶
func (_e *RuleService_Expecter) Update(ctx interface{}, id interface{}, rule interface{}) *RuleService_Update_Call
Update is a helper method to define mock.On call
- ctx context.Context
- id string
- rule models.Rule
type RuleService_GetAllRuleOptions_Call ¶
RuleService_GetAllRuleOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllRuleOptions'
func (*RuleService_GetAllRuleOptions_Call) Return ¶
func (_c *RuleService_GetAllRuleOptions_Call) Return(ruleOptions *models.RuleOptions, err error) *RuleService_GetAllRuleOptions_Call
func (*RuleService_GetAllRuleOptions_Call) Run ¶
func (_c *RuleService_GetAllRuleOptions_Call) Run(run func(ctx context.Context)) *RuleService_GetAllRuleOptions_Call
func (*RuleService_GetAllRuleOptions_Call) RunAndReturn ¶
func (_c *RuleService_GetAllRuleOptions_Call) RunAndReturn(run func(ctx context.Context) (*models.RuleOptions, error)) *RuleService_GetAllRuleOptions_Call
type RuleService_Get_Call ¶
RuleService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*RuleService_Get_Call) Return ¶
func (_c *RuleService_Get_Call) Return(rule models.Rule, err error) *RuleService_Get_Call
func (*RuleService_Get_Call) Run ¶
func (_c *RuleService_Get_Call) Run(run func(ctx context.Context, id string)) *RuleService_Get_Call
func (*RuleService_Get_Call) RunAndReturn ¶
func (_c *RuleService_Get_Call) RunAndReturn(run func(ctx context.Context, id string) (models.Rule, error)) *RuleService_Get_Call
type RuleService_List_Call ¶
RuleService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*RuleService_List_Call) Return ¶
func (_c *RuleService_List_Call) Return(rules []models.Rule, err error) *RuleService_List_Call
func (*RuleService_List_Call) Run ¶
func (_c *RuleService_List_Call) Run(run func(ctx context.Context)) *RuleService_List_Call
func (*RuleService_List_Call) RunAndReturn ¶
func (_c *RuleService_List_Call) RunAndReturn(run func(ctx context.Context) ([]models.Rule, error)) *RuleService_List_Call
type RuleService_Update_Call ¶
RuleService_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*RuleService_Update_Call) Return ¶
func (_c *RuleService_Update_Call) Return(rule1 models.Rule, err error) *RuleService_Update_Call
func (*RuleService_Update_Call) Run ¶
func (_c *RuleService_Update_Call) Run(run func(ctx context.Context, id string, rule models.Rule)) *RuleService_Update_Call
func (*RuleService_Update_Call) RunAndReturn ¶
func (_c *RuleService_Update_Call) RunAndReturn(run func(ctx context.Context, id string, rule models.Rule) (models.Rule, error)) *RuleService_Update_Call