github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/mock_raw_conn_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/danielpfeifer02/quic-go-prio-packs (interfaces: RawConn) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/danielpfeifer02/quic-go-prio-packs -destination mock_raw_conn_test.go github.com/danielpfeifer02/quic-go-prio-packs RawConn 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 net "net" 13 reflect "reflect" 14 time "time" 15 16 protocol "github.com/danielpfeifer02/quic-go-prio-packs/internal/protocol" 17 gomock "go.uber.org/mock/gomock" 18 ) 19 20 // MockRawConn is a mock of RawConn interface. 21 type MockRawConn struct { 22 ctrl *gomock.Controller 23 recorder *MockRawConnMockRecorder 24 } 25 26 // MockRawConnMockRecorder is the mock recorder for MockRawConn. 27 type MockRawConnMockRecorder struct { 28 mock *MockRawConn 29 } 30 31 // NewMockRawConn creates a new mock instance. 32 func NewMockRawConn(ctrl *gomock.Controller) *MockRawConn { 33 mock := &MockRawConn{ctrl: ctrl} 34 mock.recorder = &MockRawConnMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockRawConn) EXPECT() *MockRawConnMockRecorder { 40 return m.recorder 41 } 42 43 // Close mocks base method. 44 func (m *MockRawConn) Close() error { 45 m.ctrl.T.Helper() 46 ret := m.ctrl.Call(m, "Close") 47 ret0, _ := ret[0].(error) 48 return ret0 49 } 50 51 // Close indicates an expected call of Close. 52 func (mr *MockRawConnMockRecorder) Close() *RawConnCloseCall { 53 mr.mock.ctrl.T.Helper() 54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRawConn)(nil).Close)) 55 return &RawConnCloseCall{Call: call} 56 } 57 58 // RawConnCloseCall wrap *gomock.Call 59 type RawConnCloseCall struct { 60 *gomock.Call 61 } 62 63 // Return rewrite *gomock.Call.Return 64 func (c *RawConnCloseCall) Return(arg0 error) *RawConnCloseCall { 65 c.Call = c.Call.Return(arg0) 66 return c 67 } 68 69 // Do rewrite *gomock.Call.Do 70 func (c *RawConnCloseCall) Do(f func() error) *RawConnCloseCall { 71 c.Call = c.Call.Do(f) 72 return c 73 } 74 75 // DoAndReturn rewrite *gomock.Call.DoAndReturn 76 func (c *RawConnCloseCall) DoAndReturn(f func() error) *RawConnCloseCall { 77 c.Call = c.Call.DoAndReturn(f) 78 return c 79 } 80 81 // LocalAddr mocks base method. 82 func (m *MockRawConn) LocalAddr() net.Addr { 83 m.ctrl.T.Helper() 84 ret := m.ctrl.Call(m, "LocalAddr") 85 ret0, _ := ret[0].(net.Addr) 86 return ret0 87 } 88 89 // LocalAddr indicates an expected call of LocalAddr. 90 func (mr *MockRawConnMockRecorder) LocalAddr() *RawConnLocalAddrCall { 91 mr.mock.ctrl.T.Helper() 92 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockRawConn)(nil).LocalAddr)) 93 return &RawConnLocalAddrCall{Call: call} 94 } 95 96 // RawConnLocalAddrCall wrap *gomock.Call 97 type RawConnLocalAddrCall struct { 98 *gomock.Call 99 } 100 101 // Return rewrite *gomock.Call.Return 102 func (c *RawConnLocalAddrCall) Return(arg0 net.Addr) *RawConnLocalAddrCall { 103 c.Call = c.Call.Return(arg0) 104 return c 105 } 106 107 // Do rewrite *gomock.Call.Do 108 func (c *RawConnLocalAddrCall) Do(f func() net.Addr) *RawConnLocalAddrCall { 109 c.Call = c.Call.Do(f) 110 return c 111 } 112 113 // DoAndReturn rewrite *gomock.Call.DoAndReturn 114 func (c *RawConnLocalAddrCall) DoAndReturn(f func() net.Addr) *RawConnLocalAddrCall { 115 c.Call = c.Call.DoAndReturn(f) 116 return c 117 } 118 119 // ReadPacket mocks base method. 120 func (m *MockRawConn) ReadPacket() (receivedPacket, error) { 121 m.ctrl.T.Helper() 122 ret := m.ctrl.Call(m, "ReadPacket") 123 ret0, _ := ret[0].(receivedPacket) 124 ret1, _ := ret[1].(error) 125 return ret0, ret1 126 } 127 128 // ReadPacket indicates an expected call of ReadPacket. 129 func (mr *MockRawConnMockRecorder) ReadPacket() *RawConnReadPacketCall { 130 mr.mock.ctrl.T.Helper() 131 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPacket", reflect.TypeOf((*MockRawConn)(nil).ReadPacket)) 132 return &RawConnReadPacketCall{Call: call} 133 } 134 135 // RawConnReadPacketCall wrap *gomock.Call 136 type RawConnReadPacketCall struct { 137 *gomock.Call 138 } 139 140 // Return rewrite *gomock.Call.Return 141 func (c *RawConnReadPacketCall) Return(arg0 receivedPacket, arg1 error) *RawConnReadPacketCall { 142 c.Call = c.Call.Return(arg0, arg1) 143 return c 144 } 145 146 // Do rewrite *gomock.Call.Do 147 func (c *RawConnReadPacketCall) Do(f func() (receivedPacket, error)) *RawConnReadPacketCall { 148 c.Call = c.Call.Do(f) 149 return c 150 } 151 152 // DoAndReturn rewrite *gomock.Call.DoAndReturn 153 func (c *RawConnReadPacketCall) DoAndReturn(f func() (receivedPacket, error)) *RawConnReadPacketCall { 154 c.Call = c.Call.DoAndReturn(f) 155 return c 156 } 157 158 // SetReadDeadline mocks base method. 159 func (m *MockRawConn) SetReadDeadline(arg0 time.Time) error { 160 m.ctrl.T.Helper() 161 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 162 ret0, _ := ret[0].(error) 163 return ret0 164 } 165 166 // SetReadDeadline indicates an expected call of SetReadDeadline. 167 func (mr *MockRawConnMockRecorder) SetReadDeadline(arg0 any) *RawConnSetReadDeadlineCall { 168 mr.mock.ctrl.T.Helper() 169 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockRawConn)(nil).SetReadDeadline), arg0) 170 return &RawConnSetReadDeadlineCall{Call: call} 171 } 172 173 // RawConnSetReadDeadlineCall wrap *gomock.Call 174 type RawConnSetReadDeadlineCall struct { 175 *gomock.Call 176 } 177 178 // Return rewrite *gomock.Call.Return 179 func (c *RawConnSetReadDeadlineCall) Return(arg0 error) *RawConnSetReadDeadlineCall { 180 c.Call = c.Call.Return(arg0) 181 return c 182 } 183 184 // Do rewrite *gomock.Call.Do 185 func (c *RawConnSetReadDeadlineCall) Do(f func(time.Time) error) *RawConnSetReadDeadlineCall { 186 c.Call = c.Call.Do(f) 187 return c 188 } 189 190 // DoAndReturn rewrite *gomock.Call.DoAndReturn 191 func (c *RawConnSetReadDeadlineCall) DoAndReturn(f func(time.Time) error) *RawConnSetReadDeadlineCall { 192 c.Call = c.Call.DoAndReturn(f) 193 return c 194 } 195 196 // WritePacket mocks base method. 197 func (m *MockRawConn) WritePacket(arg0 []byte, arg1 net.Addr, arg2 []byte, arg3 uint16, arg4 protocol.ECN) (int, error) { 198 m.ctrl.T.Helper() 199 ret := m.ctrl.Call(m, "WritePacket", arg0, arg1, arg2, arg3, arg4) 200 ret0, _ := ret[0].(int) 201 ret1, _ := ret[1].(error) 202 return ret0, ret1 203 } 204 205 // WritePacket indicates an expected call of WritePacket. 206 func (mr *MockRawConnMockRecorder) WritePacket(arg0, arg1, arg2, arg3, arg4 any) *RawConnWritePacketCall { 207 mr.mock.ctrl.T.Helper() 208 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePacket", reflect.TypeOf((*MockRawConn)(nil).WritePacket), arg0, arg1, arg2, arg3, arg4) 209 return &RawConnWritePacketCall{Call: call} 210 } 211 212 // RawConnWritePacketCall wrap *gomock.Call 213 type RawConnWritePacketCall struct { 214 *gomock.Call 215 } 216 217 // Return rewrite *gomock.Call.Return 218 func (c *RawConnWritePacketCall) Return(arg0 int, arg1 error) *RawConnWritePacketCall { 219 c.Call = c.Call.Return(arg0, arg1) 220 return c 221 } 222 223 // Do rewrite *gomock.Call.Do 224 func (c *RawConnWritePacketCall) Do(f func([]byte, net.Addr, []byte, uint16, protocol.ECN) (int, error)) *RawConnWritePacketCall { 225 c.Call = c.Call.Do(f) 226 return c 227 } 228 229 // DoAndReturn rewrite *gomock.Call.DoAndReturn 230 func (c *RawConnWritePacketCall) DoAndReturn(f func([]byte, net.Addr, []byte, uint16, protocol.ECN) (int, error)) *RawConnWritePacketCall { 231 c.Call = c.Call.DoAndReturn(f) 232 return c 233 } 234 235 // capabilities mocks base method. 236 func (m *MockRawConn) capabilities() connCapabilities { 237 m.ctrl.T.Helper() 238 ret := m.ctrl.Call(m, "capabilities") 239 ret0, _ := ret[0].(connCapabilities) 240 return ret0 241 } 242 243 // capabilities indicates an expected call of capabilities. 244 func (mr *MockRawConnMockRecorder) capabilities() *RawConncapabilitiesCall { 245 mr.mock.ctrl.T.Helper() 246 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "capabilities", reflect.TypeOf((*MockRawConn)(nil).capabilities)) 247 return &RawConncapabilitiesCall{Call: call} 248 } 249 250 // RawConncapabilitiesCall wrap *gomock.Call 251 type RawConncapabilitiesCall struct { 252 *gomock.Call 253 } 254 255 // Return rewrite *gomock.Call.Return 256 func (c *RawConncapabilitiesCall) Return(arg0 connCapabilities) *RawConncapabilitiesCall { 257 c.Call = c.Call.Return(arg0) 258 return c 259 } 260 261 // Do rewrite *gomock.Call.Do 262 func (c *RawConncapabilitiesCall) Do(f func() connCapabilities) *RawConncapabilitiesCall { 263 c.Call = c.Call.Do(f) 264 return c 265 } 266 267 // DoAndReturn rewrite *gomock.Call.DoAndReturn 268 func (c *RawConncapabilitiesCall) DoAndReturn(f func() connCapabilities) *RawConncapabilitiesCall { 269 c.Call = c.Call.DoAndReturn(f) 270 return c 271 }