Documentation
¶
Index ¶
- func DeleteResources(file string, clt client.Client) (err error)
- func LoadKubeResources(file string, clt client.Client) (err error)
- func LoadKubeResourcesAsUnstructured(file string) (objs []unstructured.Unstructured, err error)
- func LoadObjectOrDie(g *WithT, file string, obj metav1.Object, patches ...func(metav1.Object)) metav1.Object
- func LoadObjectReferenceOrDie(g *WithT, file string, obj *corev1.ObjectReference, ...) *corev1.ObjectReference
- func LoadResourceFromFile(scheme *runtime.Scheme, path string) (obj runtime.Object, err error)
- func LoadResourcesFromFile(scheme *runtime.Scheme, path string) (objs []runtime.Object, err error)
- func LoadYAML(file string, obj interface{}) (err error)
- func RuntimeObjectFromUnstructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)
- func SetName(name string) func(metav1.Object)
- func UnstructedToTyped(from unstructured.Unstructured, to interface{}) error
- func WarningOnError(logger *zap.SugaredLogger, err error, message string)
- type ConditionBuilder
- func (c *ConditionBuilder) Done() *apis.Condition
- func (c *ConditionBuilder) SetReasonMessage(reason, message string, formtKeyValues ...interface{}) *ConditionBuilder
- func (c *ConditionBuilder) SetStatus(stat corev1.ConditionStatus) *ConditionBuilder
- func (c *ConditionBuilder) SetType(ct apis.ConditionType) *ConditionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteResources ¶
DeleteResources delete resources contained in the file
func LoadKubeResources ¶
LoadKubeResources loading kubernetes resources
func LoadKubeResourcesAsUnstructured ¶
func LoadKubeResourcesAsUnstructured(file string) (objs []unstructured.Unstructured, err error)
func LoadObjectOrDie ¶
func LoadObjectOrDie(g *WithT, file string, obj metav1.Object, patches ...func(metav1.Object)) metav1.Object
LoadObjectOrDie loads object from yaml and returns
func LoadObjectReferenceOrDie ¶
func LoadObjectReferenceOrDie(g *WithT, file string, obj *corev1.ObjectReference, patches ...func(*corev1.ObjectReference)) *corev1.ObjectReference
LoadObjectReferenceOrDie loads object reference from yaml and returns
func LoadResourceFromFile ¶
func LoadResourcesFromFile ¶
func RuntimeObjectFromUnstructured ¶
func RuntimeObjectFromUnstructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)
RuntimeObjectFromUnstructured converts an unstructured to a runtime object
func UnstructedToTyped ¶
func UnstructedToTyped(from unstructured.Unstructured, to interface{}) error
UnstructedToTyped converts an unstructured object into a object Warning: This SHOULD never be used in production code, only in test code
func WarningOnError ¶
func WarningOnError(logger *zap.SugaredLogger, err error, message string)
WarningOnError set a warning on error
Types ¶
type ConditionBuilder ¶
ConditionBuilder builds a conditions in a builder pattern
func BuildCondition ¶
func BuildCondition() *ConditionBuilder
BuildCondition starts a condition builder object useful for unit tests that require validating multiple conditions
func (*ConditionBuilder) Done ¶
func (c *ConditionBuilder) Done() *apis.Condition
SetReasonMessage returns a condition
func (*ConditionBuilder) SetReasonMessage ¶
func (c *ConditionBuilder) SetReasonMessage(reason, message string, formtKeyValues ...interface{}) *ConditionBuilder
SetReasonMessage sets the message for the condition
func (*ConditionBuilder) SetStatus ¶
func (c *ConditionBuilder) SetStatus(stat corev1.ConditionStatus) *ConditionBuilder
SetStatus sets the status for the condition
func (*ConditionBuilder) SetType ¶
func (c *ConditionBuilder) SetType(ct apis.ConditionType) *ConditionBuilder
SetType sets the type for the condition
Directories
¶
| Path | Synopsis |
|---|---|
|
mock
|
|
|
github.com/katanomi/pkg/apis/meta/v1alpha1
Package apis is a generated GoMock package.
|
Package apis is a generated GoMock package. |
|
github.com/katanomi/pkg/multicluster
Package multicluster is a generated GoMock package.
|
Package multicluster is a generated GoMock package. |
|
knative.dev/pkg/apis
Package apis is a generated GoMock package.
|
Package apis is a generated GoMock package. |
|
sigs.k8s.io/controller-runtime/pkg/manager
Package manager is a generated GoMock package.
|
Package manager is a generated GoMock package. |