util

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const WIN = "windows"

Variables

This section is empty.

Functions

func ConvertLabelsToSelector

func ConvertLabelsToSelector(labels map[string]string) string

ConvertLabelsToSelector converts the given labels to selector

func ExtractComponentType added in v0.0.11

func ExtractComponentType(namespacedVersionedComponentType string) string

ExtractComponentType returns only component type part from passed component type(default unqualified, fully qualified, versioned, etc...and their combinations) for use as component name Possible types of parameters: 1. "myproject/python:3.5" -- Return python 2. "python:3.5" -- Return python 3. nodejs -- Return nodejs

func GenFileUrl added in v0.0.11

func GenFileUrl(location string, os string) string

Converts file path on windows to /C:/path/to/file to work in URL

func GenerateRandomString

func GenerateRandomString(n int) string

GenerateRandomString generates a random string of lower case characters of the given size

func NamespaceOpenShiftObject added in v0.0.7

func NamespaceOpenShiftObject(componentName string, applicationName string) (string, error)

Hyphenate applicationName and componentName

func ParseCreateCmdArgs added in v0.0.11

func ParseCreateCmdArgs(args []string) (string, string, string, string)

parseCreateCmdArgs returns 1. image name 2. component type i.e, builder image name 3. component name default value is component type else the user requested component name 4. component version which is by default latest else version passed with builder image name

func ReadFilePath added in v0.0.11

func ReadFilePath(u *url.URL, os string) string

Reads file path form URL file:///C:/path/to/file to C:\path\to\file

Types

This section is empty.

Jump to

Keyboard shortcuts

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