-
Notifications
You must be signed in to change notification settings - Fork 468
/
zk_mock.go
114 lines (97 loc) · 3.41 KB
/
zk_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
// Code generated by MockGen. DO NOT EDIT.
// Source: zk.go
// Package zookeeper is a generated GoMock package.
package zookeeper
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
zk "github.com/go-zookeeper/zk"
)
// MockConn is a mock of Conn interface
type MockConn struct {
ctrl *gomock.Controller
recorder *MockConnMockRecorder
}
// MockConnMockRecorder is the mock recorder for MockConn
type MockConnMockRecorder struct {
mock *MockConn
}
// NewMockConn creates a new mock instance
func NewMockConn(ctrl *gomock.Controller) *MockConn {
mock := &MockConn{ctrl: ctrl}
mock.recorder = &MockConnMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockConn) EXPECT() *MockConnMockRecorder {
return m.recorder
}
// Create mocks base method
func (m *MockConn) Create(path string, data []byte, flags int32, acl []zk.ACL) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", path, data, flags, acl)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create
func (mr *MockConnMockRecorder) Create(path, data, flags, acl interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockConn)(nil).Create), path, data, flags, acl)
}
// Get mocks base method
func (m *MockConn) Get(path string) ([]byte, *zk.Stat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", path)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(*zk.Stat)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Get indicates an expected call of Get
func (mr *MockConnMockRecorder) Get(path interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockConn)(nil).Get), path)
}
// Set mocks base method
func (m *MockConn) Set(path string, data []byte, version int32) (*zk.Stat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Set", path, data, version)
ret0, _ := ret[0].(*zk.Stat)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Set indicates an expected call of Set
func (mr *MockConnMockRecorder) Set(path, data, version interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockConn)(nil).Set), path, data, version)
}
// Delete mocks base method
func (m *MockConn) Delete(path string, version int32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", path, version)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete
func (mr *MockConnMockRecorder) Delete(path, version interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockConn)(nil).Delete), path, version)
}
// Multi mocks base method
func (m *MockConn) Multi(ops ...interface{}) ([]zk.MultiResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range ops {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Multi", varargs...)
ret0, _ := ret[0].([]zk.MultiResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Multi indicates an expected call of Multi
func (mr *MockConnMockRecorder) Multi(ops ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Multi", reflect.TypeOf((*MockConn)(nil).Multi), ops...)
}