nameutil

package
Version: v0.0.0-...-0e771b2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNamespace

func DefaultNamespace() (string, error)

DefaultNamespace returns the default namespace for a user, which generally is the user's username.

func GenerateContainerName

func GenerateContainerName(namespace, vmname string) string

GenerateContainerName generates a container name based on the namespace and virtual machine name.

func ParseContainerName

func ParseContainerName(contname string) (ns, vmname string, err error)

ParseContainerName takes a container name and returns the VM namespace and name, or an error if the container name is incorrectly formatted.

func RandomName

func RandomName() string

RandomName returns a randomly generated name. This just wraps docker's namesgenerator.GetRandomName() to avoid extra imports.

Types

This section is empty.

Jump to

Keyboard shortcuts

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