The core protocol of WoopChain
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.
 
 
 
woop/p2p/host/hostv2/mock/hostv2_mock.go

111 lines
3.5 KiB

// Code generated by MockGen. DO NOT EDIT.
// Source: hostv2.go
// Package mock_hostv2 is a generated GoMock package.
package mock_hostv2
import (
context "context"
gomock "github.com/golang/mock/gomock"
go_libp2p_pubsub "github.com/libp2p/go-libp2p-pubsub"
reflect "reflect"
)
// Mockpubsub is a mock of pubsub interface
type Mockpubsub struct {
ctrl *gomock.Controller
recorder *MockpubsubMockRecorder
}
// MockpubsubMockRecorder is the mock recorder for Mockpubsub
type MockpubsubMockRecorder struct {
mock *Mockpubsub
}
// NewMockpubsub creates a new mock instance
func NewMockpubsub(ctrl *gomock.Controller) *Mockpubsub {
mock := &Mockpubsub{ctrl: ctrl}
mock.recorder = &MockpubsubMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Mockpubsub) EXPECT() *MockpubsubMockRecorder {
return m.recorder
}
// Publish mocks base method
func (m *Mockpubsub) Publish(topic string, data []byte) error {
ret := m.ctrl.Call(m, "Publish", topic, data)
ret0, _ := ret[0].(error)
return ret0
}
// Publish indicates an expected call of Publish
func (mr *MockpubsubMockRecorder) Publish(topic, data interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*Mockpubsub)(nil).Publish), topic, data)
}
// Subscribe mocks base method
func (m *Mockpubsub) Subscribe(topic string, opts ...go_libp2p_pubsub.SubOpt) (*go_libp2p_pubsub.Subscription, error) {
varargs := []interface{}{topic}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Subscribe", varargs...)
ret0, _ := ret[0].(*go_libp2p_pubsub.Subscription)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Subscribe indicates an expected call of Subscribe
func (mr *MockpubsubMockRecorder) Subscribe(topic interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{topic}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*Mockpubsub)(nil).Subscribe), varargs...)
}
// Mocksubscription is a mock of subscription interface
type Mocksubscription struct {
ctrl *gomock.Controller
recorder *MocksubscriptionMockRecorder
}
// MocksubscriptionMockRecorder is the mock recorder for Mocksubscription
type MocksubscriptionMockRecorder struct {
mock *Mocksubscription
}
// NewMocksubscription creates a new mock instance
func NewMocksubscription(ctrl *gomock.Controller) *Mocksubscription {
mock := &Mocksubscription{ctrl: ctrl}
mock.recorder = &MocksubscriptionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Mocksubscription) EXPECT() *MocksubscriptionMockRecorder {
return m.recorder
}
// Next mocks base method
func (m *Mocksubscription) Next(ctx context.Context) (*go_libp2p_pubsub.Message, error) {
ret := m.ctrl.Call(m, "Next", ctx)
ret0, _ := ret[0].(*go_libp2p_pubsub.Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Next indicates an expected call of Next
func (mr *MocksubscriptionMockRecorder) Next(ctx interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*Mocksubscription)(nil).Next), ctx)
}
// Cancel mocks base method
func (m *Mocksubscription) Cancel() {
m.ctrl.Call(m, "Cancel")
}
// Cancel indicates an expected call of Cancel
func (mr *MocksubscriptionMockRecorder) Cancel() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*Mocksubscription)(nil).Cancel))
}