common

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDataFieldToSecretPatchOp

func AddDataFieldToSecretPatchOp() []patch.PatchOperation

func AddKeyToSecretPatchOp

func AddKeyToSecretPatchOp(keyName string, key []byte) patch.PatchOperation

func ContainsValue

func ContainsValue(slice []string, value string) bool

func FindSecretOrGetFirst

func FindSecretOrGetFirst(secretName string, secrets []string) (string, error)

func GetSshKey

func GetSshKey(flags *SshCommandFlags) (string, error)

func GetSshSecretsForUser

func GetSshSecretsForUser(accessCredentials []v1.AccessCredential, user string) []string

func IsOwnedByVm

func IsOwnedByVm(obj metav1.Object, vm *v1.VirtualMachine) bool

func LineContainsKey

func LineContainsKey(line string, key string) bool

func MustMarshalPatch

func MustMarshalPatch(patches ...patch.PatchOperation) []byte

func RandomWithPrefix

func RandomWithPrefix(prefix string) string

Types

type CommandFlags

type CommandFlags struct {
	User   string
	Secret string
}

func (*CommandFlags) AddToCommand

func (c *CommandFlags) AddToCommand(cmd *cobra.Command)

type SshCommandFlags

type SshCommandFlags struct {
	CommandFlags

	SshPubKeyFile    string
	SshPubKeyLiteral string
}

func (*SshCommandFlags) AddToCommand

func (s *SshCommandFlags) AddToCommand(cmd *cobra.Command)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL