202 lines
5.4 KiB
Go
202 lines
5.4 KiB
Go
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
|
|
|
package network
|
|
|
|
import (
|
|
context "context"
|
|
bootstrap "isle/bootstrap"
|
|
|
|
daecommon "isle/daemon/daecommon"
|
|
|
|
mlog "dev.mediocregopher.com/mediocre-go-lib.git/mlog"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
nebula "isle/nebula"
|
|
)
|
|
|
|
// MockLoader is an autogenerated mock type for the Loader type
|
|
type MockLoader struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Create provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5
|
|
func (_m *MockLoader) Create(_a0 context.Context, _a1 *mlog.Logger, _a2 bootstrap.CreationParams, _a3 nebula.IPNet, _a4 nebula.HostName, _a5 *Opts) (Network, error) {
|
|
ret := _m.Called(_a0, _a1, _a2, _a3, _a4, _a5)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Create")
|
|
}
|
|
|
|
var r0 Network
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, nebula.IPNet, nebula.HostName, *Opts) (Network, error)); ok {
|
|
return rf(_a0, _a1, _a2, _a3, _a4, _a5)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, nebula.IPNet, nebula.HostName, *Opts) Network); ok {
|
|
r0 = rf(_a0, _a1, _a2, _a3, _a4, _a5)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(Network)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, nebula.IPNet, nebula.HostName, *Opts) error); ok {
|
|
r1 = rf(_a0, _a1, _a2, _a3, _a4, _a5)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Join provides a mock function with given fields: _a0, _a1, _a2, _a3
|
|
func (_m *MockLoader) Join(_a0 context.Context, _a1 *mlog.Logger, _a2 JoiningBootstrap, _a3 *Opts) (Network, error) {
|
|
ret := _m.Called(_a0, _a1, _a2, _a3)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Join")
|
|
}
|
|
|
|
var r0 Network
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, JoiningBootstrap, *Opts) (Network, error)); ok {
|
|
return rf(_a0, _a1, _a2, _a3)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, JoiningBootstrap, *Opts) Network); ok {
|
|
r0 = rf(_a0, _a1, _a2, _a3)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(Network)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *mlog.Logger, JoiningBootstrap, *Opts) error); ok {
|
|
r1 = rf(_a0, _a1, _a2, _a3)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Leave provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockLoader) Leave(_a0 context.Context, _a1 bootstrap.CreationParams) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Leave")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, bootstrap.CreationParams) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Load provides a mock function with given fields: _a0, _a1, _a2, _a3
|
|
func (_m *MockLoader) Load(_a0 context.Context, _a1 *mlog.Logger, _a2 bootstrap.CreationParams, _a3 *Opts) (Network, error) {
|
|
ret := _m.Called(_a0, _a1, _a2, _a3)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Load")
|
|
}
|
|
|
|
var r0 Network
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, *Opts) (Network, error)); ok {
|
|
return rf(_a0, _a1, _a2, _a3)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, *Opts) Network); ok {
|
|
r0 = rf(_a0, _a1, _a2, _a3)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(Network)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *mlog.Logger, bootstrap.CreationParams, *Opts) error); ok {
|
|
r1 = rf(_a0, _a1, _a2, _a3)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Loadable provides a mock function with given fields: _a0
|
|
func (_m *MockLoader) Loadable(_a0 context.Context) ([]bootstrap.CreationParams, error) {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Loadable")
|
|
}
|
|
|
|
var r0 []bootstrap.CreationParams
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]bootstrap.CreationParams, error)); ok {
|
|
return rf(_a0)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []bootstrap.CreationParams); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]bootstrap.CreationParams)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(_a0)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// StoredConfig provides a mock function with given fields: ctx, networkID
|
|
func (_m *MockLoader) StoredConfig(ctx context.Context, networkID string) (daecommon.NetworkConfig, error) {
|
|
ret := _m.Called(ctx, networkID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StoredConfig")
|
|
}
|
|
|
|
var r0 daecommon.NetworkConfig
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (daecommon.NetworkConfig, error)); ok {
|
|
return rf(ctx, networkID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) daecommon.NetworkConfig); ok {
|
|
r0 = rf(ctx, networkID)
|
|
} else {
|
|
r0 = ret.Get(0).(daecommon.NetworkConfig)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, networkID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewMockLoader creates a new instance of MockLoader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockLoader(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockLoader {
|
|
mock := &MockLoader{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|