You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.1 KiB

  1. // Code generated by mockery. DO NOT EDIT.
  2. package mocks
  3. import (
  4. context "context"
  5. mock "github.com/stretchr/testify/mock"
  6. crypto "github.com/tendermint/tendermint/crypto"
  7. p2p "github.com/tendermint/tendermint/internal/p2p"
  8. types "github.com/tendermint/tendermint/types"
  9. )
  10. // Connection is an autogenerated mock type for the Connection type
  11. type Connection struct {
  12. mock.Mock
  13. }
  14. // Close provides a mock function with given fields:
  15. func (_m *Connection) Close() error {
  16. ret := _m.Called()
  17. var r0 error
  18. if rf, ok := ret.Get(0).(func() error); ok {
  19. r0 = rf()
  20. } else {
  21. r0 = ret.Error(0)
  22. }
  23. return r0
  24. }
  25. // Handshake provides a mock function with given fields: _a0, _a1, _a2
  26. func (_m *Connection) Handshake(_a0 context.Context, _a1 types.NodeInfo, _a2 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) {
  27. ret := _m.Called(_a0, _a1, _a2)
  28. var r0 types.NodeInfo
  29. if rf, ok := ret.Get(0).(func(context.Context, types.NodeInfo, crypto.PrivKey) types.NodeInfo); ok {
  30. r0 = rf(_a0, _a1, _a2)
  31. } else {
  32. r0 = ret.Get(0).(types.NodeInfo)
  33. }
  34. var r1 crypto.PubKey
  35. if rf, ok := ret.Get(1).(func(context.Context, types.NodeInfo, crypto.PrivKey) crypto.PubKey); ok {
  36. r1 = rf(_a0, _a1, _a2)
  37. } else {
  38. if ret.Get(1) != nil {
  39. r1 = ret.Get(1).(crypto.PubKey)
  40. }
  41. }
  42. var r2 error
  43. if rf, ok := ret.Get(2).(func(context.Context, types.NodeInfo, crypto.PrivKey) error); ok {
  44. r2 = rf(_a0, _a1, _a2)
  45. } else {
  46. r2 = ret.Error(2)
  47. }
  48. return r0, r1, r2
  49. }
  50. // LocalEndpoint provides a mock function with given fields:
  51. func (_m *Connection) LocalEndpoint() p2p.Endpoint {
  52. ret := _m.Called()
  53. var r0 p2p.Endpoint
  54. if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok {
  55. r0 = rf()
  56. } else {
  57. r0 = ret.Get(0).(p2p.Endpoint)
  58. }
  59. return r0
  60. }
  61. // ReceiveMessage provides a mock function with given fields:
  62. func (_m *Connection) ReceiveMessage() (p2p.ChannelID, []byte, error) {
  63. ret := _m.Called()
  64. var r0 p2p.ChannelID
  65. if rf, ok := ret.Get(0).(func() p2p.ChannelID); ok {
  66. r0 = rf()
  67. } else {
  68. r0 = ret.Get(0).(p2p.ChannelID)
  69. }
  70. var r1 []byte
  71. if rf, ok := ret.Get(1).(func() []byte); ok {
  72. r1 = rf()
  73. } else {
  74. if ret.Get(1) != nil {
  75. r1 = ret.Get(1).([]byte)
  76. }
  77. }
  78. var r2 error
  79. if rf, ok := ret.Get(2).(func() error); ok {
  80. r2 = rf()
  81. } else {
  82. r2 = ret.Error(2)
  83. }
  84. return r0, r1, r2
  85. }
  86. // RemoteEndpoint provides a mock function with given fields:
  87. func (_m *Connection) RemoteEndpoint() p2p.Endpoint {
  88. ret := _m.Called()
  89. var r0 p2p.Endpoint
  90. if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok {
  91. r0 = rf()
  92. } else {
  93. r0 = ret.Get(0).(p2p.Endpoint)
  94. }
  95. return r0
  96. }
  97. // SendMessage provides a mock function with given fields: _a0, _a1
  98. func (_m *Connection) SendMessage(_a0 p2p.ChannelID, _a1 []byte) error {
  99. ret := _m.Called(_a0, _a1)
  100. var r0 error
  101. if rf, ok := ret.Get(0).(func(p2p.ChannelID, []byte) error); ok {
  102. r0 = rf(_a0, _a1)
  103. } else {
  104. r0 = ret.Error(0)
  105. }
  106. return r0
  107. }
  108. // String provides a mock function with given fields:
  109. func (_m *Connection) String() string {
  110. ret := _m.Called()
  111. var r0 string
  112. if rf, ok := ret.Get(0).(func() string); ok {
  113. r0 = rf()
  114. } else {
  115. r0 = ret.Get(0).(string)
  116. }
  117. return r0
  118. }