go.uber.org/yarpc@v1.72.1/api/transport/transporttest/handler.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: go.uber.org/yarpc/api/transport (interfaces: UnaryHandler,OnewayHandler,StreamHandler) 3 4 // Copyright (c) 2022 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 transporttest is a generated GoMock package. 25 package transporttest 26 27 import ( 28 context "context" 29 gomock "github.com/golang/mock/gomock" 30 transport "go.uber.org/yarpc/api/transport" 31 reflect "reflect" 32 ) 33 34 // MockUnaryHandler is a mock of UnaryHandler interface 35 type MockUnaryHandler struct { 36 ctrl *gomock.Controller 37 recorder *MockUnaryHandlerMockRecorder 38 } 39 40 // MockUnaryHandlerMockRecorder is the mock recorder for MockUnaryHandler 41 type MockUnaryHandlerMockRecorder struct { 42 mock *MockUnaryHandler 43 } 44 45 // NewMockUnaryHandler creates a new mock instance 46 func NewMockUnaryHandler(ctrl *gomock.Controller) *MockUnaryHandler { 47 mock := &MockUnaryHandler{ctrl: ctrl} 48 mock.recorder = &MockUnaryHandlerMockRecorder{mock} 49 return mock 50 } 51 52 // EXPECT returns an object that allows the caller to indicate expected use 53 func (m *MockUnaryHandler) EXPECT() *MockUnaryHandlerMockRecorder { 54 return m.recorder 55 } 56 57 // Handle mocks base method 58 func (m *MockUnaryHandler) Handle(arg0 context.Context, arg1 *transport.Request, arg2 transport.ResponseWriter) error { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2) 61 ret0, _ := ret[0].(error) 62 return ret0 63 } 64 65 // Handle indicates an expected call of Handle 66 func (mr *MockUnaryHandlerMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockUnaryHandler)(nil).Handle), arg0, arg1, arg2) 69 } 70 71 // MockOnewayHandler is a mock of OnewayHandler interface 72 type MockOnewayHandler struct { 73 ctrl *gomock.Controller 74 recorder *MockOnewayHandlerMockRecorder 75 } 76 77 // MockOnewayHandlerMockRecorder is the mock recorder for MockOnewayHandler 78 type MockOnewayHandlerMockRecorder struct { 79 mock *MockOnewayHandler 80 } 81 82 // NewMockOnewayHandler creates a new mock instance 83 func NewMockOnewayHandler(ctrl *gomock.Controller) *MockOnewayHandler { 84 mock := &MockOnewayHandler{ctrl: ctrl} 85 mock.recorder = &MockOnewayHandlerMockRecorder{mock} 86 return mock 87 } 88 89 // EXPECT returns an object that allows the caller to indicate expected use 90 func (m *MockOnewayHandler) EXPECT() *MockOnewayHandlerMockRecorder { 91 return m.recorder 92 } 93 94 // HandleOneway mocks base method 95 func (m *MockOnewayHandler) HandleOneway(arg0 context.Context, arg1 *transport.Request) error { 96 m.ctrl.T.Helper() 97 ret := m.ctrl.Call(m, "HandleOneway", arg0, arg1) 98 ret0, _ := ret[0].(error) 99 return ret0 100 } 101 102 // HandleOneway indicates an expected call of HandleOneway 103 func (mr *MockOnewayHandlerMockRecorder) HandleOneway(arg0, arg1 interface{}) *gomock.Call { 104 mr.mock.ctrl.T.Helper() 105 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleOneway", reflect.TypeOf((*MockOnewayHandler)(nil).HandleOneway), arg0, arg1) 106 } 107 108 // MockStreamHandler is a mock of StreamHandler interface 109 type MockStreamHandler struct { 110 ctrl *gomock.Controller 111 recorder *MockStreamHandlerMockRecorder 112 } 113 114 // MockStreamHandlerMockRecorder is the mock recorder for MockStreamHandler 115 type MockStreamHandlerMockRecorder struct { 116 mock *MockStreamHandler 117 } 118 119 // NewMockStreamHandler creates a new mock instance 120 func NewMockStreamHandler(ctrl *gomock.Controller) *MockStreamHandler { 121 mock := &MockStreamHandler{ctrl: ctrl} 122 mock.recorder = &MockStreamHandlerMockRecorder{mock} 123 return mock 124 } 125 126 // EXPECT returns an object that allows the caller to indicate expected use 127 func (m *MockStreamHandler) EXPECT() *MockStreamHandlerMockRecorder { 128 return m.recorder 129 } 130 131 // HandleStream mocks base method 132 func (m *MockStreamHandler) HandleStream(arg0 *transport.ServerStream) error { 133 m.ctrl.T.Helper() 134 ret := m.ctrl.Call(m, "HandleStream", arg0) 135 ret0, _ := ret[0].(error) 136 return ret0 137 } 138 139 // HandleStream indicates an expected call of HandleStream 140 func (mr *MockStreamHandlerMockRecorder) HandleStream(arg0 interface{}) *gomock.Call { 141 mr.mock.ctrl.T.Helper() 142 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStream", reflect.TypeOf((*MockStreamHandler)(nil).HandleStream), arg0) 143 }