aggregates

package
v0.5.0-dev18 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterAggregate

func NewClusterAggregate(aggregateManager es.AggregateStore) es.Aggregate

NewClusterAggregate creates a new ClusterAggregate

func NewTenantAggregate

func NewTenantAggregate(aggregateManager es.AggregateStore) es.Aggregate

NewTenantAggregate creates a new TenantAggregate

func NewTenantClusterBindingAggregate added in v0.3.0

func NewTenantClusterBindingAggregate(aggregateManager es.AggregateStore) es.Aggregate

NewTenantClusterBindingAggregate creates a new TenantClusterBindingAggregate

func NewUserAggregate

func NewUserAggregate(aggregateManager es.AggregateStore) es.Aggregate

NewUserAggregate creates a new UserAggregate

func NewUserRoleBindingAggregate

func NewUserRoleBindingAggregate(aggregateManager es.AggregateStore) es.Aggregate

NewUserRoleBindingAggregate creates a new UserRoleBindingAggregate

Types

type ClusterAggregate

type ClusterAggregate struct {
	*DomainAggregateBase
	// contains filtered or unexported fields
}

ClusterAggregate is an aggregate for K8s Clusters.

func (*ClusterAggregate) ApplyEvent

func (a *ClusterAggregate) ApplyEvent(event es.Event) error

ApplyEvent implements the ApplyEvent method of the Aggregate interface.

func (*ClusterAggregate) HandleCommand

func (a *ClusterAggregate) HandleCommand(ctx context.Context, cmd es.Command) (*es.CommandReply, error)

HandleCommand implements the HandleCommand method of the Aggregate interface.

type DomainAggregateBase

type DomainAggregateBase struct {
	*es.BaseAggregate
}

func (*DomainAggregateBase) DefaultReply added in v0.3.0

func (a *DomainAggregateBase) DefaultReply() *es.CommandReply

DefaultReply creates a default command reply containing the ID and current version of the aggregate.

func (*DomainAggregateBase) Validate

func (a *DomainAggregateBase) Validate(_ context.Context, _ es.Command) error

Validate validates if the aggregate exists and is not deleted

type TenantAggregate

type TenantAggregate struct {
	*DomainAggregateBase
	// contains filtered or unexported fields
}

TenantAggregate is an aggregate for Tenants.

func (*TenantAggregate) ApplyEvent

func (a *TenantAggregate) ApplyEvent(event es.Event) error

ApplyEvent implements the ApplyEvent method of the Aggregate interface.

func (*TenantAggregate) HandleCommand

func (a *TenantAggregate) HandleCommand(ctx context.Context, cmd es.Command) (*es.CommandReply, error)

HandleCommand implements the HandleCommand method of the Aggregate interface.

type TenantClusterBindingAggregate added in v0.3.0

type TenantClusterBindingAggregate struct {
	*DomainAggregateBase
	// contains filtered or unexported fields
}

TenantClusterBindingAggregate is an aggregate for TenantClusterBindings.

func (*TenantClusterBindingAggregate) ApplyEvent added in v0.3.0

func (a *TenantClusterBindingAggregate) ApplyEvent(event es.Event) error

ApplyEvent implements the ApplyEvent method of the Aggregate interface.

func (*TenantClusterBindingAggregate) HandleCommand added in v0.3.0

HandleCommand implements the HandleCommand method of the Aggregate interface.

type UserAggregate

type UserAggregate struct {
	*DomainAggregateBase

	Email string
	Name  string
	// contains filtered or unexported fields
}

UserAggregate is an aggregate for Users.

func (*UserAggregate) ApplyEvent

func (a *UserAggregate) ApplyEvent(event es.Event) error

ApplyEvent implements the ApplyEvent method of the Aggregate interface.

func (*UserAggregate) HandleCommand

func (a *UserAggregate) HandleCommand(ctx context.Context, cmd es.Command) (*es.CommandReply, error)

HandleCommand implements the HandleCommand method of the Aggregate interface.

type UserRoleBindingAggregate

type UserRoleBindingAggregate struct {
	*DomainAggregateBase
	// contains filtered or unexported fields
}

UserRoleBindingAggregate is an aggregate for UserRoleBindings.

func (*UserRoleBindingAggregate) ApplyEvent

func (a *UserRoleBindingAggregate) ApplyEvent(event es.Event) error

ApplyEvent implements the ApplyEvent method of the Aggregate interface.

func (*UserRoleBindingAggregate) HandleCommand

func (a *UserRoleBindingAggregate) HandleCommand(ctx context.Context, cmd es.Command) (*es.CommandReply, error)

HandleCommand implements the HandleCommand method of the Aggregate interface.

Jump to

Keyboard shortcuts

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