aggregate

package
v0.0.0-...-e64b967 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrganizationAggregateType eventstore.AggregateType = "organization"
)

Variables

This section is empty.

Functions

func GetOrganizationObjectID

func GetOrganizationObjectID(aggregateID string, tenant string) string

Types

type OrganizationAggregate

type OrganizationAggregate struct {
	*aggregate.CommonTenantIdAggregate
	Organization *model.Organization
}

func LoadOrganizationAggregate

func LoadOrganizationAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string, opts eventstore.LoadAggregateOptions) (*OrganizationAggregate, error)

func NewOrganizationAggregateWithTenantAndID

func NewOrganizationAggregateWithTenantAndID(tenant, id string) *OrganizationAggregate

func (*OrganizationAggregate) CreateBillingProfile

func (a *OrganizationAggregate) CreateBillingProfile(ctx context.Context, request *organizationpb.CreateBillingProfileGrpcRequest) (billingProfileId string, err error)

func (*OrganizationAggregate) CreateOrganization

func (a *OrganizationAggregate) CreateOrganization(ctx context.Context, organizationFields *model.OrganizationFields, userId string) error

func (*OrganizationAggregate) HandleCommand

func (a *OrganizationAggregate) HandleCommand(ctx context.Context, cmd eventstore.Command) error

func (*OrganizationAggregate) HandleRequest

func (a *OrganizationAggregate) HandleRequest(ctx context.Context, request any) (any, error)

func (*OrganizationAggregate) LinkEmailToBillingProfile

func (*OrganizationAggregate) LinkLocationToBillingProfile

func (*OrganizationAggregate) SetEmailNonPrimary

func (a *OrganizationAggregate) SetEmailNonPrimary(ctx context.Context, emailId, userId string) error

func (*OrganizationAggregate) SetPhoneNumberNonPrimary

func (a *OrganizationAggregate) SetPhoneNumberNonPrimary(ctx context.Context, tenant, phoneNumberId, userId string) error

func (*OrganizationAggregate) UnlinkEmailFromBillingProfile

func (*OrganizationAggregate) UnlinkLocationFromBillingProfile

func (a *OrganizationAggregate) UnlinkLocationFromBillingProfile(ctx context.Context, request *organizationpb.UnlinkLocationFromBillingProfileGrpcRequest) error

func (*OrganizationAggregate) UpdateBillingProfile

func (*OrganizationAggregate) UpdateOrganization

func (a *OrganizationAggregate) UpdateOrganization(ctx context.Context, organizationFields *model.OrganizationFields, loggedInUserId, webScrapedUrl string, fieldsMask []string) error

func (*OrganizationAggregate) UpdateOrganizationOwner

func (a *OrganizationAggregate) UpdateOrganizationOwner(ctx context.Context, cmd *command.UpdateOrganizationOwnerCommand) error

func (*OrganizationAggregate) When

type OrganizationTempAggregate

type OrganizationTempAggregate struct {
	*aggregate.CommonTenantIdTempAggregate
}

func LoadOrganizationTempAggregate

func LoadOrganizationTempAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string, opts eventstore.LoadAggregateOptions) (*OrganizationTempAggregate, error)

func NewOrganizationTempAggregateWithTenantAndID

func NewOrganizationTempAggregateWithTenantAndID(tenant, id string) *OrganizationTempAggregate

func (*OrganizationTempAggregate) HandleCommand

func (a *OrganizationTempAggregate) HandleCommand(ctx context.Context, cmd eventstore.Command) error

func (*OrganizationTempAggregate) HandleRequest

func (a *OrganizationTempAggregate) HandleRequest(ctx context.Context, request any) (any, error)

Jump to

Keyboard shortcuts

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