/
UserRepository.go
104 lines (83 loc) · 2.48 KB
/
UserRepository.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
entity "github.com/ardafirdausr/kaseer/internal/entity"
mock "github.com/stretchr/testify/mock"
)
// UserRepository is an autogenerated mock type for the UserRepository type
type UserRepository struct {
mock.Mock
}
// GetUserByEmail provides a mock function with given fields: ctx, email
func (_m *UserRepository) GetUserByEmail(ctx context.Context, email string) (*entity.User, error) {
ret := _m.Called(ctx, email)
var r0 *entity.User
if rf, ok := ret.Get(0).(func(context.Context, string) *entity.User); ok {
r0 = rf(ctx, email)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*entity.User)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, email)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetUserByID provides a mock function with given fields: ctx, ID
func (_m *UserRepository) GetUserByID(ctx context.Context, ID int64) (*entity.User, error) {
ret := _m.Called(ctx, ID)
var r0 *entity.User
if rf, ok := ret.Get(0).(func(context.Context, int64) *entity.User); ok {
r0 = rf(ctx, ID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*entity.User)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, ID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateByID provides a mock function with given fields: ctx, ID, param
func (_m *UserRepository) UpdateByID(ctx context.Context, ID int64, param entity.UpdateUserParam) (bool, error) {
ret := _m.Called(ctx, ID, param)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int64, entity.UpdateUserParam) bool); ok {
r0 = rf(ctx, ID, param)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, entity.UpdateUserParam) error); ok {
r1 = rf(ctx, ID, param)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdatePasswordByID provides a mock function with given fields: ctx, ID, password
func (_m *UserRepository) UpdatePasswordByID(ctx context.Context, ID int64, password string) (bool, error) {
ret := _m.Called(ctx, ID, password)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int64, string) bool); ok {
r0 = rf(ctx, ID, password)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, ID, password)
} else {
r1 = ret.Error(1)
}
return r0, r1
}