github.com/daeuniverse/quic-go@v0.0.0-20240413031024-943f218e0810/internal/mocks/short_header_opener.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/daeuniverse/quic-go/internal/handshake (interfaces: ShortHeaderOpener) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package mocks -destination short_header_opener.go github.com/daeuniverse/quic-go/internal/handshake ShortHeaderOpener 7 // 8 9 // Package mocks is a generated GoMock package. 10 package mocks 11 12 import ( 13 reflect "reflect" 14 time "time" 15 16 protocol "github.com/daeuniverse/quic-go/internal/protocol" 17 gomock "go.uber.org/mock/gomock" 18 ) 19 20 // MockShortHeaderOpener is a mock of ShortHeaderOpener interface. 21 type MockShortHeaderOpener struct { 22 ctrl *gomock.Controller 23 recorder *MockShortHeaderOpenerMockRecorder 24 } 25 26 // MockShortHeaderOpenerMockRecorder is the mock recorder for MockShortHeaderOpener. 27 type MockShortHeaderOpenerMockRecorder struct { 28 mock *MockShortHeaderOpener 29 } 30 31 // NewMockShortHeaderOpener creates a new mock instance. 32 func NewMockShortHeaderOpener(ctrl *gomock.Controller) *MockShortHeaderOpener { 33 mock := &MockShortHeaderOpener{ctrl: ctrl} 34 mock.recorder = &MockShortHeaderOpenerMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockShortHeaderOpener) EXPECT() *MockShortHeaderOpenerMockRecorder { 40 return m.recorder 41 } 42 43 // DecodePacketNumber mocks base method. 44 func (m *MockShortHeaderOpener) DecodePacketNumber(arg0 protocol.PacketNumber, arg1 protocol.PacketNumberLen) protocol.PacketNumber { 45 m.ctrl.T.Helper() 46 ret := m.ctrl.Call(m, "DecodePacketNumber", arg0, arg1) 47 ret0, _ := ret[0].(protocol.PacketNumber) 48 return ret0 49 } 50 51 // DecodePacketNumber indicates an expected call of DecodePacketNumber. 52 func (mr *MockShortHeaderOpenerMockRecorder) DecodePacketNumber(arg0, arg1 any) *MockShortHeaderOpenerDecodePacketNumberCall { 53 mr.mock.ctrl.T.Helper() 54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecodePacketNumber", reflect.TypeOf((*MockShortHeaderOpener)(nil).DecodePacketNumber), arg0, arg1) 55 return &MockShortHeaderOpenerDecodePacketNumberCall{Call: call} 56 } 57 58 // MockShortHeaderOpenerDecodePacketNumberCall wrap *gomock.Call 59 type MockShortHeaderOpenerDecodePacketNumberCall struct { 60 *gomock.Call 61 } 62 63 // Return rewrite *gomock.Call.Return 64 func (c *MockShortHeaderOpenerDecodePacketNumberCall) Return(arg0 protocol.PacketNumber) *MockShortHeaderOpenerDecodePacketNumberCall { 65 c.Call = c.Call.Return(arg0) 66 return c 67 } 68 69 // Do rewrite *gomock.Call.Do 70 func (c *MockShortHeaderOpenerDecodePacketNumberCall) Do(f func(protocol.PacketNumber, protocol.PacketNumberLen) protocol.PacketNumber) *MockShortHeaderOpenerDecodePacketNumberCall { 71 c.Call = c.Call.Do(f) 72 return c 73 } 74 75 // DoAndReturn rewrite *gomock.Call.DoAndReturn 76 func (c *MockShortHeaderOpenerDecodePacketNumberCall) DoAndReturn(f func(protocol.PacketNumber, protocol.PacketNumberLen) protocol.PacketNumber) *MockShortHeaderOpenerDecodePacketNumberCall { 77 c.Call = c.Call.DoAndReturn(f) 78 return c 79 } 80 81 // DecryptHeader mocks base method. 82 func (m *MockShortHeaderOpener) DecryptHeader(arg0 []byte, arg1 *byte, arg2 []byte) { 83 m.ctrl.T.Helper() 84 m.ctrl.Call(m, "DecryptHeader", arg0, arg1, arg2) 85 } 86 87 // DecryptHeader indicates an expected call of DecryptHeader. 88 func (mr *MockShortHeaderOpenerMockRecorder) DecryptHeader(arg0, arg1, arg2 any) *MockShortHeaderOpenerDecryptHeaderCall { 89 mr.mock.ctrl.T.Helper() 90 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptHeader", reflect.TypeOf((*MockShortHeaderOpener)(nil).DecryptHeader), arg0, arg1, arg2) 91 return &MockShortHeaderOpenerDecryptHeaderCall{Call: call} 92 } 93 94 // MockShortHeaderOpenerDecryptHeaderCall wrap *gomock.Call 95 type MockShortHeaderOpenerDecryptHeaderCall struct { 96 *gomock.Call 97 } 98 99 // Return rewrite *gomock.Call.Return 100 func (c *MockShortHeaderOpenerDecryptHeaderCall) Return() *MockShortHeaderOpenerDecryptHeaderCall { 101 c.Call = c.Call.Return() 102 return c 103 } 104 105 // Do rewrite *gomock.Call.Do 106 func (c *MockShortHeaderOpenerDecryptHeaderCall) Do(f func([]byte, *byte, []byte)) *MockShortHeaderOpenerDecryptHeaderCall { 107 c.Call = c.Call.Do(f) 108 return c 109 } 110 111 // DoAndReturn rewrite *gomock.Call.DoAndReturn 112 func (c *MockShortHeaderOpenerDecryptHeaderCall) DoAndReturn(f func([]byte, *byte, []byte)) *MockShortHeaderOpenerDecryptHeaderCall { 113 c.Call = c.Call.DoAndReturn(f) 114 return c 115 } 116 117 // Open mocks base method. 118 func (m *MockShortHeaderOpener) Open(arg0, arg1 []byte, arg2 time.Time, arg3 protocol.PacketNumber, arg4 protocol.KeyPhaseBit, arg5 []byte) ([]byte, error) { 119 m.ctrl.T.Helper() 120 ret := m.ctrl.Call(m, "Open", arg0, arg1, arg2, arg3, arg4, arg5) 121 ret0, _ := ret[0].([]byte) 122 ret1, _ := ret[1].(error) 123 return ret0, ret1 124 } 125 126 // Open indicates an expected call of Open. 127 func (mr *MockShortHeaderOpenerMockRecorder) Open(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockShortHeaderOpenerOpenCall { 128 mr.mock.ctrl.T.Helper() 129 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockShortHeaderOpener)(nil).Open), arg0, arg1, arg2, arg3, arg4, arg5) 130 return &MockShortHeaderOpenerOpenCall{Call: call} 131 } 132 133 // MockShortHeaderOpenerOpenCall wrap *gomock.Call 134 type MockShortHeaderOpenerOpenCall struct { 135 *gomock.Call 136 } 137 138 // Return rewrite *gomock.Call.Return 139 func (c *MockShortHeaderOpenerOpenCall) Return(arg0 []byte, arg1 error) *MockShortHeaderOpenerOpenCall { 140 c.Call = c.Call.Return(arg0, arg1) 141 return c 142 } 143 144 // Do rewrite *gomock.Call.Do 145 func (c *MockShortHeaderOpenerOpenCall) Do(f func([]byte, []byte, time.Time, protocol.PacketNumber, protocol.KeyPhaseBit, []byte) ([]byte, error)) *MockShortHeaderOpenerOpenCall { 146 c.Call = c.Call.Do(f) 147 return c 148 } 149 150 // DoAndReturn rewrite *gomock.Call.DoAndReturn 151 func (c *MockShortHeaderOpenerOpenCall) DoAndReturn(f func([]byte, []byte, time.Time, protocol.PacketNumber, protocol.KeyPhaseBit, []byte) ([]byte, error)) *MockShortHeaderOpenerOpenCall { 152 c.Call = c.Call.DoAndReturn(f) 153 return c 154 }