zitadel/internal/v2/repository/member/event_removed.go

37 lines
571 B
Go
Raw Normal View History

2020-11-06 13:47:27 +01:00
package member
import (
2020-11-06 17:25:07 +01:00
"context"
2020-11-06 13:47:27 +01:00
"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
}
2020-11-06 17:25:07 +01:00
2020-11-06 22:09:19 +01:00
func NewMemberRemovedEvent(
ctx context.Context,
eventType eventstore.EventType,
userID string,
) *MemberRemovedEvent {
2020-11-06 17:25:07 +01:00
return &MemberRemovedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
eventType,
),
UserID: userID,
}
}