zitadel/internal/v2/repository/member/event_removed.go
2020-11-06 22:09:19 +01:00

37 lines
571 B
Go

package member
import (
"context"
"github.com/caos/zitadel/internal/eventstore/v2"
)
type MemberRemovedEvent struct {
eventstore.BaseEvent `json:"-"`
UserID string `json:"userId"`
}
func (e *MemberRemovedEvent) CheckPrevious() bool {
return true
}
func (e *MemberRemovedEvent) Data() interface{} {
return e
}
func NewMemberRemovedEvent(
ctx context.Context,
eventType eventstore.EventType,
userID string,
) *MemberRemovedEvent {
return &MemberRemovedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
eventType,
),
UserID: userID,
}
}