Documentation ¶
Index ¶
- func Add(original *map[string]string, toAdd map[string]string, toRemove []string) map[string]string
- func AddedAndRemovalListsFromArray(m []string) ([]string, []string)
- func ContainsAll(target string, substrings ...string) cmp.Comparison
- func ContainsAllIgnoreCase(target string, substrings ...string) cmp.Comparison
- func ContainsNone(target string, substrings ...string) cmp.Comparison
- func EnvToMap(vars []corev1.EnvVar) (map[string]string, error)
- func GenerateVolumeName(path string) string
- func GetEnvsFromFile(filepath string, delimiter string) ([]string, error)
- func GetGroupVersionKind(obj runtime.Object, gv schema.GroupVersion, scheme *runtime.Scheme) (*schema.GroupVersionKind, error)
- func MapFromArray(arr []string, delimiter string) (map[string]string, error)
- func MapFromArrayAllowingSingles(arr []string, delimiter string) (map[string]string, error)
- func NewLoggingTransport(transport http.RoundTripper) http.RoundTripper
- func NewLoggingTransportWithStream(transport http.RoundTripper, s io.Writer) http.RoundTripper
- func ParseMinusSuffix(m map[string]string) []string
- func ParseSelector(labelSelector string) (map[string]string, error)
- func SliceContainsIgnoreCase(slice []string, target string) bool
- func ToTrackerReference(subject, namespace string) (*tracker.Reference, error)
- func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)
- func ToUnstructuredList(obj runtime.Object) (*unstructured.UnstructuredList, error)
- func UpdateGroupVersionKindWithScheme(obj runtime.Object, gv schema.GroupVersion, scheme *runtime.Scheme) error
- type LoggingHttpTransport
- type OrderedMap
- func (o *OrderedMap) Delete(key string)
- func (o *OrderedMap) Get(key string) (interface{}, bool)
- func (o *OrderedMap) GetString(key string) (string, bool)
- func (o *OrderedMap) GetStringWithDefault(key string, defaultValue string) string
- func (o *OrderedMap) Iterator() *orderedMapIterator
- func (o *OrderedMap) Len() int
- func (o *OrderedMap) Set(key string, value interface{})
- type StringMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddedAndRemovalListsFromArray ¶
AddedAndRemovalListsFromArray returns a list of added entries and a list of removal entries
func ContainsAll ¶
func ContainsAll(target string, substrings ...string) cmp.Comparison
ContainsAll is a comparison utility, compares given substrings against target string and returns the gotest.tools/v3/assert/cmp.Comparison function. Provide target string as first arg, followed by any number of substring as args
func ContainsAllIgnoreCase ¶
func ContainsAllIgnoreCase(target string, substrings ...string) cmp.Comparison
Like ContainsAll but ignores the case when checking
func ContainsNone ¶
func ContainsNone(target string, substrings ...string) cmp.Comparison
ContainsNone is a comparison utility, compares given substrings against target string and returns the gotest.tools/v3/assert/cmp.Comparison function. Provide target string as first arg, followed by any number of substring as args
func EnvToMap ¶
EnvToMap is an utility function to translate between the API list form of env vars, and the more convenient map form.
func GenerateVolumeName ¶
GenerateVolumeName generates a volume name with respect to a given path string. Current implementation basically sanitizes the path string by replacing "/" with "-" To reduce any chance of duplication, a checksum part generated from the path string is appended to the sanitized string. The volume name must follow the DNS label standard as defined in RFC 1123. This means the name must: - contain at most 63 characters - contain only lowercase alphanumeric characters or '-' - start with an alphanumeric character - end with an alphanumeric character
func GetEnvsFromFile ¶
GetEnvsFromFile transform a path to a file containing environment variable into a list of key-value pair. If there is an issue reading the file or parsing the content in the file an error value will be returned.
func GetGroupVersionKind ¶
func GetGroupVersionKind(obj runtime.Object, gv schema.GroupVersion, scheme *runtime.Scheme) (*schema.GroupVersionKind, error)
func NewLoggingTransport ¶
func NewLoggingTransport(transport http.RoundTripper) http.RoundTripper
func NewLoggingTransportWithStream ¶
func NewLoggingTransportWithStream(transport http.RoundTripper, s io.Writer) http.RoundTripper
func ParseMinusSuffix ¶
func ParseSelector ¶
ParseSelector will parse a label selector in form of labelKey1=value1,labelKey2=value2.
func SliceContainsIgnoreCase ¶
SliceContainsIgnoreCase checks (case insensitive) if given target string is present in slice
func ToTrackerReference ¶
ToTrackerReference will parse a subject in form of kind:apiVersion:name for named resources or kind:apiVersion:labelKey1=value1,labelKey2=value2 for matching via a label selector.
func ToUnstructured ¶
func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)
func ToUnstructuredList ¶
func ToUnstructuredList(obj runtime.Object) (*unstructured.UnstructuredList, error)
ToUnstructuredList is to convert an object to unstructured.UnstructuredList. If the object is not a list type, it will convert to a single item UnstructuredList.
Types ¶
type LoggingHttpTransport ¶
type LoggingHttpTransport struct {
// contains filtered or unexported fields
}
type OrderedMap ¶
OrderedMap is similar implementation of OrderedDict in Python.
func NewOrderedMapWithKVStrings ¶
func NewOrderedMapWithKVStrings(kvList [][]string) *OrderedMap
NewOrderedMapWithKVStrings returns new empty ordered map
func OrderedMapAndRemovalListFromArray ¶
func OrderedMapAndRemovalListFromArray(arr []string, delimiter string) (*OrderedMap, []string, error)
OrderedMapAndRemovalListFromArray creates a list of key-value pair using MapFromArrayAllowingSingles, and a list of removal entries
func (*OrderedMap) Delete ¶
func (o *OrderedMap) Delete(key string)
Delete deletes the key and value from the map
func (*OrderedMap) Get ¶
func (o *OrderedMap) Get(key string) (interface{}, bool)
Get returns a value corresponding the key
func (*OrderedMap) GetString ¶
func (o *OrderedMap) GetString(key string) (string, bool)
GetString returns a string value corresponding the key
func (*OrderedMap) GetStringWithDefault ¶
func (o *OrderedMap) GetStringWithDefault(key string, defaultValue string) string
GetStringWithDefault returns a string value corresponding the key if the key is existing. Otherwise, the default value is returned.
func (*OrderedMap) Iterator ¶
func (o *OrderedMap) Iterator() *orderedMapIterator
Iterator creates a iterator object
func (*OrderedMap) Set ¶
func (o *OrderedMap) Set(key string, value interface{})
Set append the key and value if the key is not existing on the map Otherwise, the value does just replace the old value corresponding to the key.