/
index.go
154 lines (132 loc) · 5.75 KB
/
index.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/baetyl/baetyl-cloud/v2/plugin (interfaces: Index)
// Package plugin is a generated GoMock package.
package plugin
import (
sql "database/sql"
common "github.com/baetyl/baetyl-cloud/v2/common"
gomock "github.com/golang/mock/gomock"
sqlx "github.com/jmoiron/sqlx"
reflect "reflect"
)
// MockIndex is a mock of Index interface
type MockIndex struct {
ctrl *gomock.Controller
recorder *MockIndexMockRecorder
}
// MockIndexMockRecorder is the mock recorder for MockIndex
type MockIndexMockRecorder struct {
mock *MockIndex
}
// NewMockIndex creates a new mock instance
func NewMockIndex(ctrl *gomock.Controller) *MockIndex {
mock := &MockIndex{ctrl: ctrl}
mock.recorder = &MockIndexMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockIndex) EXPECT() *MockIndexMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockIndex) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close
func (mr *MockIndexMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIndex)(nil).Close))
}
// CreateIndex mocks base method
func (m *MockIndex) CreateIndex(arg0 string, arg1, arg2 common.Resource, arg3, arg4 string) (sql.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateIndex", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(sql.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateIndex indicates an expected call of CreateIndex
func (mr *MockIndexMockRecorder) CreateIndex(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateIndex", reflect.TypeOf((*MockIndex)(nil).CreateIndex), arg0, arg1, arg2, arg3, arg4)
}
// CreateIndexTx mocks base method
func (m *MockIndex) CreateIndexTx(arg0 *sqlx.Tx, arg1 string, arg2, arg3 common.Resource, arg4, arg5 string) (sql.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateIndexTx", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(sql.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateIndexTx indicates an expected call of CreateIndexTx
func (mr *MockIndexMockRecorder) CreateIndexTx(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateIndexTx", reflect.TypeOf((*MockIndex)(nil).CreateIndexTx), arg0, arg1, arg2, arg3, arg4, arg5)
}
// DeleteIndex mocks base method
func (m *MockIndex) DeleteIndex(arg0 string, arg1, arg2 common.Resource, arg3 string) (sql.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteIndex", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(sql.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteIndex indicates an expected call of DeleteIndex
func (mr *MockIndexMockRecorder) DeleteIndex(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteIndex", reflect.TypeOf((*MockIndex)(nil).DeleteIndex), arg0, arg1, arg2, arg3)
}
// DeleteIndexTx mocks base method
func (m *MockIndex) DeleteIndexTx(arg0 *sqlx.Tx, arg1 string, arg2, arg3 common.Resource, arg4 string) (sql.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteIndexTx", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(sql.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteIndexTx indicates an expected call of DeleteIndexTx
func (mr *MockIndexMockRecorder) DeleteIndexTx(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteIndexTx", reflect.TypeOf((*MockIndex)(nil).DeleteIndexTx), arg0, arg1, arg2, arg3, arg4)
}
// ListIndex mocks base method
func (m *MockIndex) ListIndex(arg0 string, arg1, arg2 common.Resource, arg3 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListIndex", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListIndex indicates an expected call of ListIndex
func (mr *MockIndexMockRecorder) ListIndex(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListIndex", reflect.TypeOf((*MockIndex)(nil).ListIndex), arg0, arg1, arg2, arg3)
}
// ListIndexTx mocks base method
func (m *MockIndex) ListIndexTx(arg0 *sqlx.Tx, arg1 string, arg2, arg3 common.Resource, arg4 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListIndexTx", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListIndexTx indicates an expected call of ListIndexTx
func (mr *MockIndexMockRecorder) ListIndexTx(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListIndexTx", reflect.TypeOf((*MockIndex)(nil).ListIndexTx), arg0, arg1, arg2, arg3, arg4)
}
// RefreshIndex mocks base method
func (m *MockIndex) RefreshIndex(arg0 interface{}, arg1 string, arg2, arg3 common.Resource, arg4 string, arg5 []string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RefreshIndex", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(error)
return ret0
}
// RefreshIndex indicates an expected call of RefreshIndex
func (mr *MockIndexMockRecorder) RefreshIndex(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshIndex", reflect.TypeOf((*MockIndex)(nil).RefreshIndex), arg0, arg1, arg2, arg3, arg4, arg5)
}