Documentation ¶
Index ¶
- Variables
- func FromComponent(component common.ApplicationComponent) (Component, error)
- func FromK8sObject(app v1beta1.Application) (TypedApplication, error)
- func FromPolicy(policy v1beta1.AppPolicy) (Policy, error)
- func FromTrait(trait common.ApplicationTrait) (Trait, error)
- func FromWorkflowStep(step v1beta1.WorkflowStep) (WorkflowStep, error)
- func New() TypedApplication
- func RegisterComponent(_type string, c ComponentConstructor)
- func RegisterPolicy(_type string, c PolicyConstructor)
- func RegisterTrait(_type string, c TraitConstructor)
- func RegisterWorkflowStep(_type string, c WorkflowStepConstructor)
- func RegisterWorkflowSubStep(_type string, c WorkflowSubStepConstructor)
- type ApplicationBuilder
- func (a *ApplicationBuilder) Annotations(annotations map[string]string) TypedApplication
- func (a *ApplicationBuilder) Build() v1beta1.Application
- func (a *ApplicationBuilder) GetAnnotations() map[string]string
- func (a *ApplicationBuilder) GetComponentByName(name string) Component
- func (a *ApplicationBuilder) GetComponentsByType(typ string) []Component
- func (a *ApplicationBuilder) GetLabels() map[string]string
- func (a *ApplicationBuilder) GetName() string
- func (a *ApplicationBuilder) GetNamespace() string
- func (a *ApplicationBuilder) GetPoliciesByType(typ string) []Policy
- func (a *ApplicationBuilder) GetPolicyByName(name string) Policy
- func (a *ApplicationBuilder) GetWorkflowStepByName(name string) WorkflowStep
- func (a *ApplicationBuilder) GetWorkflowStepsByType(typ string) []WorkflowStep
- func (a *ApplicationBuilder) Labels(labels map[string]string) TypedApplication
- func (a *ApplicationBuilder) Name(name string) TypedApplication
- func (a *ApplicationBuilder) Namespace(namespace string) TypedApplication
- func (a *ApplicationBuilder) SetComponents(components ...Component) TypedApplication
- func (a *ApplicationBuilder) SetPolicies(policies ...Policy) TypedApplication
- func (a *ApplicationBuilder) SetWorkflowMode(steps, subSteps common.WorkflowMode) TypedApplication
- func (a *ApplicationBuilder) SetWorkflowSteps(steps ...WorkflowStep) TypedApplication
- func (a *ApplicationBuilder) ToJSON() (string, error)
- func (a *ApplicationBuilder) ToYAML() (string, error)
- func (a *ApplicationBuilder) Validate() error
- type ComponentConstructor
- type PolicyConstructor
- type TraitConstructor
- type WorkflowStepConstructor
- type WorkflowSubStepConstructor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ComponentsBuilders = make(map[string]ComponentConstructor, 0) WorkflowStepsBuilders = make(map[string]WorkflowStepConstructor, 0) WorkflowSubStepsBuilders = make(map[string]WorkflowSubStepConstructor, 0) PoliciesBuilders = make(map[string]PolicyConstructor, 0) TraitBuilders = make(map[string]TraitConstructor, 0) )
Functions ¶
func FromComponent ¶
func FromComponent(component common.ApplicationComponent) (Component, error)
func FromK8sObject ¶
func FromK8sObject(app v1beta1.Application) (TypedApplication, error)
func FromPolicy ¶
func FromTrait ¶
func FromTrait(trait common.ApplicationTrait) (Trait, error)
func FromWorkflowStep ¶
func FromWorkflowStep(step v1beta1.WorkflowStep) (WorkflowStep, error)
func RegisterComponent ¶
func RegisterComponent(_type string, c ComponentConstructor)
func RegisterPolicy ¶
func RegisterPolicy(_type string, c PolicyConstructor)
func RegisterTrait ¶
func RegisterTrait(_type string, c TraitConstructor)
func RegisterWorkflowStep ¶
func RegisterWorkflowStep(_type string, c WorkflowStepConstructor)
func RegisterWorkflowSubStep ¶
func RegisterWorkflowSubStep(_type string, c WorkflowSubStepConstructor)
Types ¶
type ApplicationBuilder ¶
type ApplicationBuilder struct {
// contains filtered or unexported fields
}
func (*ApplicationBuilder) Annotations ¶
func (a *ApplicationBuilder) Annotations(annotations map[string]string) TypedApplication
func (*ApplicationBuilder) Build ¶
func (a *ApplicationBuilder) Build() v1beta1.Application
func (*ApplicationBuilder) GetAnnotations ¶
func (a *ApplicationBuilder) GetAnnotations() map[string]string
func (*ApplicationBuilder) GetComponentByName ¶
func (a *ApplicationBuilder) GetComponentByName(name string) Component
func (*ApplicationBuilder) GetComponentsByType ¶
func (a *ApplicationBuilder) GetComponentsByType(typ string) []Component
func (*ApplicationBuilder) GetLabels ¶
func (a *ApplicationBuilder) GetLabels() map[string]string
func (*ApplicationBuilder) GetName ¶
func (a *ApplicationBuilder) GetName() string
func (*ApplicationBuilder) GetNamespace ¶
func (a *ApplicationBuilder) GetNamespace() string
func (*ApplicationBuilder) GetPoliciesByType ¶
func (a *ApplicationBuilder) GetPoliciesByType(typ string) []Policy
func (*ApplicationBuilder) GetPolicyByName ¶
func (a *ApplicationBuilder) GetPolicyByName(name string) Policy
func (*ApplicationBuilder) GetWorkflowStepByName ¶
func (a *ApplicationBuilder) GetWorkflowStepByName(name string) WorkflowStep
func (*ApplicationBuilder) GetWorkflowStepsByType ¶
func (a *ApplicationBuilder) GetWorkflowStepsByType(typ string) []WorkflowStep
func (*ApplicationBuilder) Labels ¶
func (a *ApplicationBuilder) Labels(labels map[string]string) TypedApplication
func (*ApplicationBuilder) Name ¶
func (a *ApplicationBuilder) Name(name string) TypedApplication
func (*ApplicationBuilder) Namespace ¶
func (a *ApplicationBuilder) Namespace(namespace string) TypedApplication
func (*ApplicationBuilder) SetComponents ¶
func (a *ApplicationBuilder) SetComponents(components ...Component) TypedApplication
SetComponents set components to application, use component name to match, if component name not found, append it
func (*ApplicationBuilder) SetPolicies ¶
func (a *ApplicationBuilder) SetPolicies(policies ...Policy) TypedApplication
SetPolicies set policies to application, use policy name to match, if policy name not found, append it
func (*ApplicationBuilder) SetWorkflowMode ¶
func (a *ApplicationBuilder) SetWorkflowMode(steps, subSteps common.WorkflowMode) TypedApplication
SetWorkflowMode set the workflow mode of application
func (*ApplicationBuilder) SetWorkflowSteps ¶
func (a *ApplicationBuilder) SetWorkflowSteps(steps ...WorkflowStep) TypedApplication
SetWorkflowSteps set workflow steps to application, use step name to match, if step name not found, append it
func (*ApplicationBuilder) ToJSON ¶
func (a *ApplicationBuilder) ToJSON() (string, error)
func (*ApplicationBuilder) ToYAML ¶
func (a *ApplicationBuilder) ToYAML() (string, error)
func (*ApplicationBuilder) Validate ¶
func (a *ApplicationBuilder) Validate() error
Validate validates the application name/namespace/component/step/policy. For component/step/policy, it will validate if the required fields are set.
type ComponentConstructor ¶
type ComponentConstructor func(comp common.ApplicationComponent) (apis.Component, error)
type TraitConstructor ¶
type TraitConstructor func(trait common.ApplicationTrait) (apis.Trait, error)
type WorkflowStepConstructor ¶
type WorkflowStepConstructor func(step v1beta1.WorkflowStep) (apis.WorkflowStep, error)
type WorkflowSubStepConstructor ¶
type WorkflowSubStepConstructor func(step common.WorkflowSubStep) (apis.WorkflowStep, error)
Click to show internal directories.
Click to hide internal directories.