usergrant

package
v1.85.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AggregateType    = "usergrant"
	AggregateVersion = "v1"
)
View Source
const (
	UniqueUserGrant = "user_grant"

	UserGrantAddedType          = userGrantEventTypePrefix + "added"
	UserGrantChangedType        = userGrantEventTypePrefix + "changed"
	UserGrantCascadeChangedType = userGrantEventTypePrefix + "cascade.changed"
	UserGrantRemovedType        = userGrantEventTypePrefix + "removed"
	UserGrantCascadeRemovedType = userGrantEventTypePrefix + "cascade.removed"
	UserGrantDeactivatedType    = userGrantEventTypePrefix + "deactivated"
	UserGrantReactivatedType    = userGrantEventTypePrefix + "reactivated"
)

Variables

This section is empty.

Functions

func NewAddUserGrantUniqueConstraint

func NewAddUserGrantUniqueConstraint(resourceOwner, userID, projectID, projectGrantID string) *eventstore.EventUniqueConstraint

func NewRemoveUserGrantUniqueConstraint

func NewRemoveUserGrantUniqueConstraint(resourceOwner, userID, projectID, projectGrantID string) *eventstore.EventUniqueConstraint

func RegisterEventMappers

func RegisterEventMappers(es *eventstore.Eventstore)

func UserGrantAddedEventMapper

func UserGrantAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantCascadeChangedEventMapper

func UserGrantCascadeChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantCascadeRemovedEventMapper

func UserGrantCascadeRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantChangedEventMapper

func UserGrantChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantDeactivatedEventMapper

func UserGrantDeactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantReactivatedEventMapper

func UserGrantReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func UserGrantRemovedEventMapper

func UserGrantRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

Types

type Aggregate

type Aggregate struct {
	eventstore.Aggregate
}

func NewAggregate

func NewAggregate(id, resourceOwner string) *Aggregate

type UserGrantAddedEvent

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

	UserID         string   `json:"userId,omitempty"`
	ProjectID      string   `json:"projectId,omitempty"`
	ProjectGrantID string   `json:"grantId,omitempty"`
	RoleKeys       []string `json:"roleKeys,omitempty"`
}

func NewUserGrantAddedEvent

func NewUserGrantAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	projectID,
	projectGrantID string,
	roleKeys []string) *UserGrantAddedEvent

func (*UserGrantAddedEvent) Data

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

func (*UserGrantAddedEvent) UniqueConstraints

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

type UserGrantCascadeChangedEvent

type UserGrantCascadeChangedEvent struct {
	eventstore.BaseEvent `json:"-"`
	RoleKeys             []string `json:"roleKeys,omitempty"`
}

func NewUserGrantCascadeChangedEvent

func NewUserGrantCascadeChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	roleKeys []string) *UserGrantCascadeChangedEvent

func (*UserGrantCascadeChangedEvent) Data

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

func (*UserGrantCascadeChangedEvent) UniqueConstraints

type UserGrantCascadeRemovedEvent

type UserGrantCascadeRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`
	// contains filtered or unexported fields
}

func NewUserGrantCascadeRemovedEvent

func NewUserGrantCascadeRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	projectID,
	projectGrantID string,
) *UserGrantCascadeRemovedEvent

func (*UserGrantCascadeRemovedEvent) Data

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

func (*UserGrantCascadeRemovedEvent) UniqueConstraints

type UserGrantChangedEvent

type UserGrantChangedEvent struct {
	eventstore.BaseEvent `json:"-"`
	RoleKeys             []string `json:"roleKeys"`
}

func NewUserGrantChangedEvent

func NewUserGrantChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	roleKeys []string) *UserGrantChangedEvent

func (*UserGrantChangedEvent) Data

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

func (*UserGrantChangedEvent) UniqueConstraints

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

type UserGrantDeactivatedEvent

type UserGrantDeactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`
}

func NewUserGrantDeactivatedEvent

func NewUserGrantDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserGrantDeactivatedEvent

func (*UserGrantDeactivatedEvent) Data

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

func (*UserGrantDeactivatedEvent) UniqueConstraints

type UserGrantReactivatedEvent

type UserGrantReactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`
}

func NewUserGrantReactivatedEvent

func NewUserGrantReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserGrantReactivatedEvent

func (*UserGrantReactivatedEvent) Data

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

func (*UserGrantReactivatedEvent) UniqueConstraints

type UserGrantRemovedEvent

type UserGrantRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`
	// contains filtered or unexported fields
}

func NewUserGrantRemovedEvent

func NewUserGrantRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	projectID,
	projectGrantID string,
) *UserGrantRemovedEvent

func (*UserGrantRemovedEvent) Data

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

func (*UserGrantRemovedEvent) UniqueConstraints

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

Jump to

Keyboard shortcuts

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