builder

package
v0.0.0-...-67aceb4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentDescriptorFactoryFromSchema

func ComponentDescriptorFactoryFromSchema(schemaVersion compdesc.SchemaVersion) machineryruntime.RawExtension

func ReadComponentDescriptorFromFile

func ReadComponentDescriptorFromFile(template string, moduleTemplate *v1beta2.ModuleTemplate)

Types

type CRDBuilder

type CRDBuilder struct {
	// contains filtered or unexported fields
}

func NewCRDBuilder

func NewCRDBuilder() CRDBuilder

NewCRDBuilder returns a CRDBuilder for CustomResourceDefinitions of Group operator.kyma-project.io initialized with a random name.

func (CRDBuilder) Build

Build returns the apiextensions.CustomResourceDefinition from the Builder.

func (CRDBuilder) WithName

func (cb CRDBuilder) WithName(name string) CRDBuilder

WithName sets ObjectMeta.Name and all apiextensions.CustomResourceDefinitionNames.

type KymaBuilder

type KymaBuilder struct {
	// contains filtered or unexported fields
}

func NewKymaBuilder

func NewKymaBuilder() KymaBuilder

NewKymaBuilder returns a KymaBuilder with v1beta2.Kyma initialized defaults.

func (KymaBuilder) Build

func (kb KymaBuilder) Build() *v1beta2.Kyma

Build returns the built v1beta2.Kyma.

func (KymaBuilder) WithAnnotation

func (kb KymaBuilder) WithAnnotation(key string, value string) KymaBuilder

WithAnnotation adds an annotation to v1beta2.Kyma.ObjectMeta.Annotation.

func (KymaBuilder) WithBeta

func (kb KymaBuilder) WithBeta(beta bool) KymaBuilder

WithBeta sets v1beta2.Kyma.Labels[shared.BetaLabel].

func (KymaBuilder) WithChannel

func (kb KymaBuilder) WithChannel(channel string) KymaBuilder

WithChannel sets v1beta2.Kyma.Spec.Channel.

func (KymaBuilder) WithCondition

func (kb KymaBuilder) WithCondition(condition apimetav1.Condition) KymaBuilder

WithCondition adds a Condition to v1beta2.Kyma.Status.Conditions.

func (KymaBuilder) WithEnabledModule

func (kb KymaBuilder) WithEnabledModule(module v1beta2.Module) KymaBuilder

WithEnabledModule append module to v1beta2.Kyma.Spec.Modules.

func (KymaBuilder) WithInternal

func (kb KymaBuilder) WithInternal(internal bool) KymaBuilder

WithInternal sets v1beta2.Kyma.Labels[shared.InternalLabel].

func (KymaBuilder) WithLabel

func (kb KymaBuilder) WithLabel(key string, value string) KymaBuilder

WithLabel adds a label to v1beta2.Kyma.ObjectMeta.Labels.

func (KymaBuilder) WithModuleStatus

func (kb KymaBuilder) WithModuleStatus(moduleStatus v1beta2.ModuleStatus) KymaBuilder

WithCondition adds a ModuleStatus to v1beta2.Kyma.Status.Modules.

func (KymaBuilder) WithName

func (kb KymaBuilder) WithName(name string) KymaBuilder

WithName sets v1beta2.Kyma.ObjectMeta.Name.

func (KymaBuilder) WithNamePrefix

func (kb KymaBuilder) WithNamePrefix(prefix string) KymaBuilder

WithNamePrefix sets v1beta2.Kyma.ObjectMeta.Name.

func (KymaBuilder) WithNamespace

func (kb KymaBuilder) WithNamespace(namespace string) KymaBuilder

WithNamespace sets v1beta2.Kyma.ObjectMeta.Namespace.

type ManifestBuilder

type ManifestBuilder struct {
	// contains filtered or unexported fields
}

func NewManifestBuilder

func NewManifestBuilder() ManifestBuilder

NewManifestBuilder returns a ManifestBuilder with v1beta2.Manifest initialized defaults.

func (ManifestBuilder) Build

func (mb ManifestBuilder) Build() *v1beta2.Manifest

Build returns the built v1beta2.Manifest.

func (ManifestBuilder) IsMandatoryModule

func (mb ManifestBuilder) IsMandatoryModule() ManifestBuilder

func (ManifestBuilder) WithAnnotation

func (mb ManifestBuilder) WithAnnotation(key string, value string) ManifestBuilder

WithAnnotation adds an annotation to v1beta2.Manifest.ObjectMeta.Annotation.

func (ManifestBuilder) WithChannel

func (mb ManifestBuilder) WithChannel(channel string) ManifestBuilder

func (ManifestBuilder) WithFinalizers

func (mb ManifestBuilder) WithFinalizers(finalizers []string) ManifestBuilder

WithFinalizers sets v1beta2.Manifest.Finalizers.

func (ManifestBuilder) WithLabel

func (mb ManifestBuilder) WithLabel(key string, value string) ManifestBuilder

WithLabel adds a label to v1beta2.Manifest.ObjectMeta.Labels.

func (ManifestBuilder) WithName

func (mb ManifestBuilder) WithName(name string) ManifestBuilder

WithName sets v1beta2.Manifest.ObjectMeta.Name.

func (ManifestBuilder) WithNamespace

func (mb ManifestBuilder) WithNamespace(namespace string) ManifestBuilder

WithNamespace sets v1beta2.Manifest.ObjectMeta.Namespace.

func (ManifestBuilder) WithSpec

WithSpec sets v1beta2.Manifest.Spec.

func (ManifestBuilder) WithStatus

func (mb ManifestBuilder) WithStatus(status shared.Status) ManifestBuilder

WithStatus sets v1beta2.Manifest.Status.

func (ManifestBuilder) WithVersion

func (mb ManifestBuilder) WithVersion(version string) ManifestBuilder

type ModuleCRBuilder

type ModuleCRBuilder struct {
	// contains filtered or unexported fields
}

func NewModuleCRBuilder

func NewModuleCRBuilder() ModuleCRBuilder

func (ModuleCRBuilder) Build

func (ModuleCRBuilder) WithGroupVersionKind

func (cr ModuleCRBuilder) WithGroupVersionKind(group, version, kind string) ModuleCRBuilder

func (ModuleCRBuilder) WithName

func (cr ModuleCRBuilder) WithName(name string) ModuleCRBuilder

func (ModuleCRBuilder) WithNamespace

func (cr ModuleCRBuilder) WithNamespace(namespace string) ModuleCRBuilder

func (ModuleCRBuilder) WithSpec

func (cr ModuleCRBuilder) WithSpec(key, value string) ModuleCRBuilder

type ModuleReleaseMetaBuilder

type ModuleReleaseMetaBuilder struct {
	// contains filtered or unexported fields
}

func NewModuleReleaseMetaBuilder

func NewModuleReleaseMetaBuilder() ModuleReleaseMetaBuilder

func (ModuleReleaseMetaBuilder) Build

func (ModuleReleaseMetaBuilder) WithBeta

func (ModuleReleaseMetaBuilder) WithInternal

func (m ModuleReleaseMetaBuilder) WithInternal(internal bool) ModuleReleaseMetaBuilder

func (ModuleReleaseMetaBuilder) WithModuleChannelAndVersions

func (m ModuleReleaseMetaBuilder) WithModuleChannelAndVersions(channelVersions []v1beta2.ChannelVersionAssignment) ModuleReleaseMetaBuilder

func (ModuleReleaseMetaBuilder) WithModuleName

func (m ModuleReleaseMetaBuilder) WithModuleName(moduleName string) ModuleReleaseMetaBuilder

func (ModuleReleaseMetaBuilder) WithName

func (ModuleReleaseMetaBuilder) WithNamespace

func (m ModuleReleaseMetaBuilder) WithNamespace(namespace string) ModuleReleaseMetaBuilder

func (ModuleReleaseMetaBuilder) WithSingleModuleChannelAndVersions

func (m ModuleReleaseMetaBuilder) WithSingleModuleChannelAndVersions(channel, version string) ModuleReleaseMetaBuilder

type ModuleTemplateBuilder

type ModuleTemplateBuilder struct {
	// contains filtered or unexported fields
}

func NewModuleTemplateBuilder

func NewModuleTemplateBuilder() ModuleTemplateBuilder

func (ModuleTemplateBuilder) Build

func (ModuleTemplateBuilder) WithAnnotation

func (m ModuleTemplateBuilder) WithAnnotation(key string, value string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithChannel

func (m ModuleTemplateBuilder) WithChannel(channel string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithDescriptor

func (m ModuleTemplateBuilder) WithDescriptor(descriptor *types.Descriptor) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithGeneration

func (m ModuleTemplateBuilder) WithGeneration(generation int) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithLabel

func (m ModuleTemplateBuilder) WithLabel(key string, value string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithLabelModuleName

func (m ModuleTemplateBuilder) WithLabelModuleName(moduleName string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithMandatory

func (m ModuleTemplateBuilder) WithMandatory(mandatory bool) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithModuleCR

func (ModuleTemplateBuilder) WithModuleName

func (m ModuleTemplateBuilder) WithModuleName(moduleName string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithName

func (ModuleTemplateBuilder) WithNamespace

func (m ModuleTemplateBuilder) WithNamespace(namespace string) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithOCM

func (ModuleTemplateBuilder) WithOCMPrivateRepo

func (m ModuleTemplateBuilder) WithOCMPrivateRepo() ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithRawDescriptor

func (m ModuleTemplateBuilder) WithRawDescriptor(rawDescriptor []byte) ModuleTemplateBuilder

func (ModuleTemplateBuilder) WithVersion

func (m ModuleTemplateBuilder) WithVersion(version string) ModuleTemplateBuilder

type WatcherBuilder

type WatcherBuilder struct {
	// contains filtered or unexported fields
}

func NewWatcherBuilder

func NewWatcherBuilder() *WatcherBuilder

func (*WatcherBuilder) Build

func (builder *WatcherBuilder) Build() *v1beta2.Watcher

func (*WatcherBuilder) WithAPIVersion

func (builder *WatcherBuilder) WithAPIVersion(apiVersion string) *WatcherBuilder

func (*WatcherBuilder) WithKind

func (builder *WatcherBuilder) WithKind(kind string) *WatcherBuilder

func (*WatcherBuilder) WithManager

func (builder *WatcherBuilder) WithManager(manager string) *WatcherBuilder

func (*WatcherBuilder) WithName

func (builder *WatcherBuilder) WithName(name string) *WatcherBuilder

func (*WatcherBuilder) WithNamespace

func (builder *WatcherBuilder) WithNamespace(namespace string) *WatcherBuilder

func (*WatcherBuilder) WithServiceInfoName

func (builder *WatcherBuilder) WithServiceInfoName(name string) *WatcherBuilder

func (*WatcherBuilder) WithServiceInfoNamespace

func (builder *WatcherBuilder) WithServiceInfoNamespace(namespace string) *WatcherBuilder

func (*WatcherBuilder) WithServiceInfoPort

func (builder *WatcherBuilder) WithServiceInfoPort(port int64) *WatcherBuilder

func (*WatcherBuilder) WithUID

func (builder *WatcherBuilder) WithUID(uid types.UID) *WatcherBuilder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL