Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjMetadata ¶
ObjMetadata organizes and stores the indentifying information for an object. This struct (as a string) is stored in a inventory object to keep track of sets of applied objects.
func CreateObjMetadata ¶
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 InfoToObjMeta ¶ added in v0.8.0
func InfoToObjMeta(info *resource.Info) ObjMetadata
InfoToObjMeta takes information from the provided info and returns an ObjMetadata that identifies the resource.
func InfosToObjMetas ¶ added in v0.8.0
func InfosToObjMetas(infos []*resource.Info) []ObjMetadata
infosToObjMetas takes a slice of infos and extract the GroupKind, name and namespace for each resource and returns it as a slice of ObjMetadata.
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) String ¶
func (o *ObjMetadata) String() string
String create a string version of the ObjMetadata struct.