Documentation ¶
Index ¶
- Constants
- Variables
- func ConsolePrinter(msg string)
- func FileExists(filename string) (bool, error)
- func GetImageId(image string, imageId string) string
- func GetNamespaceSets(nsInclude string, nsExclude string) (sets.String, sets.String)
- func IsNamespaceIncluded(namespace string, nsInclude sets.String, nsExclude sets.String) bool
- func ParseImageName(image string) (string, string, string, error)
- func ReadObjectList(r io.Reader) ([]runtime.Object, error)
- func ReadObjectsFromFile(filename string) ([]runtime.Object, error)
- func ReadYamlManifest(r io.Reader) ([]runtime.Object, error)
- func WriteFile(outfile string, data string) error
- type CmdRunner
- type File
Constants ¶
View Source
const (
DefaultImageTag = "latest"
)
Variables ¶
View Source
var (
DefaultCmdRunner = &cmdRunner{}
)
View Source
var TitleSprint = color.New(color.FgHiWhite).SprintFunc()
Functions ¶
func ConsolePrinter ¶
func ConsolePrinter(msg string)
func FileExists ¶
FileExists checks if specified file exists.
func GetImageId ¶
func GetNamespaceSets ¶
func IsNamespaceIncluded ¶
func ParseImageName ¶
ParseImageName parses a docker image string into three parts: repo, tag and digest. If both tag and digest are empty, a default image tag will be returned.
Types ¶
type CmdRunner ¶
type CmdRunner interface { Environ() []string LookPath(string) (string, error) RunCmd(cmd *exec.Cmd) ([]byte, error) TempFile(dir, pattern string) (File, error) Remove(name string) error }
CmdRunner the cmdRunner to the outside "world". Wraps methods that modify global state and hence make the code that use them very hard to test.
Click to show internal directories.
Click to hide internal directories.