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.

152 lines
3.3 KiB

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