Documentation ¶
Index ¶
- Variables
- func GenerateSSHKeyPair(size int, encryptKey bool) ([]byte, []byte, error)
- func GetTerminalHeight() int
- func GetTerminalWidth() int
- func HumanizeStorage(nb uint64, unit storageUnit) string
- func HumanizeTime(t time.Time) string
- func InteractiveTerminal(client *ssh.Client) error
- func WithFilters(fs []string) optsFn
- func WithFormat(format string) optsFn
- func WithHeaders(h []ColumnDefinition) optsFn
- func WithIDsOnly(only bool) optsFn
- func WithMaxWidth(maxwidth int) optsFn
- func WithRdfType(rdfType string) optsFn
- func WithRootNode(root *graph.Resource) optsFn
- func WithSortBy(sortingBy ...string) optsFn
- func WithTagFilters(fs []string) optsFn
- func WithTagKeyFilters(fs []string) optsFn
- func WithTagValueFilters(fs []string) optsFn
- type Builder
- type ColoredValueColumnDefinition
- type ColumnDefinition
- type ColumnDefinitions
- type Displayer
- type FirewallRulesColumnDefinition
- type GrantsColumnDefinition
- type KeyValuesColumnDefinition
- type RoutesColumnDefinition
- type SliceColumnDefinition
- type StorageColumnDefinition
- type StringColumnDefinition
- type TimeColumnDefinition
- type TimeFormat
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultsColumnDefinitions = map[string][]ColumnDefinition{ cloud.Instance: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.AvailabilityZone, Friendly: "Zone"}, StringColumnDefinition{Prop: properties.Name}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.State}, ColoredValues: map[string]color.Attribute{"running": color.FgGreen, "stopped": color.FgRed}, }, StringColumnDefinition{Prop: properties.Type}, StringColumnDefinition{Prop: properties.PublicIP, Friendly: "Public IP"}, StringColumnDefinition{Prop: properties.PrivateIP, Friendly: "Private IP"}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Launched, Friendly: "Uptime"}}, StringColumnDefinition{Prop: properties.KeyPair}, }, cloud.Vpc: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.Default, Friendly: "Default"}, ColoredValues: map[string]color.Attribute{"true": color.FgGreen}, }, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.CIDR}, }, cloud.Subnet: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.CIDR}, StringColumnDefinition{Prop: properties.AvailabilityZone, Friendly: "Zone"}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.Default, Friendly: "Default"}, ColoredValues: map[string]color.Attribute{"true": color.FgGreen}, }, StringColumnDefinition{Prop: properties.Vpc}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.Public}, ColoredValues: map[string]color.Attribute{"true": color.FgYellow}}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.State}, ColoredValues: map[string]color.Attribute{"available": color.FgGreen}}, }, cloud.SecurityGroup: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Vpc}, FirewallRulesColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.InboundRules, Friendly: "Inbound"}}, FirewallRulesColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.OutboundRules, Friendly: "Outbound"}}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Description}, }, cloud.InternetGateway: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Vpcs}, }, cloud.RouteTable: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Vpc}, StringColumnDefinition{Prop: properties.Main}, RoutesColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Routes}}, }, cloud.Keypair: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Fingerprint}, }, cloud.Image: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.Location}, StringColumnDefinition{Prop: properties.Public}, StringColumnDefinition{Prop: properties.Type}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created, Friendly: "Created"}}, StringColumnDefinition{Prop: properties.Architecture, Friendly: "Arch"}, StringColumnDefinition{Prop: properties.Hypervisor, Friendly: "Hyperv"}, StringColumnDefinition{Prop: properties.Virtualization, Friendly: "Virt"}, }, cloud.ImportImageTask: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Description}, StringColumnDefinition{Prop: properties.Image}, StringColumnDefinition{Prop: properties.Progress}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.StateMessage}, }, cloud.Volume: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Type}, StringColumnDefinition{Prop: properties.State}, StorageColumnDefinition{Unit: gb, StringColumnDefinition: StringColumnDefinition{Prop: properties.Size}}, StringColumnDefinition{Prop: properties.Encrypted}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, StringColumnDefinition{Prop: properties.AvailabilityZone, Friendly: "Zone"}, StringColumnDefinition{Prop: properties.Instances}, }, cloud.AvailabilityZone: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.Region}, StringColumnDefinition{Prop: properties.Messages}, }, cloud.ElasticIP: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.PublicIP}, StringColumnDefinition{Prop: properties.PrivateIP}, StringColumnDefinition{Prop: properties.Association}, }, cloud.Snapshot: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Volume}, StringColumnDefinition{Prop: properties.Encrypted}, StringColumnDefinition{Prop: properties.Owner}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.Progress}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, StorageColumnDefinition{Unit: gb, StringColumnDefinition: StringColumnDefinition{Prop: properties.Size}}, }, cloud.LoadBalancer: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Vpc}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.PublicDNS}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created, Friendly: "Created"}}, StringColumnDefinition{Prop: properties.Scheme}, }, cloud.TargetGroup: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Vpc}, StringColumnDefinition{Prop: properties.CheckHTTPCode}, StringColumnDefinition{Prop: properties.Port}, StringColumnDefinition{Prop: properties.Protocol}, StringColumnDefinition{Prop: properties.CheckInterval, Friendly: "HCInterval"}, StringColumnDefinition{Prop: properties.CheckPath, Friendly: "HCPath"}, StringColumnDefinition{Prop: properties.CheckPort, Friendly: "HCPort"}, StringColumnDefinition{Prop: properties.CheckProtocol, Friendly: "HCProtocol"}, }, cloud.Listener: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.AlarmActions}, StringColumnDefinition{Prop: properties.LoadBalancer}, StringColumnDefinition{Prop: properties.Port}, StringColumnDefinition{Prop: properties.Protocol}, StringColumnDefinition{Prop: properties.CipherSuite}, }, cloud.Database: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.AvailabilityZone, Friendly: "Zone"}, StringColumnDefinition{Prop: properties.Class}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.State}, ColoredValues: map[string]color.Attribute{"available": color.FgGreen}}, StorageColumnDefinition{Unit: gb, StringColumnDefinition: StringColumnDefinition{Prop: properties.Storage}}, StringColumnDefinition{Prop: properties.Port}, StringColumnDefinition{Prop: properties.Username}, ColoredValueColumnDefinition{ StringColumnDefinition: StringColumnDefinition{Prop: properties.Public}, ColoredValues: map[string]color.Attribute{"true": color.FgYellow}}, StringColumnDefinition{Prop: properties.Engine}, StringColumnDefinition{Prop: properties.EngineVersion, Friendly: "Version"}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created, Friendly: "Created"}}, }, cloud.DbSubnetGroup: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.State, Friendly: "Status"}, StringColumnDefinition{Prop: properties.Vpc}, StringColumnDefinition{Prop: properties.Subnets}, StringColumnDefinition{Prop: properties.Description}, }, cloud.LaunchConfiguration: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Type}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, StringColumnDefinition{Prop: properties.KeyPair}, }, cloud.ScalingGroup: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.LaunchConfigurationName, Friendly: "LaunchConfiguration"}, StringColumnDefinition{Prop: properties.DesiredCapacity}, StringColumnDefinition{Prop: properties.State}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, StringColumnDefinition{Prop: properties.NewInstancesProtected}, }, cloud.ScalingPolicy: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Type}, StringColumnDefinition{Prop: properties.ScalingGroupName}, StringColumnDefinition{Prop: properties.AlarmNames}, StringColumnDefinition{Prop: properties.AdjustmentType}, StringColumnDefinition{Prop: properties.ScalingAdjustment}, }, cloud.User: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.PasswordLastUsed, Friendly: "PasswordLastUsed"}}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, }, cloud.Role: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, }, cloud.Policy: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Updated, Friendly: "Updated"}}, }, cloud.Group: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, }, cloud.AccessKey: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.State}, StringColumnDefinition{Prop: properties.Username}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, }, cloud.Bucket: { StringColumnDefinition{Prop: properties.ID}, GrantsColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Grants}}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, }, cloud.S3Object: { StringColumnDefinition{Prop: properties.ID, Friendly: "Name"}, StringColumnDefinition{Prop: properties.Bucket, Friendly: "Bucket"}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Modified, Friendly: "Modified"}}, StringColumnDefinition{Prop: properties.Owner}, StorageColumnDefinition{Unit: b, StringColumnDefinition: StringColumnDefinition{Prop: properties.Size}}, StringColumnDefinition{Prop: properties.Class}, }, cloud.Subscription: { StringColumnDefinition{Prop: properties.Arn}, StringColumnDefinition{Prop: properties.Topic}, StringColumnDefinition{Prop: properties.Endpoint}, StringColumnDefinition{Prop: properties.Protocol}, StringColumnDefinition{Prop: properties.Owner}, }, cloud.Topic: { StringColumnDefinition{Prop: properties.ID}, }, cloud.Queue: { StringColumnDefinition{Prop: properties.ID, Friendly: "URL"}, StringColumnDefinition{Prop: properties.ApproximateMessageCount, Friendly: "~NbMsg"}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Modified, Friendly: "LastModif"}}, StringColumnDefinition{Prop: properties.Delay, Friendly: "Delay(s)"}, }, cloud.Zone: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Comment}, StringColumnDefinition{Prop: properties.Private, Friendly: "Private"}, StringColumnDefinition{Prop: properties.RecordCount, Friendly: "Nb Records"}, StringColumnDefinition{Prop: properties.CallerReference}, }, cloud.Record: { StringColumnDefinition{Prop: properties.ID, Friendly: "AwlessId"}, StringColumnDefinition{Prop: properties.Type}, StringColumnDefinition{Prop: properties.Name}, SliceColumnDefinition{StringColumnDefinition{Prop: properties.Records}}, StringColumnDefinition{Prop: properties.TTL}, }, cloud.Function: { StringColumnDefinition{Prop: properties.Name}, StorageColumnDefinition{Unit: b, StringColumnDefinition: StringColumnDefinition{Prop: properties.Size}}, StorageColumnDefinition{Unit: mb, StringColumnDefinition: StringColumnDefinition{Prop: properties.Memory}}, StringColumnDefinition{Prop: properties.Runtime}, StringColumnDefinition{Prop: properties.Version}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Modified}}, StringColumnDefinition{Prop: properties.Description}, }, cloud.Metric: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Namespace}, KeyValuesColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Dimensions}}, }, cloud.Alarm: { StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.Namespace}, StringColumnDefinition{Prop: properties.MetricName}, StringColumnDefinition{Prop: properties.Description}, StringColumnDefinition{Prop: properties.State}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Updated}}, KeyValuesColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Dimensions}}, }, cloud.Distribution: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.PublicDNS}, StringColumnDefinition{Prop: properties.Enabled}, StringColumnDefinition{Prop: properties.State}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Modified}}, SliceColumnDefinition{StringColumnDefinition{Prop: properties.Aliases}}, StringColumnDefinition{Prop: properties.SSLSupportMethod}, SliceColumnDefinition{StringColumnDefinition{Prop: properties.Origins}}, }, cloud.Stack: { StringColumnDefinition{Prop: properties.ID}, StringColumnDefinition{Prop: properties.Name}, StringColumnDefinition{Prop: properties.State}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Created}}, TimeColumnDefinition{StringColumnDefinition: StringColumnDefinition{Prop: properties.Modified}}, }, }
Functions ¶
func GenerateSSHKeyPair ¶
func GetTerminalHeight ¶
func GetTerminalHeight() int
func GetTerminalWidth ¶
func GetTerminalWidth() int
func HumanizeStorage ¶ added in v0.0.23
func HumanizeTime ¶ added in v0.0.22
func InteractiveTerminal ¶
func WithFilters ¶
func WithFilters(fs []string) optsFn
func WithFormat ¶
func WithFormat(format string) optsFn
func WithHeaders ¶
func WithHeaders(h []ColumnDefinition) optsFn
func WithIDsOnly ¶
func WithIDsOnly(only bool) optsFn
func WithMaxWidth ¶
func WithMaxWidth(maxwidth int) optsFn
func WithRdfType ¶
func WithRdfType(rdfType string) optsFn
func WithRootNode ¶
func WithSortBy ¶
func WithSortBy(sortingBy ...string) optsFn
func WithTagFilters ¶ added in v0.0.24
func WithTagFilters(fs []string) optsFn
func WithTagKeyFilters ¶ added in v0.0.24
func WithTagKeyFilters(fs []string) optsFn
func WithTagValueFilters ¶ added in v0.0.24
func WithTagValueFilters(fs []string) optsFn
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func BuildOptions ¶
func BuildOptions(opts ...optsFn) *Builder
type ColoredValueColumnDefinition ¶
type ColoredValueColumnDefinition struct { StringColumnDefinition ColoredValues map[string]color.Attribute }
type ColumnDefinition ¶
type ColumnDefinition interface {
// contains filtered or unexported methods
}
type ColumnDefinitions ¶
type ColumnDefinitions []ColumnDefinition
type FirewallRulesColumnDefinition ¶
type FirewallRulesColumnDefinition struct {
StringColumnDefinition
}
type GrantsColumnDefinition ¶
type GrantsColumnDefinition struct {
StringColumnDefinition
}
type KeyValuesColumnDefinition ¶ added in v0.0.23
type KeyValuesColumnDefinition struct {
StringColumnDefinition
}
type RoutesColumnDefinition ¶
type RoutesColumnDefinition struct {
StringColumnDefinition
}
type SliceColumnDefinition ¶
type SliceColumnDefinition struct {
StringColumnDefinition
}
type StorageColumnDefinition ¶ added in v0.0.23
type StorageColumnDefinition struct { StringColumnDefinition Unit storageUnit }
type StringColumnDefinition ¶
type StringColumnDefinition struct {
Prop, Friendly string
}
type TimeColumnDefinition ¶
type TimeColumnDefinition struct { StringColumnDefinition Format TimeFormat }
Click to show internal directories.
Click to hide internal directories.