Documentation ¶
Index ¶
- func Events() []eventsource.Event
- type AnnotationsChanged
- type BlueprintSet
- type EmbeddedResource
- type GenerateError
- type LabelsChanged
- type Resource
- type ResourceAdded
- type ResourceGenerationResult
- type ResourceGenerator
- type ResourceGeneratoreServices
- type ResourceGenererationFailed
- type ResourceGenererationSuccessful
- type ResourceGroup
- type ResourceGroupList
- type ResourceList
- type ResourceNamespaceNameChanged
- type ResourceRemoved
- type ResourceSetActivated
- type ResourceSetCreated
- type ResourceSetDeactivated
- type ResourceSetVersionChanged
- type ResourceUpdated
- type State
- type TenantAggregate
- func (a *TenantAggregate) Commit() eventsource.Commit
- func (a *TenantAggregate) Create(name string, namespace string)
- func (a *TenantAggregate) Delete()
- func (a *TenantAggregate) GenerateResources(g ResourceGenerator, t v1alpha1.Tenant, b v1alpha1.Blueprint) error
- func (a *TenantAggregate) Id() string
- func (a *TenantAggregate) SetBlueprint(tenant v1alpha1.Tenant, blueprint v1alpha1.Blueprint)
- func (a *TenantAggregate) SetFullName(name string)
- func (a *TenantAggregate) Version() int64
- type TenantCreated
- type TenantDeleted
- type TenantDisplayNameSetdeprecated
- type TenantFullNameSet
- type ValueResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Events ¶
func Events() []eventsource.Event
Types ¶
type AnnotationsChanged ¶
type AnnotationsChanged struct { eventsource.EventModel Annotations map[string]string `json:"annotations"` }
type BlueprintSet ¶
type BlueprintSet struct { eventsource.EventModel Name string `json:"name"` Namespace string `json:"namespace"` }
type EmbeddedResource ¶
type EmbeddedResource struct {
runtime.RawExtension `json:",inline"`
}
type GenerateError ¶
type GenerateError struct {
Errors []error
}
func (*GenerateError) Error ¶
func (e *GenerateError) Error() string
func (*GenerateError) ErrorMessages ¶ added in v0.2.1
func (e *GenerateError) ErrorMessages() []string
type LabelsChanged ¶
type LabelsChanged struct { eventsource.EventModel Labels map[string]string `json:"labels"` }
type Resource ¶
type Resource struct { Id string `json:"id"` Order int `json:"order"` Sum string `json:"sum"` Embedded EmbeddedResource `json:"embedded"` }
func (Resource) ResourceIdentifier ¶
func (r Resource) ResourceIdentifier() (common.ResourceIdentifier, error)
type ResourceAdded ¶
type ResourceAdded struct { eventsource.EventModel Resource Resource `json:"resource"` }
type ResourceGenerationResult ¶
type ResourceGenerationResult struct { ResourceGroups ResourceGroupList Sum string }
type ResourceGenerator ¶
type ResourceGenerator struct {
// contains filtered or unexported fields
}
func NewResourceGenerator ¶
func NewResourceGenerator(ctx reconcile.Context, services ResourceGeneratoreServices) ResourceGenerator
func (*ResourceGenerator) Generate ¶
func (r *ResourceGenerator) Generate(state State, blueprint corev1alpha1.Blueprint) (result ResourceGenerationResult, err error)
type ResourceGeneratoreServices ¶
type ResourceGeneratoreServices struct {
kubernetes.Client
}
type ResourceGenererationFailed ¶
type ResourceGenererationFailed struct { eventsource.EventModel Sum string `json:"sum"` }
type ResourceGenererationSuccessful ¶
type ResourceGenererationSuccessful struct { eventsource.EventModel Sum string `json:"sum"` }
type ResourceGroup ¶
type ResourceGroup struct { Name string `json:"name"` SourceTemplate string `json:"sourceTemplate"` Resources ResourceList `json:"resources"` }
type ResourceGroupList ¶
type ResourceGroupList []ResourceGroup
func (ResourceGroupList) Resources ¶
func (rgl ResourceGroupList) Resources() ResourceList
type ResourceList ¶
type ResourceList []Resource
func (ResourceList) Remove ¶
func (rl ResourceList) Remove(index int) ResourceList
type ResourceNamespaceNameChanged ¶
type ResourceNamespaceNameChanged struct { eventsource.EventModel Name string `json:"name"` Namespace string `json:"namespace"` }
type ResourceRemoved ¶
type ResourceRemoved struct { eventsource.EventModel ResourceId string `json:"resourceId"` }
type ResourceSetActivated ¶
type ResourceSetActivated struct { eventsource.EventModel Name string `json:"name"` }
type ResourceSetCreated ¶
type ResourceSetCreated struct { eventsource.EventModel Name string `json:"name"` Namespace string `json:"namespace"` }
type ResourceSetDeactivated ¶
type ResourceSetDeactivated struct { eventsource.EventModel Name string `json:"name"` }
type ResourceSetVersionChanged ¶
type ResourceSetVersionChanged struct { eventsource.EventModel Version int `json:"version"` }
type ResourceUpdated ¶
type ResourceUpdated struct { eventsource.EventModel Resource Resource `json:"resource"` }
type State ¶
type State struct { TenantName string TenantNamespace string TenantFullName string BlueprintName string BlueprintNamespace string Labels map[string]string Annotations map[string]string TenantPrefixedName string TenantPrefixedNamespace string ResourceGenerationFailed bool ResourceGenerationSum string ResourceSetVersion int ResourceSetName string ResourceSetNamespace string Resources ResourceList ResourceSetActive map[string]bool Deleted bool }
func (*State) On ¶
func (s *State) On(e eventsource.Event)
type TenantAggregate ¶
type TenantAggregate struct {
// contains filtered or unexported fields
}
func NewTenant ¶
func NewTenant(id string) *TenantAggregate
func NewTenantFromEvents ¶
func NewTenantFromEvents(stream eventsource.Stream) *TenantAggregate
func (*TenantAggregate) Commit ¶
func (a *TenantAggregate) Commit() eventsource.Commit
func (*TenantAggregate) Create ¶
func (a *TenantAggregate) Create(name string, namespace string)
func (*TenantAggregate) Delete ¶
func (a *TenantAggregate) Delete()
func (*TenantAggregate) GenerateResources ¶
func (a *TenantAggregate) GenerateResources(g ResourceGenerator, t v1alpha1.Tenant, b v1alpha1.Blueprint) error
func (*TenantAggregate) Id ¶
func (a *TenantAggregate) Id() string
func (*TenantAggregate) SetBlueprint ¶
func (a *TenantAggregate) SetBlueprint(tenant v1alpha1.Tenant, blueprint v1alpha1.Blueprint)
func (*TenantAggregate) SetFullName ¶ added in v0.2.0
func (a *TenantAggregate) SetFullName(name string)
func (*TenantAggregate) Version ¶
func (a *TenantAggregate) Version() int64
type TenantCreated ¶
type TenantCreated struct { eventsource.EventModel // Name is the name of the Tenant. Name string `json:"name"` // Namespace is the namespace where the Tenant was created. Namespace string `json:"namespace"` }
type TenantDeleted ¶
type TenantDeleted struct {
eventsource.EventModel
}
type TenantDisplayNameSet
deprecated
type TenantDisplayNameSet struct { eventsource.EventModel Name string `json:"name"` }
TenantDisplayNameSet represents the full name of a tenant
Deprecated: Use TenantFullNameSet instead
type TenantFullNameSet ¶ added in v0.2.0
type TenantFullNameSet struct { eventsource.EventModel Name string `json:"name"` }
TenantFullNameSet represents the full name of a tenant
type ValueResolver ¶
type ValueResolver struct { TenantName string TenantNamespace string OperatorNamespace string ResourceGroups []ResourceGroup Client kubernetes.Client Context reconcile.Context }
func (ValueResolver) Func ¶
func (r ValueResolver) Func(vr corev1alpha1.ValueRef) (string, error)
func (*ValueResolver) Group ¶
func (r *ValueResolver) Group(name string) (*ResourceGroup, error)
Group returns a resource group matching the specified name
Click to show internal directories.
Click to hide internal directories.