github.com/v2fly/v2ray-core/v4@v4.45.2/testing/mocks/io.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: io (interfaces: Reader,Writer) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 reflect "reflect" 9 10 gomock "github.com/golang/mock/gomock" 11 ) 12 13 // Reader is a mock of Reader interface. 14 type Reader struct { 15 ctrl *gomock.Controller 16 recorder *ReaderMockRecorder 17 } 18 19 // ReaderMockRecorder is the mock recorder for Reader. 20 type ReaderMockRecorder struct { 21 mock *Reader 22 } 23 24 // NewReader creates a new mock instance. 25 func NewReader(ctrl *gomock.Controller) *Reader { 26 mock := &Reader{ctrl: ctrl} 27 mock.recorder = &ReaderMockRecorder{mock} 28 return mock 29 } 30 31 // EXPECT returns an object that allows the caller to indicate expected use. 32 func (m *Reader) EXPECT() *ReaderMockRecorder { 33 return m.recorder 34 } 35 36 // Read mocks base method. 37 func (m *Reader) Read(arg0 []byte) (int, error) { 38 m.ctrl.T.Helper() 39 ret := m.ctrl.Call(m, "Read", arg0) 40 ret0, _ := ret[0].(int) 41 ret1, _ := ret[1].(error) 42 return ret0, ret1 43 } 44 45 // Read indicates an expected call of Read. 46 func (mr *ReaderMockRecorder) Read(arg0 interface{}) *gomock.Call { 47 mr.mock.ctrl.T.Helper() 48 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*Reader)(nil).Read), arg0) 49 } 50 51 // Writer is a mock of Writer interface. 52 type Writer struct { 53 ctrl *gomock.Controller 54 recorder *WriterMockRecorder 55 } 56 57 // WriterMockRecorder is the mock recorder for Writer. 58 type WriterMockRecorder struct { 59 mock *Writer 60 } 61 62 // NewWriter creates a new mock instance. 63 func NewWriter(ctrl *gomock.Controller) *Writer { 64 mock := &Writer{ctrl: ctrl} 65 mock.recorder = &WriterMockRecorder{mock} 66 return mock 67 } 68 69 // EXPECT returns an object that allows the caller to indicate expected use. 70 func (m *Writer) EXPECT() *WriterMockRecorder { 71 return m.recorder 72 } 73 74 // Write mocks base method. 75 func (m *Writer) Write(arg0 []byte) (int, error) { 76 m.ctrl.T.Helper() 77 ret := m.ctrl.Call(m, "Write", arg0) 78 ret0, _ := ret[0].(int) 79 ret1, _ := ret[1].(error) 80 return ret0, ret1 81 } 82 83 // Write indicates an expected call of Write. 84 func (mr *WriterMockRecorder) Write(arg0 interface{}) *gomock.Call { 85 mr.mock.ctrl.T.Helper() 86 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*Writer)(nil).Write), arg0) 87 }