Documentation ¶
Index ¶
- func Execute()
- func SSHClient(user, keyfile, host string, port int) error
- type Context
- type ContextPrinter
- type Contexts
- type Detailer
- type FilterOpts
- type JSONPrinter
- type MachineWithIPMIPrinter
- type MetalAnyTableDetailer
- type MetalFirewallTablePrinter
- type MetalIPTablePrinter
- type MetalImageTablePrinter
- type MetalMachineAllocationTablePrinter
- type MetalMachineLogsPrinter
- type MetalMachineTablePrinter
- type MetalNetworkTablePrinter
- type MetalPartitionCapacityTablePrinter
- type MetalPartitionTablePrinter
- type MetalProjectTablePrinter
- type MetalSizeMatchingLogTablePrinter
- type MetalSizeTablePrinter
- type MetalSwitchTableDetailer
- type MetalSwitchTablePrinter
- type Printer
- type TableDetailer
- type TablePrinter
- type YAMLPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { ApiURL string `yaml:"url"` IssuerURL string `yaml:"issuer_url"` ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` HMAC *string `yaml:"hmac"` }
Context configure metalctl behaviour
type ContextPrinter ¶
type ContextPrinter struct {
TablePrinter
}
ContextPrinter is a table printer with context
func (ContextPrinter) Print ¶
func (m ContextPrinter) Print(data *Contexts) error
Print a model in yaml format
type Contexts ¶
type Contexts struct { CurrentContext string `yaml:"current"` PreviousContext string `yaml:"previous"` Contexts map[string]Context }
Contexts contains all configuration contexts of metalctl
type Detailer ¶
type Detailer interface {
Detail(data interface{}) error
}
Detailer prints more details than a Printer
func NewDetailer ¶
NewDetailer create a new Detailer which will print more details about metal objects.
type FilterOpts ¶
type JSONPrinter ¶
type JSONPrinter struct{}
JSONPrinter returns the model in json format
func (JSONPrinter) Detail ¶
func (j JSONPrinter) Detail(data interface{}) error
Detail is identical to Print for json
func (JSONPrinter) Print ¶
func (j JSONPrinter) Print(data interface{}) error
Print a model in json format
type MachineWithIPMIPrinter ¶
type MachineWithIPMIPrinter struct {
TablePrinter
}
MachineWithIPMIPrinter is a table printer with Machine IPMI data
func (MachineWithIPMIPrinter) Order ¶
func (m MachineWithIPMIPrinter) Order(data []*models.V1MachineIPMIResponse)
Order ipmi data from machines
func (MachineWithIPMIPrinter) Print ¶
func (m MachineWithIPMIPrinter) Print(data []*models.V1MachineIPMIResponse)
Print ipmi data from machines
type MetalAnyTableDetailer ¶
type MetalAnyTableDetailer struct {
TableDetailer
}
MetalAnyTableDetailer is a Detailer for a any payload
func (MetalAnyTableDetailer) Detail ¶
func (m MetalAnyTableDetailer) Detail(data interface{})
Detail MetalIP
type MetalFirewallTablePrinter ¶
type MetalFirewallTablePrinter struct {
TablePrinter
}
MetalFirewallTablePrinter is a table printer for a MetalFirewall
func (MetalFirewallTablePrinter) Print ¶
func (m MetalFirewallTablePrinter) Print(data []*models.V1FirewallResponse)
Print a MetalFirewall in a table
type MetalIPTablePrinter ¶
type MetalIPTablePrinter struct {
TablePrinter
}
MetalIPTablePrinter is a table printer for a MetalIP
func (MetalIPTablePrinter) Print ¶
func (m MetalIPTablePrinter) Print(data []*models.V1IPResponse)
Print all MetalIPs in a table
type MetalImageTablePrinter ¶
type MetalImageTablePrinter struct {
TablePrinter
}
MetalImageTablePrinter is a table printer for a MetalImage
func (MetalImageTablePrinter) Print ¶
func (m MetalImageTablePrinter) Print(data []*models.V1ImageResponse)
Print a MetalImage in a table
type MetalMachineAllocationTablePrinter ¶
type MetalMachineAllocationTablePrinter struct {
TablePrinter
}
MetalMachineAllocationTablePrinter is a table printer for a MetalMachine
type MetalMachineLogsPrinter ¶
type MetalMachineLogsPrinter struct {
TablePrinter
}
MetalMachineLogsPrinter prints machine logs
func (MetalMachineLogsPrinter) Print ¶
func (m MetalMachineLogsPrinter) Print(data []*models.V1MachineProvisioningEvent)
Print machine logs
type MetalMachineTablePrinter ¶
type MetalMachineTablePrinter struct {
TablePrinter
}
MetalMachineTablePrinter is a table printer for a MetalMachine
func (MetalMachineTablePrinter) Order ¶
func (m MetalMachineTablePrinter) Order(data []*models.V1MachineResponse)
Order machines
func (MetalMachineTablePrinter) Print ¶
func (m MetalMachineTablePrinter) Print(data []*models.V1MachineResponse)
Print a list of Machines in a table
type MetalNetworkTablePrinter ¶
type MetalNetworkTablePrinter struct {
TablePrinter
}
MetalNetworkTablePrinter is a table printer for a MetalNetwork
func (MetalNetworkTablePrinter) Print ¶
func (m MetalNetworkTablePrinter) Print(data []*models.V1NetworkResponse)
Print all MetalNetworks in a table
type MetalPartitionCapacityTablePrinter ¶
type MetalPartitionCapacityTablePrinter struct {
TablePrinter
}
MetalPartitionCapacityTablePrinter is a table printer for a MetalPartition
func (MetalPartitionCapacityTablePrinter) Print ¶
func (m MetalPartitionCapacityTablePrinter) Print(pcs []*models.V1PartitionCapacity)
Print a PartitionCapacity in a table
type MetalPartitionTablePrinter ¶
type MetalPartitionTablePrinter struct {
TablePrinter
}
MetalPartitionTablePrinter is a table printer for a MetalPartition
func (MetalPartitionTablePrinter) Print ¶
func (m MetalPartitionTablePrinter) Print(data []*models.V1PartitionResponse)
Print a MetalPartition in a table
type MetalProjectTablePrinter ¶
type MetalProjectTablePrinter struct {
TablePrinter
}
MetalProjectTablePrinter is a table printer for a MetalProject
func (MetalProjectTablePrinter) Print ¶
func (m MetalProjectTablePrinter) Print(data []*models.V1ProjectResponse)
Print all MetalIPs in a table
type MetalSizeMatchingLogTablePrinter ¶
type MetalSizeMatchingLogTablePrinter struct {
TablePrinter
}
MetalSizeMatchingLogTablePrinter is a table printer for a MetalSizeMatchingLog
func (MetalSizeMatchingLogTablePrinter) Print ¶
func (m MetalSizeMatchingLogTablePrinter) Print(data []*models.V1SizeMatchingLog)
Print a MetalSize in a table
type MetalSizeTablePrinter ¶
type MetalSizeTablePrinter struct {
TablePrinter
}
MetalSizeTablePrinter is a table printer for a MetalSize
func (MetalSizeTablePrinter) Print ¶
func (m MetalSizeTablePrinter) Print(data []*models.V1SizeResponse)
Print a MetalSize in a table
type MetalSwitchTableDetailer ¶
type MetalSwitchTableDetailer struct {
TableDetailer
}
MetalSwitchTableDetailer is a table printer for a MetalSwitch
func (MetalSwitchTableDetailer) Detail ¶
func (m MetalSwitchTableDetailer) Detail(data []*models.V1SwitchResponse)
Detail MetalSwitch
type MetalSwitchTablePrinter ¶
type MetalSwitchTablePrinter struct {
TablePrinter
}
MetalSwitchTablePrinter is a table printer for a MetalSwitch
func (MetalSwitchTablePrinter) Print ¶
func (m MetalSwitchTablePrinter) Print(data []*models.V1SwitchResponse)
Print all MetalSwitch(es) in a table
type Printer ¶
type Printer interface {
Print(data interface{}) error
}
Printer main Interface for implementations which spits out to stdout
type TableDetailer ¶
type TableDetailer struct {
// contains filtered or unexported fields
}
TableDetailer produces a human readable model representation
func (TableDetailer) Detail ¶
func (t TableDetailer) Detail(data interface{}) error
Detail a model in a human readable table
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
TablePrinter produces a human readable model representation
func (TablePrinter) Print ¶
func (t TablePrinter) Print(data interface{}) error
Print a model in a human readable table
type YAMLPrinter ¶
type YAMLPrinter struct{}
YAMLPrinter returns the model in yaml format
func (YAMLPrinter) Detail ¶
func (y YAMLPrinter) Detail(data interface{}) error
Detail is identical to Print for json
func (YAMLPrinter) Print ¶
func (y YAMLPrinter) Print(data interface{}) error
Print a model in yaml format