generated from go-rel/gin-example
/
service.go
69 lines (53 loc) · 1.65 KB
/
service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Code generated by mockery 2.9.0. DO NOT EDIT.
package todostest
import (
context "context"
rel "github.com/go-rel/rel"
mock "github.com/stretchr/testify/mock"
todos "github.com/kzaun/moutfire/todos"
)
// Service is an autogenerated mock type for the Service type
type Service struct {
mock.Mock
}
// Clear provides a mock function with given fields: ctx
func (_m *Service) Clear(ctx context.Context) {
_m.Called(ctx)
}
// Create provides a mock function with given fields: ctx, todo
func (_m *Service) Create(ctx context.Context, todo *todos.Todo) error {
ret := _m.Called(ctx, todo)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *todos.Todo) error); ok {
r0 = rf(ctx, todo)
} else {
r0 = ret.Error(0)
}
return r0
}
// Delete provides a mock function with given fields: ctx, todo
func (_m *Service) Delete(ctx context.Context, todo *todos.Todo) {
_m.Called(ctx, todo)
}
// Search provides a mock function with given fields: ctx, _a1, filter
func (_m *Service) Search(ctx context.Context, _a1 *[]todos.Todo, filter todos.Filter) error {
ret := _m.Called(ctx, _a1, filter)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *[]todos.Todo, todos.Filter) error); ok {
r0 = rf(ctx, _a1, filter)
} else {
r0 = ret.Error(0)
}
return r0
}
// Update provides a mock function with given fields: ctx, todo, changes
func (_m *Service) Update(ctx context.Context, todo *todos.Todo, changes rel.Changeset) error {
ret := _m.Called(ctx, todo, changes)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *todos.Todo, rel.Changeset) error); ok {
r0 = rf(ctx, todo, changes)
} else {
r0 = ret.Error(0)
}
return r0
}