restrictions

package
v2.38.2-0...-94d1eb7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AggregateType    = "restrictions"
	AggregateVersion = "v1"
)
View Source
const (
	SetEventType = eventTypePrefix + "set"
)

Variables

Functions

This section is empty.

Types

type Aggregate

type Aggregate struct {
	eventstore.Aggregate
}

func NewAggregate

func NewAggregate(id, instanceId, resourceOwner string) *Aggregate

type RestrictionsChange

type RestrictionsChange func(*SetEvent)

func ChangeAllowedLanguages

func ChangeAllowedLanguages(allowedLanguages []language.Tag) RestrictionsChange

func ChangeDisallowPublicOrgRegistration

func ChangeDisallowPublicOrgRegistration(disallow bool) RestrictionsChange

type SetEvent

type SetEvent struct {
	*eventstore.BaseEvent         `json:"-"`
	DisallowPublicOrgRegistration *bool           `json:"disallowPublicOrgRegistration,omitempty"`
	AllowedLanguages              *[]language.Tag `json:"allowedLanguages,omitempty"`
}

SetEvent describes that restrictions are added or modified and contains only changed properties

func NewSetEvent

func NewSetEvent(
	base *eventstore.BaseEvent,
	changes ...RestrictionsChange,
) *SetEvent

func (*SetEvent) Payload

func (e *SetEvent) Payload() any

func (*SetEvent) SetBaseEvent

func (e *SetEvent) SetBaseEvent(b *eventstore.BaseEvent)

func (*SetEvent) UniqueConstraints

func (e *SetEvent) UniqueConstraints() []*eventstore.UniqueConstraint

Jump to

Keyboard shortcuts

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