member

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UniqueMember            = "member"
	AddedEventType          = "member.added"
	ChangedEventType        = "member.changed"
	RemovedEventType        = "member.removed"
	CascadeRemovedEventType = "member.cascade.removed"
)

Variables

This section is empty.

Functions

func CascadeRemovedEventMapper added in v1.12.2

func CascadeRemovedEventMapper(event *repository.Event) (eventstore.EventReader, error)

func ChangedEventMapper

func ChangedEventMapper(event *repository.Event) (eventstore.EventReader, error)

func MemberAddedEventMapper

func MemberAddedEventMapper(event *repository.Event) (eventstore.EventReader, error)

func NewAddMemberUniqueConstraint

func NewAddMemberUniqueConstraint(aggregateID, userID string) *eventstore.EventUniqueConstraint

func NewRemoveMemberUniqueConstraint

func NewRemoveMemberUniqueConstraint(aggregateID, userID string) *eventstore.EventUniqueConstraint

func RemovedEventMapper

func RemovedEventMapper(event *repository.Event) (eventstore.EventReader, error)

Types

type MemberAddedEvent

type MemberAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Roles  []string `json:"roles"`
	UserID string   `json:"userId"`
}

func NewMemberAddedEvent

func NewMemberAddedEvent(
	base *eventstore.BaseEvent,
	userID string,
	roles ...string,
) *MemberAddedEvent

func (*MemberAddedEvent) Data

func (e *MemberAddedEvent) Data() interface{}

func (*MemberAddedEvent) UniqueConstraints

func (e *MemberAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type MemberCascadeRemovedEvent added in v1.12.2

type MemberCascadeRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	UserID string `json:"userId"`
}

func NewCascadeRemovedEvent added in v1.12.2

func NewCascadeRemovedEvent(
	base *eventstore.BaseEvent,
	userID string,
) *MemberCascadeRemovedEvent

func (*MemberCascadeRemovedEvent) Data added in v1.12.2

func (e *MemberCascadeRemovedEvent) Data() interface{}

func (*MemberCascadeRemovedEvent) UniqueConstraints added in v1.12.2

type MemberChangedEvent

type MemberChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Roles  []string `json:"roles,omitempty"`
	UserID string   `json:"userId,omitempty"`
}

func NewMemberChangedEvent

func NewMemberChangedEvent(
	base *eventstore.BaseEvent,
	userID string,
	roles ...string,
) *MemberChangedEvent

func (*MemberChangedEvent) Data

func (e *MemberChangedEvent) Data() interface{}

func (*MemberChangedEvent) UniqueConstraints

func (e *MemberChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type MemberRemovedEvent

type MemberRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	UserID string `json:"userId"`
}

func NewRemovedEvent

func NewRemovedEvent(
	base *eventstore.BaseEvent,
	userID string,
) *MemberRemovedEvent

func (*MemberRemovedEvent) Data

func (e *MemberRemovedEvent) Data() interface{}

func (*MemberRemovedEvent) UniqueConstraints

func (e *MemberRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

Jump to

Keyboard shortcuts

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