github.com/polarismesh/polaris@v1.17.8/common/conn/limit/mock_net/mock_conn.go (about) 1 /** 2 * Tencent is pleased to support the open source community by making Polaris available. 3 * 4 * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 5 * 6 * Licensed under the BSD 3-Clause License (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * https://opensource.org/licenses/BSD-3-Clause 11 * 12 * Unless required by applicable law or agreed to in writing, software distributed 13 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 14 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 15 * specific language governing permissions and limitations under the License. 16 */ 17 18 // Code generated by MockGen. DO NOT EDIT. 19 // Source: net (interfaces: Conn,Addr) 20 21 // Package mock_net is a generated GoMock package. 22 package mock_net 23 24 import ( 25 "net" 26 "reflect" 27 "time" 28 29 "github.com/golang/mock/gomock" 30 ) 31 32 // MockConn is a mock of Conn interface 33 type MockConn struct { 34 ctrl *gomock.Controller 35 recorder *MockConnMockRecorder 36 } 37 38 // MockConnMockRecorder is the mock recorder for MockConn 39 type MockConnMockRecorder struct { 40 mock *MockConn 41 } 42 43 // NewMockConn creates a new mock instance 44 func NewMockConn(ctrl *gomock.Controller) *MockConn { 45 mock := &MockConn{ctrl: ctrl} 46 mock.recorder = &MockConnMockRecorder{mock} 47 return mock 48 } 49 50 // EXPECT returns an object that allows the caller to indicate expected use 51 func (m *MockConn) EXPECT() *MockConnMockRecorder { 52 return m.recorder 53 } 54 55 // Close mocks base method 56 func (m *MockConn) Close() error { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "Close") 59 ret0, _ := ret[0].(error) 60 return ret0 61 } 62 63 // Close indicates an expected call of Close 64 func (mr *MockConnMockRecorder) Close() *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConn)(nil).Close)) 67 } 68 69 // LocalAddr mocks base method 70 func (m *MockConn) LocalAddr() net.Addr { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "LocalAddr") 73 ret0, _ := ret[0].(net.Addr) 74 return ret0 75 } 76 77 // LocalAddr indicates an expected call of LocalAddr 78 func (mr *MockConnMockRecorder) LocalAddr() *gomock.Call { 79 mr.mock.ctrl.T.Helper() 80 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockConn)(nil).LocalAddr)) 81 } 82 83 // Read mocks base method 84 func (m *MockConn) Read(arg0 []byte) (int, error) { 85 m.ctrl.T.Helper() 86 ret := m.ctrl.Call(m, "Read", arg0) 87 ret0, _ := ret[0].(int) 88 ret1, _ := ret[1].(error) 89 return ret0, ret1 90 } 91 92 // Read indicates an expected call of Read 93 func (mr *MockConnMockRecorder) Read(arg0 interface{}) *gomock.Call { 94 mr.mock.ctrl.T.Helper() 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockConn)(nil).Read), arg0) 96 } 97 98 // RemoteAddr mocks base method 99 func (m *MockConn) RemoteAddr() net.Addr { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "RemoteAddr") 102 ret0, _ := ret[0].(net.Addr) 103 return ret0 104 } 105 106 // RemoteAddr indicates an expected call of RemoteAddr 107 func (mr *MockConnMockRecorder) RemoteAddr() *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockConn)(nil).RemoteAddr)) 110 } 111 112 // SetDeadline mocks base method 113 func (m *MockConn) SetDeadline(arg0 time.Time) error { 114 m.ctrl.T.Helper() 115 ret := m.ctrl.Call(m, "SetDeadline", arg0) 116 ret0, _ := ret[0].(error) 117 return ret0 118 } 119 120 // SetDeadline indicates an expected call of SetDeadline 121 func (mr *MockConnMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call { 122 mr.mock.ctrl.T.Helper() 123 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockConn)(nil).SetDeadline), arg0) 124 } 125 126 // SetReadDeadline mocks base method 127 func (m *MockConn) SetReadDeadline(arg0 time.Time) error { 128 m.ctrl.T.Helper() 129 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 130 ret0, _ := ret[0].(error) 131 return ret0 132 } 133 134 // SetReadDeadline indicates an expected call of SetReadDeadline 135 func (mr *MockConnMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call { 136 mr.mock.ctrl.T.Helper() 137 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockConn)(nil).SetReadDeadline), arg0) 138 } 139 140 // SetWriteDeadline mocks base method 141 func (m *MockConn) SetWriteDeadline(arg0 time.Time) error { 142 m.ctrl.T.Helper() 143 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 144 ret0, _ := ret[0].(error) 145 return ret0 146 } 147 148 // SetWriteDeadline indicates an expected call of SetWriteDeadline 149 func (mr *MockConnMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call { 150 mr.mock.ctrl.T.Helper() 151 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockConn)(nil).SetWriteDeadline), arg0) 152 } 153 154 // Write mocks base method 155 func (m *MockConn) Write(arg0 []byte) (int, error) { 156 m.ctrl.T.Helper() 157 ret := m.ctrl.Call(m, "Write", arg0) 158 ret0, _ := ret[0].(int) 159 ret1, _ := ret[1].(error) 160 return ret0, ret1 161 } 162 163 // Write indicates an expected call of Write 164 func (mr *MockConnMockRecorder) Write(arg0 interface{}) *gomock.Call { 165 mr.mock.ctrl.T.Helper() 166 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockConn)(nil).Write), arg0) 167 } 168 169 // MockAddr is a mock of Addr interface 170 type MockAddr struct { 171 ctrl *gomock.Controller 172 recorder *MockAddrMockRecorder 173 } 174 175 // MockAddrMockRecorder is the mock recorder for MockAddr 176 type MockAddrMockRecorder struct { 177 mock *MockAddr 178 } 179 180 // NewMockAddr creates a new mock instance 181 func NewMockAddr(ctrl *gomock.Controller) *MockAddr { 182 mock := &MockAddr{ctrl: ctrl} 183 mock.recorder = &MockAddrMockRecorder{mock} 184 return mock 185 } 186 187 // EXPECT returns an object that allows the caller to indicate expected use 188 func (m *MockAddr) EXPECT() *MockAddrMockRecorder { 189 return m.recorder 190 } 191 192 // Network mocks base method 193 func (m *MockAddr) Network() string { 194 m.ctrl.T.Helper() 195 ret := m.ctrl.Call(m, "Network") 196 ret0, _ := ret[0].(string) 197 return ret0 198 } 199 200 // Network indicates an expected call of Network 201 func (mr *MockAddrMockRecorder) Network() *gomock.Call { 202 mr.mock.ctrl.T.Helper() 203 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockAddr)(nil).Network)) 204 } 205 206 // String mocks base method 207 func (m *MockAddr) String() string { 208 m.ctrl.T.Helper() 209 ret := m.ctrl.Call(m, "String") 210 ret0, _ := ret[0].(string) 211 return ret0 212 } 213 214 // String indicates an expected call of String 215 func (mr *MockAddrMockRecorder) String() *gomock.Call { 216 mr.mock.ctrl.T.Helper() 217 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockAddr)(nil).String)) 218 }