resid

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResId

type ResId struct {
	// contains filtered or unexported fields
}

ResId conflates GroupVersionKind with a textual name to uniquely identify a kubernetes resource (object).

func NewResId

func NewResId(k gvk.Gvk, n string) ResId

NewResId creates new resource identifier

func NewResIdKindOnly

func NewResIdKindOnly(k string, n string) ResId

NewResIdKindOnly creates new resource identifier

func NewResIdWithPrefix

func NewResIdWithPrefix(k gvk.Gvk, n, p string) ResId

NewResIdWithPrefix creates new resource identifier with a prefix

func NewResIdWithPrefixNamespace

func NewResIdWithPrefixNamespace(k gvk.Gvk, n, p, ns string) ResId

NewResIdWithPrefixNamespace creates new resource identifier with a prefix and a namespace

func (ResId) CopyWithNewNamespace

func (n ResId) CopyWithNewNamespace(ns string) ResId

CopyWithNewNamespace make a new copy from current ResId and set a new namespace

func (ResId) CopyWithNewPrefix

func (n ResId) CopyWithNewPrefix(p string) ResId

CopyWithNewPrefix make a new copy from current ResId and append a new prefix

func (ResId) Gvk

func (n ResId) Gvk() gvk.Gvk

Gvk returns Group/Version/Kind of the resource.

func (ResId) GvknEquals

func (n ResId) GvknEquals(id ResId) bool

GvknEquals return if two ResId have the same Group/Version/Kind and name The comparison excludes prefix

func (ResId) GvknString

func (n ResId) GvknString() string

GvknString of ResId based on GVK and name

func (ResId) HasSameLeftmostPrefix

func (n ResId) HasSameLeftmostPrefix(id ResId) bool

HasSameLeftmostPrefix check if two ResIds have the same left most prefix.

func (ResId) Name

func (n ResId) Name() string

Name returns resource name.

func (ResId) Namespace

func (n ResId) Namespace() string

Namespace returns resource namespace.

func (ResId) Prefix

func (n ResId) Prefix() string

Prefix returns name prefix.

func (ResId) String

func (n ResId) String() string

String of ResId based on GVK, name and prefix

Jump to

Keyboard shortcuts

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