Documentation ¶
Index ¶
- Variables
- func AttachImage(cCtx *cli.Context) error
- func ClearImageMetadata(cCtx *cli.Context) error
- func ClearVmMetadata(cCtx *cli.Context) error
- func Console(cCtx *cli.Context) error
- func CreateImage(cCtx *cli.Context) error
- func CreateVirtualMachine(cCtx *cli.Context) error
- func DeleteImage(cCtx *cli.Context) error
- func DeleteVirtualMachine(cCtx *cli.Context) error
- func DetachImage(cCtx *cli.Context) error
- func GetImageMetadata(cCtx *cli.Context) error
- func GetMetadataFunc(registry MetadatableRegistry) func(cCtx *cli.Context) error
- func GetStatus(cCtx *cli.Context) error
- func GetVmMetadata(cCtx *cli.Context) error
- func Images(cCtx *cli.Context) error
- func ListImages(cCtx *cli.Context) error
- func ListVirtualMachines(cCtx *cli.Context) error
- func Power(cCtx *cli.Context) error
- func PrintError(format string, a ...interface{})
- func SetImageMetadata(cCtx *cli.Context) error
- func SetMetadataFunc(registry MetadatableRegistry) func(cCtx *cli.Context) error
- func SetVmMetadata(cCtx *cli.Context) error
- func VNC(cCtx *cli.Context) error
- type MetadatableRegistry
Constants ¶
This section is empty.
Variables ¶
var ConsoleCtxKey = "console command"
ConsoleCtxKey is a context key for commands invoked in an interactive console.
var ErrorColor = color.New(color.FgRed)
ErrorColor is a customizable red color printer.
var InvalidImageSize = errors.New("invalid image size")
InvalidImageSize is an error about an invalid image size (size must be positive).
var InvalidRAMSize = errors.New("invalid ram size")
InvalidRAMSize is an error about an invalid RAM memory size (size must be positive).
var NoOpenWebSocket = errors.New("no open websocket found")
NoOpenWebSocket is an error about an opened WebSocket not being found in a virtual machine's VNC servers.
var PrintSuccess = SuccessColor.PrintfFunc()
PrintSuccess is a Printf-compatible func for SuccessColor.
var RecursiveConsoleError = errors.New("the console command cannot be invoked inside of itself")
RecursiveConsoleError is an error which gets raised when a user attempts to invoke the console command in a console.
var SuccessColor = color.New(color.FgGreen)
SuccessColor is a customizable green color printer.
var UnknownArchitecture = errors.New("unknown architecture")
UnknownArchitecture is an error about an unknown architecture.
var UnknownFormat = errors.New("unknown format")
UnknownFormat is an error about a missing image format.
var UnknownPowerAction = errors.New("unknown power action")
UnknownPowerAction is an error about an unknown power action.
Functions ¶
func AttachImage ¶
func AttachImage(cCtx *cli.Context) error
AttachImage is a handler for the "vm attach" command.
func ClearImageMetadata ¶
func ClearImageMetadata(cCtx *cli.Context) error
ClearImageMetadata is a handler for the "image metadata clear" command.
func ClearVmMetadata ¶
func ClearVmMetadata(cCtx *cli.Context) error
ClearVmMetadata is a handler for the "vm metadata clear" command.
func Console ¶
func Console(cCtx *cli.Context) error
Console is a handler for the "console" command.
func CreateImage ¶
func CreateImage(cCtx *cli.Context) error
CreateImage is a handler for the "image create" command.
func CreateVirtualMachine ¶
func CreateVirtualMachine(cCtx *cli.Context) error
CreateVirtualMachine is a handler for the "vm create" command.
func DeleteImage ¶
func DeleteImage(cCtx *cli.Context) error
DeleteImage is a handler for the "image delete" command.
func DeleteVirtualMachine ¶
func DeleteVirtualMachine(cCtx *cli.Context) error
DeleteVirtualMachine is a handler for the "vm delete" command.
func DetachImage ¶
func DetachImage(cCtx *cli.Context) error
DetachImage is a handler for the "vm detach" command.
func GetImageMetadata ¶
func GetImageMetadata(cCtx *cli.Context) error
GetImageMetadata is a handler for the "image metadata" command.
func GetMetadataFunc ¶
func GetMetadataFunc(registry MetadatableRegistry) func(cCtx *cli.Context) error
GetMetadataFunc produces a handler for "metadata" commands.
func GetStatus ¶
func GetStatus(cCtx *cli.Context) error
GetStatus is a handler for the "vm status" command.
func GetVmMetadata ¶
func GetVmMetadata(cCtx *cli.Context) error
GetVmMetadata is a handler for the "vm metadata" command.
func ListImages ¶
func ListImages(cCtx *cli.Context) error
ListImages is a handler for the "image list" command.
func ListVirtualMachines ¶
func ListVirtualMachines(cCtx *cli.Context) error
ListVirtualMachines is a handler for the "vm list" command.
func PrintError ¶
func PrintError(format string, a ...interface{})
PrintError is a Printf-compatible func for ErrorColor.
func SetImageMetadata ¶
func SetImageMetadata(cCtx *cli.Context) error
SetImageMetadata is a handler for the "image metadata set" command.
func SetMetadataFunc ¶
func SetMetadataFunc(registry MetadatableRegistry) func(cCtx *cli.Context) error
SetMetadataFunc produces a handler for "metadata set" commands.
func SetVmMetadata ¶
func SetVmMetadata(cCtx *cli.Context) error
SetVmMetadata is a handler for the "vm metadata set" command.
Types ¶
type MetadatableRegistry ¶
type MetadatableRegistry interface { GetMetadata(ctx context.Context, in *v1.GetMetadataRequest, opts ...grpc.CallOption) (*v1.GetMetadataResponse, error) SetMetadata(ctx context.Context, in *v1.SetMetadataRequest, opts ...grpc.CallOption) (*v1.SetMetadataResponse, error) }
MetadatableRegistry is a registry that allows for CRUD operations with metadata.