type Resource … var BuildAnnotations … func (r *Resource) ResetRNode(incoming *Resource) { … } func (r *Resource) GetGvk() resid.Gvk { … } func (r *Resource) Hash(h ifc.KustHasher) (string, error) { … } func (r *Resource) SetGvk(gvk resid.Gvk) { … } func (r *Resource) GetOrigin() (*Origin, error) { … } func (r *Resource) SetOrigin(origin *Origin) error { … } func (r *Resource) GetTransformations() (Transformations, error) { … } func (r *Resource) AddTransformation(origin *Origin) error { … } func (r *Resource) ClearTransformations() error { … } type ResCtx … type ResCtxMatcher … // DeepCopy returns a new copy of resource func (r *Resource) DeepCopy() *Resource { … } // CopyMergeMetaDataFieldsFrom copies everything but the non-metadata in // the resource. // TODO: move to RNode, use GetMeta to improve performance. // TODO: make a version of mergeStringMaps that is build-annotation aware // to avoid repeatedly setting refby and genargs annotations // Must remove the kustomize bit at the end. func (r *Resource) CopyMergeMetaDataFieldsFrom(other *Resource) error { … } func (r *Resource) copyKustomizeSpecificFields(other *Resource) { … } func (r *Resource) MergeDataMapFrom(o *Resource) { … } func (r *Resource) MergeBinaryDataMapFrom(o *Resource) { … } func (r *Resource) ErrIfNotEquals(o *Resource) error { … } func (r *Resource) ReferencesEqual(other *Resource) bool { … } func copyStringSlice(s []string) []string { … } // Implements ResCtx AddNamePrefix func (r *Resource) AddNamePrefix(p string) { … } // Implements ResCtx AddNameSuffix func (r *Resource) AddNameSuffix(s string) { … } func (r *Resource) appendCsvAnnotation(name, value string) { … } // Implements ResCtx GetNamePrefixes func (r *Resource) GetNamePrefixes() []string { … } // Implements ResCtx GetNameSuffixes func (r *Resource) GetNameSuffixes() []string { … } func (r *Resource) getCsvAnnotation(name string) []string { … } // PrefixesSuffixesEquals is conceptually doing the same task as // OutermostPrefixSuffix but performs a deeper comparison of the suffix and // prefix slices. // The allowEmpty flag determines whether an empty prefix/suffix // should be considered a match on anything. // This is used when filtering, starting with a coarser pass allowing empty // matches, before requiring exact matches if there are multiple // remaining candidates. func (r *Resource) PrefixesSuffixesEquals(o ResCtx, allowEmpty bool) bool { … } // RemoveBuildAnnotations removes annotations created by the build process. // These are internal-only to kustomize, added to the data pipeline to // track name changes so name references can be fixed. func (r *Resource) RemoveBuildAnnotations() { … } func (r *Resource) setPreviousId(ns string, n string, k string) *Resource { … } // AllowNameChange allows name changes to the resource. func (r *Resource) AllowNameChange() { … } // NameChangeAllowed checks if a patch resource is allowed to change another resource's name. func (r *Resource) NameChangeAllowed() bool { … } // AllowKindChange allows kind changes to the resource. func (r *Resource) AllowKindChange() { … } // KindChangeAllowed checks if a patch resource is allowed to change another resource's kind. func (r *Resource) KindChangeAllowed() bool { … } func (r *Resource) isEnabled(annoKey string) bool { … } func (r *Resource) enable(annoKey string) { … } // String returns resource as JSON. func (r *Resource) String() string { … } // AsYAML returns the resource in Yaml form. // Easier to read than JSON. func (r *Resource) AsYAML() ([]byte, error) { … } // MustYaml returns YAML or panics. func (r *Resource) MustYaml() string { … } // Behavior returns the behavior for the resource. func (r *Resource) Behavior() types.GenerationBehavior { … } // SetBehavior sets the behavior for the resource. func (r *Resource) SetBehavior(behavior types.GenerationBehavior) { … } // NeedHashSuffix returns true if a resource content // hash should be appended to the name of the resource. func (r *Resource) NeedHashSuffix() bool { … } // EnableHashSuffix marks the resource as needing a content // hash to be appended to the name of the resource. func (r *Resource) EnableHashSuffix() { … } // OrgId returns the original, immutable ResId for the resource. // This doesn't have to be unique in a ResMap. func (r *Resource) OrgId() resid.ResId { … } // PrevIds returns a list of ResIds that includes every // previous ResId the resource has had through all of its // GVKN transformations, in the order that it had that ID. // I.e. the oldest ID is first. // The returned array does not include the resource's current // ID. If there are no previous IDs, this will return nil. func (r *Resource) PrevIds() []resid.ResId { … } // StorePreviousId stores the resource's current ID via build annotations. func (r *Resource) StorePreviousId() { … } // CurId returns a ResId for the resource using the // mutable parts of the resource. // This should be unique in any ResMap. func (r *Resource) CurId() resid.ResId { … } // GetRefBy returns the ResIds that referred to current resource func (r *Resource) GetRefBy() []resid.ResId { … } // AppendRefBy appends a ResId into the refBy list // Using any type except fmt.Stringer here results in a compilation error func (r *Resource) AppendRefBy(id fmt.Stringer) { … } // GetRefVarNames returns vars that refer to current resource func (r *Resource) GetRefVarNames() []string { … } // AppendRefVarName appends a name of a var into the refVar list func (r *Resource) AppendRefVarName(variable types.Var) { … } // ApplySmPatch applies the provided strategic merge patch. func (r *Resource) ApplySmPatch(patch *Resource) error { … } func (r *Resource) ApplyFilter(f kio.Filter) error { … } func mergeStringMaps(maps ...map[string]string) map[string]string { … } func mergeStringMapsWithBuildAnnotations(maps ...map[string]string) map[string]string { … }