object

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 3 Imported by: 57

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjMetadata

type ObjMetadata struct {
	Namespace string
	Name      string
	GroupKind schema.GroupKind
}

ObjMetadata organizes and stores the indentifying information for an object. This struct (as a string) is stored in a grouping object to keep track of sets of applied objects.

func CreateObjMetadata

func CreateObjMetadata(namespace string, name string, gk schema.GroupKind) (*ObjMetadata, error)

CreateObjMetadata returns a pointer to an ObjMetadata struct filled with the passed values. This function normalizes and validates the passed fields and returns an error for bad parameters.

func ParseObjMetadata

func ParseObjMetadata(inv string) (*ObjMetadata, error)

ParseObjMetadata takes a string, splits it into its five fields, and returns a pointer to an ObjMetadata struct storing the five fields. Example inventory string:

test-namespace_test-name_apps_ReplicaSet

Returns an error if unable to parse and create the ObjMetadata struct.

func (*ObjMetadata) Equals

func (o *ObjMetadata) Equals(other *ObjMetadata) bool

Equals compares two ObjMetadata and returns true if they are equal. This does not contain any special treatment for the extensions API group.

func (*ObjMetadata) EqualsWithNormalize

func (o *ObjMetadata) EqualsWithNormalize(other *ObjMetadata) bool

EqualsWithNormalize returns true if the ObjMetadata structs are identical; false otherwise. This will take into account normalizing resources in the extensions group.

func (*ObjMetadata) String

func (o *ObjMetadata) String() string

String create a string version of the ObjMetadata struct.

Jump to

Keyboard shortcuts

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