github.com/m3db/m3@v1.5.0/src/msg/protocol/proto/proto_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/msg/protocol/proto (interfaces: Encoder,Decoder) 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package proto is a generated GoMock package. 25 package proto 26 27 import ( 28 "io" 29 "reflect" 30 31 "github.com/golang/mock/gomock" 32 ) 33 34 // MockEncoder is a mock of Encoder interface. 35 type MockEncoder struct { 36 ctrl *gomock.Controller 37 recorder *MockEncoderMockRecorder 38 } 39 40 // MockEncoderMockRecorder is the mock recorder for MockEncoder. 41 type MockEncoderMockRecorder struct { 42 mock *MockEncoder 43 } 44 45 // NewMockEncoder creates a new mock instance. 46 func NewMockEncoder(ctrl *gomock.Controller) *MockEncoder { 47 mock := &MockEncoder{ctrl: ctrl} 48 mock.recorder = &MockEncoderMockRecorder{mock} 49 return mock 50 } 51 52 // EXPECT returns an object that allows the caller to indicate expected use. 53 func (m *MockEncoder) EXPECT() *MockEncoderMockRecorder { 54 return m.recorder 55 } 56 57 // Bytes mocks base method. 58 func (m *MockEncoder) Bytes() []byte { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Bytes") 61 ret0, _ := ret[0].([]byte) 62 return ret0 63 } 64 65 // Bytes indicates an expected call of Bytes. 66 func (mr *MockEncoderMockRecorder) Bytes() *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bytes", reflect.TypeOf((*MockEncoder)(nil).Bytes)) 69 } 70 71 // Encode mocks base method. 72 func (m *MockEncoder) Encode(arg0 Marshaler) error { 73 m.ctrl.T.Helper() 74 ret := m.ctrl.Call(m, "Encode", arg0) 75 ret0, _ := ret[0].(error) 76 return ret0 77 } 78 79 // Encode indicates an expected call of Encode. 80 func (mr *MockEncoderMockRecorder) Encode(arg0 interface{}) *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Encode", reflect.TypeOf((*MockEncoder)(nil).Encode), arg0) 83 } 84 85 // MockDecoder is a mock of Decoder interface. 86 type MockDecoder struct { 87 ctrl *gomock.Controller 88 recorder *MockDecoderMockRecorder 89 } 90 91 // MockDecoderMockRecorder is the mock recorder for MockDecoder. 92 type MockDecoderMockRecorder struct { 93 mock *MockDecoder 94 } 95 96 // NewMockDecoder creates a new mock instance. 97 func NewMockDecoder(ctrl *gomock.Controller) *MockDecoder { 98 mock := &MockDecoder{ctrl: ctrl} 99 mock.recorder = &MockDecoderMockRecorder{mock} 100 return mock 101 } 102 103 // EXPECT returns an object that allows the caller to indicate expected use. 104 func (m *MockDecoder) EXPECT() *MockDecoderMockRecorder { 105 return m.recorder 106 } 107 108 // Decode mocks base method. 109 func (m *MockDecoder) Decode(arg0 Unmarshaler) error { 110 m.ctrl.T.Helper() 111 ret := m.ctrl.Call(m, "Decode", arg0) 112 ret0, _ := ret[0].(error) 113 return ret0 114 } 115 116 // Decode indicates an expected call of Decode. 117 func (mr *MockDecoderMockRecorder) Decode(arg0 interface{}) *gomock.Call { 118 mr.mock.ctrl.T.Helper() 119 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decode", reflect.TypeOf((*MockDecoder)(nil).Decode), arg0) 120 } 121 122 // ResetReader mocks base method. 123 func (m *MockDecoder) ResetReader(arg0 io.Reader) { 124 m.ctrl.T.Helper() 125 m.ctrl.Call(m, "ResetReader", arg0) 126 } 127 128 // ResetReader indicates an expected call of ResetReader. 129 func (mr *MockDecoderMockRecorder) ResetReader(arg0 interface{}) *gomock.Call { 130 mr.mock.ctrl.T.Helper() 131 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetReader", reflect.TypeOf((*MockDecoder)(nil).ResetReader), arg0) 132 }