Documentation ¶
Index ¶
- type Repository
- func (_m *Repository) Create(_a0 context.Context, _a1 silence.Silence) (string, error)
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) Get(ctx context.Context, id string) (silence.Silence, error)
- func (_m *Repository) List(_a0 context.Context, _a1 silence.Filter) ([]silence.Silence, error)
- func (_m *Repository) SoftDelete(ctx context.Context, id string) error
- type Repository_Create_Call
- func (_c *Repository_Create_Call) Return(_a0 string, _a1 error) *Repository_Create_Call
- func (_c *Repository_Create_Call) Run(run func(_a0 context.Context, _a1 silence.Silence)) *Repository_Create_Call
- func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, silence.Silence) (string, error)) *Repository_Create_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Create(_a0 interface{}, _a1 interface{}) *Repository_Create_Call
- func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call
- func (_e *Repository_Expecter) List(_a0 interface{}, _a1 interface{}) *Repository_List_Call
- func (_e *Repository_Expecter) SoftDelete(ctx interface{}, id interface{}) *Repository_SoftDelete_Call
- type Repository_Get_Call
- func (_c *Repository_Get_Call) Return(_a0 silence.Silence, _a1 error) *Repository_Get_Call
- func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id string)) *Repository_Get_Call
- func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, string) (silence.Silence, error)) *Repository_Get_Call
- type Repository_List_Call
- func (_c *Repository_List_Call) Return(_a0 []silence.Silence, _a1 error) *Repository_List_Call
- func (_c *Repository_List_Call) Run(run func(_a0 context.Context, _a1 silence.Filter)) *Repository_List_Call
- func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, silence.Filter) ([]silence.Silence, error)) *Repository_List_Call
- type Repository_SoftDelete_Call
- func (_c *Repository_SoftDelete_Call) Return(_a0 error) *Repository_SoftDelete_Call
- func (_c *Repository_SoftDelete_Call) Run(run func(ctx context.Context, id string)) *Repository_SoftDelete_Call
- func (_c *Repository_SoftDelete_Call) RunAndReturn(run func(context.Context, string) error) *Repository_SoftDelete_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶ added in v0.6.12
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶ added in v0.6.12
func NewRepository(t interface { mock.TestingT Cleanup(func()) }) *Repository
NewRepository creates a new instance of Repository. 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 (*Repository) Create ¶ added in v0.6.12
Create provides a mock function with given fields: _a0, _a1
func (*Repository) EXPECT ¶ added in v0.6.12
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) List ¶ added in v0.6.12
List provides a mock function with given fields: _a0, _a1
func (*Repository) SoftDelete ¶ added in v0.6.12
func (_m *Repository) SoftDelete(ctx context.Context, id string) error
SoftDelete provides a mock function with given fields: ctx, id
type Repository_Create_Call ¶ added in v0.6.12
Repository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*Repository_Create_Call) Return ¶ added in v0.6.12
func (_c *Repository_Create_Call) Return(_a0 string, _a1 error) *Repository_Create_Call
func (*Repository_Create_Call) Run ¶ added in v0.6.12
func (_c *Repository_Create_Call) Run(run func(_a0 context.Context, _a1 silence.Silence)) *Repository_Create_Call
func (*Repository_Create_Call) RunAndReturn ¶ added in v0.6.12
func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, silence.Silence) (string, error)) *Repository_Create_Call
type Repository_Expecter ¶ added in v0.6.12
type Repository_Expecter struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter) Create ¶ added in v0.6.12
func (_e *Repository_Expecter) Create(_a0 interface{}, _a1 interface{}) *Repository_Create_Call
Create is a helper method to define mock.On call
- _a0 context.Context
- _a1 silence.Silence
func (*Repository_Expecter) Get ¶ added in v0.6.12
func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- id string
func (*Repository_Expecter) List ¶ added in v0.6.12
func (_e *Repository_Expecter) List(_a0 interface{}, _a1 interface{}) *Repository_List_Call
List is a helper method to define mock.On call
- _a0 context.Context
- _a1 silence.Filter
func (*Repository_Expecter) SoftDelete ¶ added in v0.6.12
func (_e *Repository_Expecter) SoftDelete(ctx interface{}, id interface{}) *Repository_SoftDelete_Call
SoftDelete is a helper method to define mock.On call
- ctx context.Context
- id string
type Repository_Get_Call ¶ added in v0.6.12
Repository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Repository_Get_Call) Return ¶ added in v0.6.12
func (_c *Repository_Get_Call) Return(_a0 silence.Silence, _a1 error) *Repository_Get_Call
func (*Repository_Get_Call) Run ¶ added in v0.6.12
func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id string)) *Repository_Get_Call
func (*Repository_Get_Call) RunAndReturn ¶ added in v0.6.12
func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, string) (silence.Silence, error)) *Repository_Get_Call
type Repository_List_Call ¶ added in v0.6.12
Repository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*Repository_List_Call) Return ¶ added in v0.6.12
func (_c *Repository_List_Call) Return(_a0 []silence.Silence, _a1 error) *Repository_List_Call
func (*Repository_List_Call) Run ¶ added in v0.6.12
func (_c *Repository_List_Call) Run(run func(_a0 context.Context, _a1 silence.Filter)) *Repository_List_Call
func (*Repository_List_Call) RunAndReturn ¶ added in v0.6.12
func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, silence.Filter) ([]silence.Silence, error)) *Repository_List_Call
type Repository_SoftDelete_Call ¶ added in v0.6.12
Repository_SoftDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SoftDelete'
func (*Repository_SoftDelete_Call) Return ¶ added in v0.6.12
func (_c *Repository_SoftDelete_Call) Return(_a0 error) *Repository_SoftDelete_Call
func (*Repository_SoftDelete_Call) Run ¶ added in v0.6.12
func (_c *Repository_SoftDelete_Call) Run(run func(ctx context.Context, id string)) *Repository_SoftDelete_Call
func (*Repository_SoftDelete_Call) RunAndReturn ¶ added in v0.6.12
func (_c *Repository_SoftDelete_Call) RunAndReturn(run func(context.Context, string) error) *Repository_SoftDelete_Call