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