mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Hide unstructured.Unstructured behind interface.
This commit is contained in:
@@ -17,6 +17,8 @@ limitations under the License.
|
||||
// Package ifc holds miscellaneous interfaces used by kustomize.
|
||||
package ifc
|
||||
|
||||
import "sigs.k8s.io/kustomize/pkg/gvk"
|
||||
|
||||
// Decoder unmarshalls byte input into an object.
|
||||
type Decoder interface {
|
||||
// SetInput accepts new input.
|
||||
@@ -48,3 +50,22 @@ type Loader interface {
|
||||
type Hash interface {
|
||||
Hash(m map[string]interface{}) (string, error)
|
||||
}
|
||||
|
||||
// Kunstructured allows manipulation of k8s objects
|
||||
// that do not have Golang structs.
|
||||
type Kunstructured interface {
|
||||
Map() map[string]interface{}
|
||||
SetMap(map[string]interface{})
|
||||
Copy() Kunstructured
|
||||
GetFieldValue(string) (string, error)
|
||||
MarshalJSON() ([]byte, error)
|
||||
UnmarshalJSON([]byte) error
|
||||
GetGvk() gvk.Gvk
|
||||
GetKind() string
|
||||
GetName() string
|
||||
SetName(string)
|
||||
GetLabels() map[string]string
|
||||
SetLabels(map[string]string)
|
||||
GetAnnotations() map[string]string
|
||||
SetAnnotations(map[string]string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user