Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogDeleting = logDouble(
"Deleting %s...\n",
"Successfully deleted %s\n",
"Error deleting %s\n",
)
View Source
var LogLoading = logDouble(
"Loading %s...\n",
"Successfully loaded %s\n",
"Error loading %s\n",
)
Logs "loading xxx" when entering a function and returns a function that logs on exit Use defer to invoke the return value with the error result:
func LoadSomething(param int) (err error) { defer LogLoading("something(%d)", param)(err) }
Functions ¶
func SplitFileExtension ¶
func SplitGroupVersion ¶
Types ¶
type Context ¶
type Item ¶
type Item struct { f.BaseFile Resource *Resource Name string Extension string OriginalContents []byte }
func (*Item) ReadEntireContents ¶
type Kubernetes ¶
type Kubernetes struct { *Settings f.BaseDir Contexts map[string]*Context // contains filtered or unexported fields }
func (*Kubernetes) List ¶
func (k *Kubernetes) List() ([]string, error)
func (*Kubernetes) LoadConfig ¶
func (k *Kubernetes) LoadConfig(kubeconfig string) error
type NamespacedResource ¶
type NamespacedResource struct { f.BaseDir Context *Context ResourceType metav1.APIResource GVR schema.GroupVersionResource GVK schema.GroupVersionKind }
func (*NamespacedResource) List ¶
func (n *NamespacedResource) List() ([]string, error)
type Resource ¶
type Resource struct { f.BaseDir Context *Context ResourceType metav1.APIResource GVR schema.GroupVersionResource GVK schema.GroupVersionKind Namespace string }
Click to show internal directories.
Click to hide internal directories.