crypto_setup.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go/internal/handshake (interfaces: CryptoSetup)
  3. // Package mocks is a generated GoMock package.
  4. package mocks
  5. import (
  6. tls "crypto/tls"
  7. reflect "reflect"
  8. gomock "github.com/golang/mock/gomock"
  9. handshake "github.com/lucas-clemente/quic-go/internal/handshake"
  10. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  11. )
  12. // MockCryptoSetup is a mock of CryptoSetup interface
  13. type MockCryptoSetup struct {
  14. ctrl *gomock.Controller
  15. recorder *MockCryptoSetupMockRecorder
  16. }
  17. // MockCryptoSetupMockRecorder is the mock recorder for MockCryptoSetup
  18. type MockCryptoSetupMockRecorder struct {
  19. mock *MockCryptoSetup
  20. }
  21. // NewMockCryptoSetup creates a new mock instance
  22. func NewMockCryptoSetup(ctrl *gomock.Controller) *MockCryptoSetup {
  23. mock := &MockCryptoSetup{ctrl: ctrl}
  24. mock.recorder = &MockCryptoSetupMockRecorder{mock}
  25. return mock
  26. }
  27. // EXPECT returns an object that allows the caller to indicate expected use
  28. func (m *MockCryptoSetup) EXPECT() *MockCryptoSetupMockRecorder {
  29. return m.recorder
  30. }
  31. // ChangeConnectionID mocks base method
  32. func (m *MockCryptoSetup) ChangeConnectionID(arg0 protocol.ConnectionID) error {
  33. m.ctrl.T.Helper()
  34. ret := m.ctrl.Call(m, "ChangeConnectionID", arg0)
  35. ret0, _ := ret[0].(error)
  36. return ret0
  37. }
  38. // ChangeConnectionID indicates an expected call of ChangeConnectionID
  39. func (mr *MockCryptoSetupMockRecorder) ChangeConnectionID(arg0 interface{}) *gomock.Call {
  40. mr.mock.ctrl.T.Helper()
  41. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConnectionID", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)
  42. }
  43. // Close mocks base method
  44. func (m *MockCryptoSetup) Close() error {
  45. m.ctrl.T.Helper()
  46. ret := m.ctrl.Call(m, "Close")
  47. ret0, _ := ret[0].(error)
  48. return ret0
  49. }
  50. // Close indicates an expected call of Close
  51. func (mr *MockCryptoSetupMockRecorder) Close() *gomock.Call {
  52. mr.mock.ctrl.T.Helper()
  53. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCryptoSetup)(nil).Close))
  54. }
  55. // ConnectionState mocks base method
  56. func (m *MockCryptoSetup) ConnectionState() tls.ConnectionState {
  57. m.ctrl.T.Helper()
  58. ret := m.ctrl.Call(m, "ConnectionState")
  59. ret0, _ := ret[0].(tls.ConnectionState)
  60. return ret0
  61. }
  62. // ConnectionState indicates an expected call of ConnectionState
  63. func (mr *MockCryptoSetupMockRecorder) ConnectionState() *gomock.Call {
  64. mr.mock.ctrl.T.Helper()
  65. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockCryptoSetup)(nil).ConnectionState))
  66. }
  67. // GetOpener mocks base method
  68. func (m *MockCryptoSetup) GetOpener(arg0 protocol.EncryptionLevel) (handshake.Opener, error) {
  69. m.ctrl.T.Helper()
  70. ret := m.ctrl.Call(m, "GetOpener", arg0)
  71. ret0, _ := ret[0].(handshake.Opener)
  72. ret1, _ := ret[1].(error)
  73. return ret0, ret1
  74. }
  75. // GetOpener indicates an expected call of GetOpener
  76. func (mr *MockCryptoSetupMockRecorder) GetOpener(arg0 interface{}) *gomock.Call {
  77. mr.mock.ctrl.T.Helper()
  78. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpener", reflect.TypeOf((*MockCryptoSetup)(nil).GetOpener), arg0)
  79. }
  80. // GetSealer mocks base method
  81. func (m *MockCryptoSetup) GetSealer() (protocol.EncryptionLevel, handshake.Sealer) {
  82. m.ctrl.T.Helper()
  83. ret := m.ctrl.Call(m, "GetSealer")
  84. ret0, _ := ret[0].(protocol.EncryptionLevel)
  85. ret1, _ := ret[1].(handshake.Sealer)
  86. return ret0, ret1
  87. }
  88. // GetSealer indicates an expected call of GetSealer
  89. func (mr *MockCryptoSetupMockRecorder) GetSealer() *gomock.Call {
  90. mr.mock.ctrl.T.Helper()
  91. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSealer", reflect.TypeOf((*MockCryptoSetup)(nil).GetSealer))
  92. }
  93. // GetSealerWithEncryptionLevel mocks base method
  94. func (m *MockCryptoSetup) GetSealerWithEncryptionLevel(arg0 protocol.EncryptionLevel) (handshake.Sealer, error) {
  95. m.ctrl.T.Helper()
  96. ret := m.ctrl.Call(m, "GetSealerWithEncryptionLevel", arg0)
  97. ret0, _ := ret[0].(handshake.Sealer)
  98. ret1, _ := ret[1].(error)
  99. return ret0, ret1
  100. }
  101. // GetSealerWithEncryptionLevel indicates an expected call of GetSealerWithEncryptionLevel
  102. func (mr *MockCryptoSetupMockRecorder) GetSealerWithEncryptionLevel(arg0 interface{}) *gomock.Call {
  103. mr.mock.ctrl.T.Helper()
  104. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSealerWithEncryptionLevel", reflect.TypeOf((*MockCryptoSetup)(nil).GetSealerWithEncryptionLevel), arg0)
  105. }
  106. // HandleMessage mocks base method
  107. func (m *MockCryptoSetup) HandleMessage(arg0 []byte, arg1 protocol.EncryptionLevel) bool {
  108. m.ctrl.T.Helper()
  109. ret := m.ctrl.Call(m, "HandleMessage", arg0, arg1)
  110. ret0, _ := ret[0].(bool)
  111. return ret0
  112. }
  113. // HandleMessage indicates an expected call of HandleMessage
  114. func (mr *MockCryptoSetupMockRecorder) HandleMessage(arg0, arg1 interface{}) *gomock.Call {
  115. mr.mock.ctrl.T.Helper()
  116. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockCryptoSetup)(nil).HandleMessage), arg0, arg1)
  117. }
  118. // RunHandshake mocks base method
  119. func (m *MockCryptoSetup) RunHandshake() error {
  120. m.ctrl.T.Helper()
  121. ret := m.ctrl.Call(m, "RunHandshake")
  122. ret0, _ := ret[0].(error)
  123. return ret0
  124. }
  125. // RunHandshake indicates an expected call of RunHandshake
  126. func (mr *MockCryptoSetupMockRecorder) RunHandshake() *gomock.Call {
  127. mr.mock.ctrl.T.Helper()
  128. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunHandshake", reflect.TypeOf((*MockCryptoSetup)(nil).RunHandshake))
  129. }