mocks

package
v0.12.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleService

type RuleService struct {
	mock.Mock
}

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) Create

func (_mock *RuleService) Create(ctx context.Context, rule models.Rule) (models.Rule, error)

Create provides a mock function for the type RuleService

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) Get

func (_mock *RuleService) Get(ctx context.Context, id string) (models.Rule, error)

Get provides a mock function for the type RuleService

func (*RuleService) List

func (_mock *RuleService) List(ctx context.Context) ([]models.Rule, error)

List provides a mock function for the type RuleService

func (*RuleService) Update

func (_mock *RuleService) Update(ctx context.Context, id string, rule models.Rule) (models.Rule, error)

Update provides a mock function for the type RuleService

type RuleService_Create_Call

type RuleService_Create_Call struct {
	*mock.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 (*RuleService_Create_Call) Run

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

type RuleService_Delete_Call struct {
	*mock.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 (*RuleService_Delete_Call) Run

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) 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_Get_Call

type RuleService_Get_Call struct {
	*mock.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 (*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

type RuleService_List_Call struct {
	*mock.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 (*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

type RuleService_Update_Call struct {
	*mock.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 (*RuleService_Update_Call) Run

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

Jump to

Keyboard shortcuts

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