github.com/metacubex/quic-go@v0.44.1-0.20240520163451-20b689a59136/internal/mocks/tls/client_session_cache.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: crypto/tls (interfaces: ClientSessionCache) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package mocktls -destination tls/client_session_cache.go crypto/tls ClientSessionCache 7 // 8 9 // Package mocktls is a generated GoMock package. 10 package mocktls 11 12 import ( 13 tls "crypto/tls" 14 reflect "reflect" 15 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockClientSessionCache is a mock of ClientSessionCache interface. 20 type MockClientSessionCache struct { 21 ctrl *gomock.Controller 22 recorder *MockClientSessionCacheMockRecorder 23 } 24 25 // MockClientSessionCacheMockRecorder is the mock recorder for MockClientSessionCache. 26 type MockClientSessionCacheMockRecorder struct { 27 mock *MockClientSessionCache 28 } 29 30 // NewMockClientSessionCache creates a new mock instance. 31 func NewMockClientSessionCache(ctrl *gomock.Controller) *MockClientSessionCache { 32 mock := &MockClientSessionCache{ctrl: ctrl} 33 mock.recorder = &MockClientSessionCacheMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockClientSessionCache) EXPECT() *MockClientSessionCacheMockRecorder { 39 return m.recorder 40 } 41 42 // Get mocks base method. 43 func (m *MockClientSessionCache) Get(arg0 string) (*tls.ClientSessionState, bool) { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Get", arg0) 46 ret0, _ := ret[0].(*tls.ClientSessionState) 47 ret1, _ := ret[1].(bool) 48 return ret0, ret1 49 } 50 51 // Get indicates an expected call of Get. 52 func (mr *MockClientSessionCacheMockRecorder) Get(arg0 any) *MockClientSessionCacheGetCall { 53 mr.mock.ctrl.T.Helper() 54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClientSessionCache)(nil).Get), arg0) 55 return &MockClientSessionCacheGetCall{Call: call} 56 } 57 58 // MockClientSessionCacheGetCall wrap *gomock.Call 59 type MockClientSessionCacheGetCall struct { 60 *gomock.Call 61 } 62 63 // Return rewrite *gomock.Call.Return 64 func (c *MockClientSessionCacheGetCall) Return(arg0 *tls.ClientSessionState, arg1 bool) *MockClientSessionCacheGetCall { 65 c.Call = c.Call.Return(arg0, arg1) 66 return c 67 } 68 69 // Do rewrite *gomock.Call.Do 70 func (c *MockClientSessionCacheGetCall) Do(f func(string) (*tls.ClientSessionState, bool)) *MockClientSessionCacheGetCall { 71 c.Call = c.Call.Do(f) 72 return c 73 } 74 75 // DoAndReturn rewrite *gomock.Call.DoAndReturn 76 func (c *MockClientSessionCacheGetCall) DoAndReturn(f func(string) (*tls.ClientSessionState, bool)) *MockClientSessionCacheGetCall { 77 c.Call = c.Call.DoAndReturn(f) 78 return c 79 } 80 81 // Put mocks base method. 82 func (m *MockClientSessionCache) Put(arg0 string, arg1 *tls.ClientSessionState) { 83 m.ctrl.T.Helper() 84 m.ctrl.Call(m, "Put", arg0, arg1) 85 } 86 87 // Put indicates an expected call of Put. 88 func (mr *MockClientSessionCacheMockRecorder) Put(arg0, arg1 any) *MockClientSessionCachePutCall { 89 mr.mock.ctrl.T.Helper() 90 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockClientSessionCache)(nil).Put), arg0, arg1) 91 return &MockClientSessionCachePutCall{Call: call} 92 } 93 94 // MockClientSessionCachePutCall wrap *gomock.Call 95 type MockClientSessionCachePutCall struct { 96 *gomock.Call 97 } 98 99 // Return rewrite *gomock.Call.Return 100 func (c *MockClientSessionCachePutCall) Return() *MockClientSessionCachePutCall { 101 c.Call = c.Call.Return() 102 return c 103 } 104 105 // Do rewrite *gomock.Call.Do 106 func (c *MockClientSessionCachePutCall) Do(f func(string, *tls.ClientSessionState)) *MockClientSessionCachePutCall { 107 c.Call = c.Call.Do(f) 108 return c 109 } 110 111 // DoAndReturn rewrite *gomock.Call.DoAndReturn 112 func (c *MockClientSessionCachePutCall) DoAndReturn(f func(string, *tls.ClientSessionState)) *MockClientSessionCachePutCall { 113 c.Call = c.Call.DoAndReturn(f) 114 return c 115 }