Documentation
¶
Index ¶
- func DecodeProject(encoded string) (string, string, error)
- func EncodeProject(uuid, project string) string
- func HumanizeDuration(duration time.Duration) string
- 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 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeProject ¶
func HumanizeDuration ¶
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 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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.