Documentation
¶
Overview ¶
Package contract provides support for the ClusterReconciler to handle with providers objects according to the Cluster API contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFieldNotFound = errors.New("field not found")
ErrFieldNotFound is returned when a field is not found in the object.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
Bool represents an accessor to an bool path value.
func (*Bool) Get ¶
func (b *Bool) Get(obj *unstructured.Unstructured) (*bool, error)
Get gets the bool value.
func (*Bool) Set ¶
func (b *Bool) Set(obj *unstructured.Unstructured, value bool) error
Set sets the bool value in the path.
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
Duration represents an accessor to a metav1.Duration path value.
func (*Duration) Get ¶
func (i *Duration) Get(obj *unstructured.Unstructured) (*metav1.Duration, error)
Get gets the metav1.Duration value.
func (*Duration) Set ¶
func (i *Duration) Set(obj *unstructured.Unstructured, value metav1.Duration) error
Set sets the metav1.Duration value in the path.
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
Int32 represents an accessor to an int32 path value.
func (*Int32) Get ¶
func (i *Int32) Get(obj *unstructured.Unstructured) (*int32, error)
Get gets the int32 value. If more than one path is defined, path are checked in order and the first value reported is used (e.g. in case when we are reading from a preferred location first, and then from one or more fallback locations).
func (*Int32) Set ¶
func (i *Int32) Set(obj *unstructured.Unstructured, value int64) error
Set sets the int32 value in the path. If more than one path is defined, only the first path will be set. (the first path is considered the preferred location). Note: Cluster API should never Set values on external objects owner by providers; however this method is useful for writing tests.
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
Int64 represents an accessor to an int64 path value.
func (*Int64) Get ¶
func (i *Int64) Get(obj *unstructured.Unstructured) (*int64, error)
Get gets the int64 value.
func (*Int64) Set ¶
func (i *Int64) Set(obj *unstructured.Unstructured, value int64) error
Set sets the int64 value in the path.
type Path ¶
type Path []string
Path defines a how to access a field in an Unstructured object.
func (Path) IsParentOf ¶
IsParentOf check if one path is Parent of the other.
type String ¶
type String struct {
// contains filtered or unexported fields
}
String represents an accessor to a string path value.
func (*String) Get ¶
func (s *String) Get(obj *unstructured.Unstructured) (*string, error)
Get gets the string value.
func (*String) Set ¶
func (s *String) Set(obj *unstructured.Unstructured, value string) error
Set sets the string value in the path.