-
Notifications
You must be signed in to change notification settings - Fork 33
/
mock.go
138 lines (121 loc) · 5.52 KB
/
mock.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by MockGen. DO NOT EDIT.
// Source: ../repositories/client.go
// Package repositories is a generated GoMock package.
package repositories
import (
context "context"
reflect "reflect"
repository "github.com/argoproj/argo-cd/v2/pkg/apiclient/repository"
v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
gomock "github.com/golang/mock/gomock"
grpc "google.golang.org/grpc"
)
// MockRepositoryServiceClient is a mock of RepositoryServiceClient interface.
type MockRepositoryServiceClient struct {
ctrl *gomock.Controller
recorder *MockRepositoryServiceClientMockRecorder
}
// MockRepositoryServiceClientMockRecorder is the mock recorder for MockRepositoryServiceClient.
type MockRepositoryServiceClientMockRecorder struct {
mock *MockRepositoryServiceClient
}
// NewMockRepositoryServiceClient creates a new mock instance.
func NewMockRepositoryServiceClient(ctrl *gomock.Controller) *MockRepositoryServiceClient {
mock := &MockRepositoryServiceClient{ctrl: ctrl}
mock.recorder = &MockRepositoryServiceClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRepositoryServiceClient) EXPECT() *MockRepositoryServiceClientMockRecorder {
return m.recorder
}
// CreateRepository mocks base method.
func (m *MockRepositoryServiceClient) CreateRepository(ctx context.Context, in *repository.RepoCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Repository, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CreateRepository", varargs...)
ret0, _ := ret[0].(*v1alpha1.Repository)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateRepository indicates an expected call of CreateRepository.
func (mr *MockRepositoryServiceClientMockRecorder) CreateRepository(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRepository", reflect.TypeOf((*MockRepositoryServiceClient)(nil).CreateRepository), varargs...)
}
// DeleteRepository mocks base method.
func (m *MockRepositoryServiceClient) DeleteRepository(ctx context.Context, in *repository.RepoQuery, opts ...grpc.CallOption) (*repository.RepoResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DeleteRepository", varargs...)
ret0, _ := ret[0].(*repository.RepoResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteRepository indicates an expected call of DeleteRepository.
func (mr *MockRepositoryServiceClientMockRecorder) DeleteRepository(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRepository", reflect.TypeOf((*MockRepositoryServiceClient)(nil).DeleteRepository), varargs...)
}
// Get mocks base method.
func (m *MockRepositoryServiceClient) Get(ctx context.Context, in *repository.RepoQuery, opts ...grpc.CallOption) (*v1alpha1.Repository, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Get", varargs...)
ret0, _ := ret[0].(*v1alpha1.Repository)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockRepositoryServiceClientMockRecorder) Get(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRepositoryServiceClient)(nil).Get), varargs...)
}
// ListRepositories mocks base method.
func (m *MockRepositoryServiceClient) ListRepositories(ctx context.Context, in *repository.RepoQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryList, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListRepositories", varargs...)
ret0, _ := ret[0].(*v1alpha1.RepositoryList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListRepositories indicates an expected call of ListRepositories.
func (mr *MockRepositoryServiceClientMockRecorder) ListRepositories(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRepositories", reflect.TypeOf((*MockRepositoryServiceClient)(nil).ListRepositories), varargs...)
}
// UpdateRepository mocks base method.
func (m *MockRepositoryServiceClient) UpdateRepository(ctx context.Context, in *repository.RepoUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Repository, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpdateRepository", varargs...)
ret0, _ := ret[0].(*v1alpha1.Repository)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateRepository indicates an expected call of UpdateRepository.
func (mr *MockRepositoryServiceClientMockRecorder) UpdateRepository(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRepository", reflect.TypeOf((*MockRepositoryServiceClient)(nil).UpdateRepository), varargs...)
}