util

package
v0.0.1-alpha.0...-ef4a7fd Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidResList = map[string]bool{
	"Pod":                   true,
	"Service":               true,
	"Ingress":               true,
	"ConfigMap":             true,
	"Secret":                true,
	"ReplicaSet":            true,
	"Deployment":            true,
	"PersistentVolumeClaim": true,
	"PersistentVolume":      true,
	"ServiceAccount":        true,
	"Job":                   true,
}

ValidResList contains a list of all the valid resources

Functions

func IsJSON

func IsJSON(s []byte) bool

IsJSON a function to validate the provided input is json

func IsYAML

func IsYAML(s []byte) bool

IsYAML a function to validate the provided input is json

Types

type ResInfo

type ResInfo struct {
	Name      string
	Kind      string
	Namespace string
}

ResInfo a struct that defines information about resources

func GetResDetails

func GetResDetails(s string) []ResInfo

GetResDetails returns information related to resources

Jump to

Keyboard shortcuts

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