github.com/tumi8/quic-go@v0.37.4-tum/noninternal/mocks/quic/stream.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/tumi8/quic-go (interfaces: Stream) 3 4 // Package mockquic is a generated GoMock package. 5 package mockquic 6 7 import ( 8 context "context" 9 reflect "reflect" 10 time "time" 11 12 gomock "github.com/golang/mock/gomock" 13 protocol "github.com/tumi8/quic-go/noninternal/protocol" 14 qerr "github.com/tumi8/quic-go/noninternal/qerr" 15 ) 16 17 // MockStream is a mock of Stream interface. 18 type MockStream struct { 19 ctrl *gomock.Controller 20 recorder *MockStreamMockRecorder 21 } 22 23 // MockStreamMockRecorder is the mock recorder for MockStream. 24 type MockStreamMockRecorder struct { 25 mock *MockStream 26 } 27 28 // NewMockStream creates a new mock instance. 29 func NewMockStream(ctrl *gomock.Controller) *MockStream { 30 mock := &MockStream{ctrl: ctrl} 31 mock.recorder = &MockStreamMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use. 36 func (m *MockStream) EXPECT() *MockStreamMockRecorder { 37 return m.recorder 38 } 39 40 // CancelRead mocks base method. 41 func (m *MockStream) CancelRead(arg0 qerr.StreamErrorCode) { 42 m.ctrl.T.Helper() 43 m.ctrl.Call(m, "CancelRead", arg0) 44 } 45 46 // CancelRead indicates an expected call of CancelRead. 47 func (mr *MockStreamMockRecorder) CancelRead(arg0 interface{}) *gomock.Call { 48 mr.mock.ctrl.T.Helper() 49 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStream)(nil).CancelRead), arg0) 50 } 51 52 // CancelWrite mocks base method. 53 func (m *MockStream) CancelWrite(arg0 qerr.StreamErrorCode) { 54 m.ctrl.T.Helper() 55 m.ctrl.Call(m, "CancelWrite", arg0) 56 } 57 58 // CancelWrite indicates an expected call of CancelWrite. 59 func (mr *MockStreamMockRecorder) CancelWrite(arg0 interface{}) *gomock.Call { 60 mr.mock.ctrl.T.Helper() 61 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStream)(nil).CancelWrite), arg0) 62 } 63 64 // Close mocks base method. 65 func (m *MockStream) Close() error { 66 m.ctrl.T.Helper() 67 ret := m.ctrl.Call(m, "Close") 68 ret0, _ := ret[0].(error) 69 return ret0 70 } 71 72 // Close indicates an expected call of Close. 73 func (mr *MockStreamMockRecorder) Close() *gomock.Call { 74 mr.mock.ctrl.T.Helper() 75 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStream)(nil).Close)) 76 } 77 78 // Context mocks base method. 79 func (m *MockStream) Context() context.Context { 80 m.ctrl.T.Helper() 81 ret := m.ctrl.Call(m, "Context") 82 ret0, _ := ret[0].(context.Context) 83 return ret0 84 } 85 86 // Context indicates an expected call of Context. 87 func (mr *MockStreamMockRecorder) Context() *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStream)(nil).Context)) 90 } 91 92 // Read mocks base method. 93 func (m *MockStream) Read(arg0 []byte) (int, error) { 94 m.ctrl.T.Helper() 95 ret := m.ctrl.Call(m, "Read", arg0) 96 ret0, _ := ret[0].(int) 97 ret1, _ := ret[1].(error) 98 return ret0, ret1 99 } 100 101 // Read indicates an expected call of Read. 102 func (mr *MockStreamMockRecorder) Read(arg0 interface{}) *gomock.Call { 103 mr.mock.ctrl.T.Helper() 104 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStream)(nil).Read), arg0) 105 } 106 107 // SetDeadline mocks base method. 108 func (m *MockStream) SetDeadline(arg0 time.Time) error { 109 m.ctrl.T.Helper() 110 ret := m.ctrl.Call(m, "SetDeadline", arg0) 111 ret0, _ := ret[0].(error) 112 return ret0 113 } 114 115 // SetDeadline indicates an expected call of SetDeadline. 116 func (mr *MockStreamMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call { 117 mr.mock.ctrl.T.Helper() 118 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStream)(nil).SetDeadline), arg0) 119 } 120 121 // SetReadDeadline mocks base method. 122 func (m *MockStream) SetReadDeadline(arg0 time.Time) error { 123 m.ctrl.T.Helper() 124 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 125 ret0, _ := ret[0].(error) 126 return ret0 127 } 128 129 // SetReadDeadline indicates an expected call of SetReadDeadline. 130 func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call { 131 mr.mock.ctrl.T.Helper() 132 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStream)(nil).SetReadDeadline), arg0) 133 } 134 135 // SetWriteDeadline mocks base method. 136 func (m *MockStream) SetWriteDeadline(arg0 time.Time) error { 137 m.ctrl.T.Helper() 138 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 139 ret0, _ := ret[0].(error) 140 return ret0 141 } 142 143 // SetWriteDeadline indicates an expected call of SetWriteDeadline. 144 func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call { 145 mr.mock.ctrl.T.Helper() 146 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStream)(nil).SetWriteDeadline), arg0) 147 } 148 149 // StreamID mocks base method. 150 func (m *MockStream) StreamID() protocol.StreamID { 151 m.ctrl.T.Helper() 152 ret := m.ctrl.Call(m, "StreamID") 153 ret0, _ := ret[0].(protocol.StreamID) 154 return ret0 155 } 156 157 // StreamID indicates an expected call of StreamID. 158 func (mr *MockStreamMockRecorder) StreamID() *gomock.Call { 159 mr.mock.ctrl.T.Helper() 160 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStream)(nil).StreamID)) 161 } 162 163 // Write mocks base method. 164 func (m *MockStream) Write(arg0 []byte) (int, error) { 165 m.ctrl.T.Helper() 166 ret := m.ctrl.Call(m, "Write", arg0) 167 ret0, _ := ret[0].(int) 168 ret1, _ := ret[1].(error) 169 return ret0, ret1 170 } 171 172 // Write indicates an expected call of Write. 173 func (mr *MockStreamMockRecorder) Write(arg0 interface{}) *gomock.Call { 174 mr.mock.ctrl.T.Helper() 175 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStream)(nil).Write), arg0) 176 }