2024-11-16 10:50:55 +00:00
// Code generated by mockery v2.43.1. DO NOT EDIT.
package daemon
import (
context "context"
bootstrap "isle/bootstrap"
daecommon "isle/daemon/daecommon"
mock "github.com/stretchr/testify/mock"
nebula "isle/nebula"
network "isle/daemon/network"
)
// MockRPC is an autogenerated mock type for the RPC type
type MockRPC struct {
mock . Mock
}
// CreateHost provides a mock function with given fields: _a0, _a1, _a2
func ( _m * MockRPC ) CreateHost ( _a0 context . Context , _a1 nebula . HostName , _a2 network . CreateHostOpts ) ( network . JoiningBootstrap , error ) {
ret := _m . Called ( _a0 , _a1 , _a2 )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateHost" )
}
var r0 network . JoiningBootstrap
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , network . CreateHostOpts ) ( network . JoiningBootstrap , error ) ) ; ok {
return rf ( _a0 , _a1 , _a2 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , network . CreateHostOpts ) network . JoiningBootstrap ) ; ok {
r0 = rf ( _a0 , _a1 , _a2 )
} else {
r0 = ret . Get ( 0 ) . ( network . JoiningBootstrap )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , nebula . HostName , network . CreateHostOpts ) error ) ; ok {
r1 = rf ( _a0 , _a1 , _a2 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// CreateNebulaCertificate provides a mock function with given fields: _a0, _a1, _a2
func ( _m * MockRPC ) CreateNebulaCertificate ( _a0 context . Context , _a1 nebula . HostName , _a2 nebula . EncryptingPublicKey ) ( nebula . Certificate , error ) {
ret := _m . Called ( _a0 , _a1 , _a2 )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateNebulaCertificate" )
}
var r0 nebula . Certificate
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) ( nebula . Certificate , error ) ) ; ok {
return rf ( _a0 , _a1 , _a2 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) nebula . Certificate ) ; ok {
r0 = rf ( _a0 , _a1 , _a2 )
} else {
r0 = ret . Get ( 0 ) . ( nebula . Certificate )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) error ) ; ok {
r1 = rf ( _a0 , _a1 , _a2 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-17 10:33:19 +00:00
// CreateNetwork provides a mock function with given fields: ctx, creationParams, ipNet, hostName, opts
func ( _m * MockRPC ) CreateNetwork ( ctx context . Context , creationParams bootstrap . CreationParams , ipNet nebula . IPNet , hostName nebula . HostName , opts * CreateNetworkOpts ) error {
ret := _m . Called ( ctx , creationParams , ipNet , hostName , opts )
2024-11-16 10:50:55 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateNetwork" )
}
var r0 error
2024-12-17 10:33:19 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , bootstrap . CreationParams , nebula . IPNet , nebula . HostName , * CreateNetworkOpts ) error ) ; ok {
r0 = rf ( ctx , creationParams , ipNet , hostName , opts )
2024-11-16 10:50:55 +00:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2024-12-07 19:39:13 +00:00
// GetBootstrap provides a mock function with given fields: _a0
func ( _m * MockRPC ) GetBootstrap ( _a0 context . Context ) ( bootstrap . Bootstrap , error ) {
2024-11-16 10:50:55 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetBootstrap" )
2024-11-16 10:50:55 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 bootstrap . Bootstrap
2024-11-16 10:50:55 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( bootstrap . Bootstrap , error ) ) ; ok {
2024-11-16 10:50:55 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) bootstrap . Bootstrap ) ; ok {
2024-11-16 10:50:55 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( bootstrap . Bootstrap )
2024-11-16 10:50:55 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-07 19:39:13 +00:00
// GetConfig provides a mock function with given fields: _a0
func ( _m * MockRPC ) GetConfig ( _a0 context . Context ) ( daecommon . NetworkConfig , error ) {
2024-11-16 10:50:55 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetConfig" )
2024-11-16 10:50:55 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 daecommon . NetworkConfig
2024-11-16 10:50:55 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( daecommon . NetworkConfig , error ) ) ; ok {
2024-11-16 10:50:55 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) daecommon . NetworkConfig ) ; ok {
2024-11-16 10:50:55 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( daecommon . NetworkConfig )
2024-11-16 10:50:55 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-07 19:39:13 +00:00
// GetGarageClientParams provides a mock function with given fields: _a0
func ( _m * MockRPC ) GetGarageClientParams ( _a0 context . Context ) ( network . GarageClientParams , error ) {
2024-11-16 10:50:55 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetGarageClientParams" )
2024-11-16 10:50:55 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 network . GarageClientParams
2024-11-16 10:50:55 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( network . GarageClientParams , error ) ) ; ok {
2024-11-16 10:50:55 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) network . GarageClientParams ) ; ok {
2024-11-16 10:50:55 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( network . GarageClientParams )
2024-11-16 10:50:55 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetNetworks provides a mock function with given fields: _a0
func ( _m * MockRPC ) GetNetworks ( _a0 context . Context ) ( [ ] bootstrap . CreationParams , error ) {
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
panic ( "no return value specified for GetNetworks" )
}
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
}
// JoinNetwork provides a mock function with given fields: _a0, _a1
func ( _m * MockRPC ) JoinNetwork ( _a0 context . Context , _a1 network . JoiningBootstrap ) error {
ret := _m . Called ( _a0 , _a1 )
if len ( ret ) == 0 {
panic ( "no return value specified for JoinNetwork" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , network . JoiningBootstrap ) error ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// RemoveHost provides a mock function with given fields: ctx, hostName
func ( _m * MockRPC ) RemoveHost ( ctx context . Context , hostName nebula . HostName ) error {
ret := _m . Called ( ctx , hostName )
if len ( ret ) == 0 {
panic ( "no return value specified for RemoveHost" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName ) error ) ; ok {
r0 = rf ( ctx , hostName )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// SetConfig provides a mock function with given fields: _a0, _a1
func ( _m * MockRPC ) SetConfig ( _a0 context . Context , _a1 daecommon . NetworkConfig ) error {
ret := _m . Called ( _a0 , _a1 )
if len ( ret ) == 0 {
panic ( "no return value specified for SetConfig" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , daecommon . NetworkConfig ) error ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// NewMockRPC creates a new instance of MockRPC. 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 NewMockRPC ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * MockRPC {
mock := & MockRPC { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}