tenant

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 (*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"`
}

func (*ResourceGroup) JsonPath

func (g *ResourceGroup) JsonPath(path string) (string, error)

type ResourceGroupList

type ResourceGroupList []ResourceGroup

func (ResourceGroupList) Resources

func (rgl ResourceGroupList) Resources() ResourceList

type ResourceList

type ResourceList []Resource

func (ResourceList) Find

func (rl ResourceList) Find(id string) (index int, existing *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 (*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 (*ValueResolver) Group

func (r *ValueResolver) Group(name string) (*ResourceGroup, error)

Group returns a resource group matching the specified name

Jump to

Keyboard shortcuts

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