Documentation
¶
Index ¶
- Constants
- func AddMachineCreateFlags(cmd *cobra.Command, name string, completion *completion.Completion)
- func AddMachineQueryFlags(cmd *cobra.Command, completion *completion.Completion)
- func AddressFamilyFromPrefixes(prefixes ...string) (*apiv2.NetworkAddressFamily, error)
- func DecodeProject(encoded string) (string, string, error)
- func EncodeProject(uuid, project string) string
- func HumanizeDuration(duration time.Duration) string
- func IPAddressFamilyToType(af string) *apiv2.IPAddressFamily
- func IPTypeToType(t string) *apiv2.IPType
- func ImageClassificationFromString(classification string) (apiv2.ImageClassification, error)
- func ImageFeatureFromString(feature string) (*apiv2.ImageFeature, error)
- func ImageFeaturesFromStringSlice(features []string) ([]apiv2.ImageFeature, error)
- func IsAnyViperFlagSet(names ...string) bool
- func LabelsFromSlice(labelSlice []string) (*apiv2.Labels, error)
- func MachineCreateRequestFromCLI(c *config.Config) (*apiv2.MachineServiceCreateRequest, error)
- func MachineListEmojiHelpText() string
- func MachineQuery(unscoped bool) (*apiv2.MachineQuery, error)
- func MachineResponseToCreate(r *apiv2.Machine) (*apiv2.MachineServiceCreateRequest, error)
- func MachineResponseToUpdate(r *apiv2.Machine) (*apiv2.MachineServiceUpdateRequest, error)
- func MachineUpdateRequestFromCLI(c *config.Config, args []string) (*apiv2.MachineServiceUpdateRequest, error)
- func NetworkAddressFamilyToType(af string) *apiv2.NetworkAddressFamily
- func SSHClient(user, keyfile, host string, port int, idToken string, project *string) error
- func SearchSSHKey() (string, error)
- func ToAdminRole(roleString string) (*apiv2.AdminRole, error)
- func ToInfraRole(roleString string) (*apiv2.InfraRole, error)
- func ToMachineRoles(machineRolesSlice []string) (map[string]apiv2.MachineRole, error)
- func ToPermissionsByVisibility(perms []*apiv2.MethodPermission) ([]*apiv2.PermissionsByVisibility, error)
- func ToProjectRoles(projectRolesSlice []string) (map[string]apiv2.ProjectRole, error)
- func ToTenantRoles(tenantRolesSlice []string) (map[string]apiv2.TenantRole, error)
- func TrimProvider(subject string) string
- func UpdateLabelsFromCLI() (*apiv2.UpdateLabels, error)
- func UpdateLabelsFromMeta(meta *apiv2.Meta) *apiv2.UpdateLabels
- func UpdateMetaFromMeta(meta *apiv2.Meta) *apiv2.UpdateMeta
Constants ¶
const ( Ambulance = "🚑" Exclamation = "❗" Bark = "🚧" Loop = "⭕" Lock = "🔒" Question = "❓" Skull = "💀" VPN = "🛡" )
Variables ¶
This section is empty.
Functions ¶
func AddMachineCreateFlags ¶ added in v0.1.0
func AddMachineCreateFlags(cmd *cobra.Command, name string, completion *completion.Completion)
func AddMachineQueryFlags ¶ added in v0.1.0
func AddMachineQueryFlags(cmd *cobra.Command, completion *completion.Completion)
func AddressFamilyFromPrefixes ¶ added in v0.1.0
func AddressFamilyFromPrefixes(prefixes ...string) (*apiv2.NetworkAddressFamily, error)
func EncodeProject ¶
func HumanizeDuration ¶
func IPAddressFamilyToType ¶ added in v0.1.0
func IPAddressFamilyToType(af string) *apiv2.IPAddressFamily
func IPTypeToType ¶ added in v0.1.0
func ImageClassificationFromString ¶
func ImageClassificationFromString(classification string) (apiv2.ImageClassification, error)
func ImageFeatureFromString ¶
func ImageFeatureFromString(feature string) (*apiv2.ImageFeature, error)
func ImageFeaturesFromStringSlice ¶
func ImageFeaturesFromStringSlice(features []string) ([]apiv2.ImageFeature, error)
func IsAnyViperFlagSet ¶
func LabelsFromSlice ¶
LabelsFromSlice converts a given label slice (e.g. ["a=b"]) into apiv2 labels. When an empty slice is provided be aware that this function returns nil without an error.
func MachineCreateRequestFromCLI ¶ added in v0.1.0
func MachineCreateRequestFromCLI(c *config.Config) (*apiv2.MachineServiceCreateRequest, error)
func MachineListEmojiHelpText ¶ added in v0.1.0
func MachineListEmojiHelpText() string
func MachineQuery ¶ added in v0.1.0
func MachineQuery(unscoped bool) (*apiv2.MachineQuery, error)
MachineQuery returns a machine query from the cmd flags added through AddMachineQueryFlags unscoped indicates an unscoped request made from the admin API, which has certain effects on building the query
func MachineResponseToCreate ¶ added in v0.1.0
func MachineResponseToCreate(r *apiv2.Machine) (*apiv2.MachineServiceCreateRequest, error)
func MachineResponseToUpdate ¶ added in v0.1.0
func MachineResponseToUpdate(r *apiv2.Machine) (*apiv2.MachineServiceUpdateRequest, error)
func MachineUpdateRequestFromCLI ¶ added in v0.1.0
func NetworkAddressFamilyToType ¶ added in v0.1.0
func NetworkAddressFamilyToType(af string) *apiv2.NetworkAddressFamily
func SSHClient ¶ added in v0.1.2
SSHClient opens an interactive ssh session to the host on port with user, authenticated by the key.
func SearchSSHKey ¶ added in v0.1.0
func ToMachineRoles ¶
func ToMachineRoles(machineRolesSlice []string) (map[string]apiv2.MachineRole, error)
func ToPermissionsByVisibility ¶
func ToPermissionsByVisibility(perms []*apiv2.MethodPermission) ([]*apiv2.PermissionsByVisibility, error)
func ToProjectRoles ¶
func ToProjectRoles(projectRolesSlice []string) (map[string]apiv2.ProjectRole, error)
func ToTenantRoles ¶
func ToTenantRoles(tenantRolesSlice []string) (map[string]apiv2.TenantRole, error)
func TrimProvider ¶
func UpdateLabelsFromCLI ¶
func UpdateLabelsFromCLI() (*apiv2.UpdateLabels, error)
UpdateLabelsFromCLI returns update labels from CLI args. Make sure you use --add-labels, --remove-labels and --labels in the command. Note that this function returns nil without an error in case none of the flags are used.
func UpdateLabelsFromMeta ¶
func UpdateLabelsFromMeta(meta *apiv2.Meta) *apiv2.UpdateLabels
UpdateLabelsFromMeta returns update labels with replace strategy from a given meta.
func UpdateMetaFromMeta ¶
func UpdateMetaFromMeta(meta *apiv2.Meta) *apiv2.UpdateMeta
UpdateMetaFromMeta returns an update for a given meta. When the updated at field is set, it uses client locking, otherwise server locking.
Types ¶
This section is empty.