models

package
v0.1.4-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevModel

type DevModel interface {
	Adapters() []*config.SystemAdapter
	Networks() []*config.NetworkConfig
	PhysicalIOs() []*config.PhysicalIO
	AdapterForSwitches() []string
	DevModelType() string
	GetFirstAdapterForSwitches() string
	SetWiFiParams(ssid string, psk string)
	GetPortConfig(ssid string, psk string) string
	DiskFormat() string
	DiskReadyMessage() string
	Config() map[string]interface{}
}

DevModel is an interface to use for describe device

func GetDevModel

func GetDevModel(devModelType devModelType) (DevModel, error)

GetDevModel return DevModel object by DevModelType

func GetDevModelByName

func GetDevModelByName(modelType string) (DevModel, error)

GetDevModelByName return DevModel object by DevModelType string

type DevModelGCP

type DevModelGCP struct {
	// contains filtered or unexported fields
}

DevModelGCP is dev model fields

func (*DevModelGCP) AdapterForSwitches

func (ctx *DevModelGCP) AdapterForSwitches() []string

AdapterForSwitches returns adapterForSwitches of devModel

func (*DevModelGCP) Adapters

func (ctx *DevModelGCP) Adapters() []*config.SystemAdapter

Adapters returns adapters of devModel

func (*DevModelGCP) Config

func (ctx *DevModelGCP) Config() map[string]interface{}

Config returns map with config overwrites

func (*DevModelGCP) DevModelType

func (ctx *DevModelGCP) DevModelType() string

DevModelType returns devModelType of devModel

func (*DevModelGCP) DiskFormat

func (ctx *DevModelGCP) DiskFormat() string

DiskFormat to use for build image

func (*DevModelGCP) DiskReadyMessage

func (ctx *DevModelGCP) DiskReadyMessage() string

DiskReadyMessage to show when image is ready

func (*DevModelGCP) GetFirstAdapterForSwitches

func (ctx *DevModelGCP) GetFirstAdapterForSwitches() string

GetFirstAdapterForSwitches return first adapter available for switch networkInstance

func (*DevModelGCP) GetPortConfig

func (ctx *DevModelGCP) GetPortConfig(_ string, _ string) string

GetPortConfig returns PortConfig overwrite

func (*DevModelGCP) Networks

func (ctx *DevModelGCP) Networks() []*config.NetworkConfig

Networks returns networks of devModel

func (*DevModelGCP) PhysicalIOs

func (ctx *DevModelGCP) PhysicalIOs() []*config.PhysicalIO

PhysicalIOs returns physicalIOs of devModel

func (*DevModelGCP) SetWiFiParams

func (ctx *DevModelGCP) SetWiFiParams(_ string, _ string)

SetWiFiParams not implemented for Qemu

type DevModelGeneral

type DevModelGeneral struct {
	// contains filtered or unexported fields
}

DevModelGeneral is dev model fields

func (*DevModelGeneral) AdapterForSwitches

func (ctx *DevModelGeneral) AdapterForSwitches() []string

AdapterForSwitches returns adapterForSwitches of devModel

func (*DevModelGeneral) Adapters

func (ctx *DevModelGeneral) Adapters() []*config.SystemAdapter

Adapters returns adapters of devModel

func (*DevModelGeneral) Config

func (ctx *DevModelGeneral) Config() map[string]interface{}

Config returns map with config overwrites

func (*DevModelGeneral) DevModelType

func (ctx *DevModelGeneral) DevModelType() string

DevModelType returns devModelType of devModel

func (*DevModelGeneral) DiskFormat

func (ctx *DevModelGeneral) DiskFormat() string

DiskFormat to use for build image

func (*DevModelGeneral) DiskReadyMessage

func (ctx *DevModelGeneral) DiskReadyMessage() string

DiskReadyMessage to show when image is ready

func (*DevModelGeneral) GetFirstAdapterForSwitches

func (ctx *DevModelGeneral) GetFirstAdapterForSwitches() string

GetFirstAdapterForSwitches return first adapter available for switch networkInstance

func (*DevModelGeneral) GetPortConfig

func (ctx *DevModelGeneral) GetPortConfig(_ string, _ string) string

GetPortConfig returns PortConfig overwrite

func (*DevModelGeneral) Networks

func (ctx *DevModelGeneral) Networks() []*config.NetworkConfig

Networks returns networks of devModel

func (*DevModelGeneral) PhysicalIOs

func (ctx *DevModelGeneral) PhysicalIOs() []*config.PhysicalIO

PhysicalIOs returns physicalIOs of devModel

func (*DevModelGeneral) SetWiFiParams

func (ctx *DevModelGeneral) SetWiFiParams(_ string, _ string)

SetWiFiParams not implemented for Qemu

type DevModelQemu

type DevModelQemu struct {
	// contains filtered or unexported fields
}

DevModelQemu is dev model fields

func (*DevModelQemu) AdapterForSwitches

func (ctx *DevModelQemu) AdapterForSwitches() []string

AdapterForSwitches returns adapterForSwitches of devModel

func (*DevModelQemu) Adapters

func (ctx *DevModelQemu) Adapters() []*config.SystemAdapter

Adapters returns adapters of devModel

func (*DevModelQemu) Config

func (ctx *DevModelQemu) Config() map[string]interface{}

Config returns map with config overwrites

func (*DevModelQemu) DevModelType

func (ctx *DevModelQemu) DevModelType() string

DevModelType returns devModelType of devModel

func (*DevModelQemu) DiskFormat

func (ctx *DevModelQemu) DiskFormat() string

DiskFormat to use for build image

func (*DevModelQemu) DiskReadyMessage

func (ctx *DevModelQemu) DiskReadyMessage() string

DiskReadyMessage to show when image is ready

func (*DevModelQemu) GetFirstAdapterForSwitches

func (ctx *DevModelQemu) GetFirstAdapterForSwitches() string

GetFirstAdapterForSwitches return first adapter available for switch networkInstance

func (*DevModelQemu) GetPortConfig

func (ctx *DevModelQemu) GetPortConfig(_ string, _ string) string

GetPortConfig returns PortConfig overwrite

func (*DevModelQemu) Networks

func (ctx *DevModelQemu) Networks() []*config.NetworkConfig

Networks returns networks of devModel

func (*DevModelQemu) PhysicalIOs

func (ctx *DevModelQemu) PhysicalIOs() []*config.PhysicalIO

PhysicalIOs returns physicalIOs of devModel

func (*DevModelQemu) SetWiFiParams

func (ctx *DevModelQemu) SetWiFiParams(_ string, _ string)

SetWiFiParams not implemented for Qemu

type DevModelRpi

type DevModelRpi struct {
	// contains filtered or unexported fields
}

DevModelRpi is dev model fields

func (*DevModelRpi) AdapterForSwitches

func (ctx *DevModelRpi) AdapterForSwitches() []string

AdapterForSwitches returns adapterForSwitches of devModel

func (*DevModelRpi) Adapters

func (ctx *DevModelRpi) Adapters() []*config.SystemAdapter

Adapters returns adapters of devModel

func (*DevModelRpi) Config

func (ctx *DevModelRpi) Config() map[string]interface{}

Config returns map with config overwrites

func (*DevModelRpi) DevModelType

func (ctx *DevModelRpi) DevModelType() string

DevModelType returns devModelType of devModel

func (*DevModelRpi) DiskFormat

func (ctx *DevModelRpi) DiskFormat() string

DiskFormat to use for build image

func (*DevModelRpi) DiskReadyMessage

func (ctx *DevModelRpi) DiskReadyMessage() string

DiskReadyMessage to show when image is ready

func (*DevModelRpi) GetFirstAdapterForSwitches

func (ctx *DevModelRpi) GetFirstAdapterForSwitches() string

GetFirstAdapterForSwitches return first adapter available for switch networkInstance

func (*DevModelRpi) GetPortConfig

func (ctx *DevModelRpi) GetPortConfig(ssid string, psk string) string

GetPortConfig returns PortConfig overwrite

func (*DevModelRpi) Networks

func (ctx *DevModelRpi) Networks() []*config.NetworkConfig

Networks returns networks of devModel

func (*DevModelRpi) PhysicalIOs

func (ctx *DevModelRpi) PhysicalIOs() []*config.PhysicalIO

PhysicalIOs returns physicalIOs of devModel

func (*DevModelRpi) SetWiFiParams

func (ctx *DevModelRpi) SetWiFiParams(ssid string, psk string)

SetWiFiParams set ssid and psk for RPI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL