github.com/cloudwego/kitex@v0.9.0/internal/mocks/remote/payload_codec.go (about) 1 /* 2 * Copyright 2022 CloudWeGo Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 18 // Code generated by MockGen. DO NOT EDIT. 19 // Source: ../../pkg/remote/payload_codec.go 20 21 // Package remote is a generated GoMock package. 22 package remote 23 24 import ( 25 context "context" 26 reflect "reflect" 27 28 remote "github.com/cloudwego/kitex/pkg/remote" 29 gomock "github.com/golang/mock/gomock" 30 ) 31 32 // MockPayloadCodec is a mock of PayloadCodec interface. 33 type MockPayloadCodec struct { 34 ctrl *gomock.Controller 35 recorder *MockPayloadCodecMockRecorder 36 } 37 38 // MockPayloadCodecMockRecorder is the mock recorder for MockPayloadCodec. 39 type MockPayloadCodecMockRecorder struct { 40 mock *MockPayloadCodec 41 } 42 43 // NewMockPayloadCodec creates a new mock instance. 44 func NewMockPayloadCodec(ctrl *gomock.Controller) *MockPayloadCodec { 45 mock := &MockPayloadCodec{ctrl: ctrl} 46 mock.recorder = &MockPayloadCodecMockRecorder{mock} 47 return mock 48 } 49 50 // EXPECT returns an object that allows the caller to indicate expected use. 51 func (m *MockPayloadCodec) EXPECT() *MockPayloadCodecMockRecorder { 52 return m.recorder 53 } 54 55 // Marshal mocks base method. 56 func (m *MockPayloadCodec) Marshal(ctx context.Context, message remote.Message, out remote.ByteBuffer) error { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "Marshal", ctx, message, out) 59 ret0, _ := ret[0].(error) 60 return ret0 61 } 62 63 // Marshal indicates an expected call of Marshal. 64 func (mr *MockPayloadCodecMockRecorder) Marshal(ctx, message, out interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Marshal", reflect.TypeOf((*MockPayloadCodec)(nil).Marshal), ctx, message, out) 67 } 68 69 // Name mocks base method. 70 func (m *MockPayloadCodec) Name() string { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "Name") 73 ret0, _ := ret[0].(string) 74 return ret0 75 } 76 77 // Name indicates an expected call of Name. 78 func (mr *MockPayloadCodecMockRecorder) Name() *gomock.Call { 79 mr.mock.ctrl.T.Helper() 80 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockPayloadCodec)(nil).Name)) 81 } 82 83 // Unmarshal mocks base method. 84 func (m *MockPayloadCodec) Unmarshal(ctx context.Context, message remote.Message, in remote.ByteBuffer) error { 85 m.ctrl.T.Helper() 86 ret := m.ctrl.Call(m, "Unmarshal", ctx, message, in) 87 ret0, _ := ret[0].(error) 88 return ret0 89 } 90 91 // Unmarshal indicates an expected call of Unmarshal. 92 func (mr *MockPayloadCodecMockRecorder) Unmarshal(ctx, message, in interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unmarshal", reflect.TypeOf((*MockPayloadCodec)(nil).Unmarshal), ctx, message, in) 95 }