resid

package
v2.0.3-fix+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 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 is an immutable identifier of a k8s 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 NewResIdWithPrefixNamespace

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

NewResIdWithPrefixNamespace creates new resource identifier with a prefix and a namespace

func NewResIdWithPrefixSuffix added in v1.0.11

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

NewResIdWithPrefixSuffix creates new resource identifier with a prefix and suffix

func NewResIdWithPrefixSuffixNamespace added in v1.0.11

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

NewResIdWithPrefixSuffixNamespace creates new resource identifier with a prefix, suffix and a namespace

func NewResIdWithSuffixNamespace added in v1.0.11

func NewResIdWithSuffixNamespace(k gvk.Gvk, n, s, ns string) ResId

NewResIdWithSuffixNamespace creates new resource identifier with a suffix 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) CopyWithNewPrefixSuffix added in v1.0.11

func (n ResId) CopyWithNewPrefixSuffix(p, s string) ResId

CopyWithNewPrefixSuffix make a new copy from current ResId and append a new prefix and suffix

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 returns true if the other id matches Group/Version/Kind/name.

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) HasSameRightmostSuffix added in v1.0.11

func (n ResId) HasSameRightmostSuffix(id ResId) bool

HasSameRightmostSuffix check if two ResIds have the same right most suffix.

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) NsGvknEquals

func (n ResId) NsGvknEquals(id ResId) bool

NsGvknEquals returns true if the other id matches namespace/Group/Version/Kind/name.

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