2020-11-06 13:47:27 +01:00
|
|
|
package iam
|
|
|
|
|
2020-11-06 22:09:19 +01:00
|
|
|
import (
|
2021-03-15 12:51:15 +01:00
|
|
|
"github.com/caos/zitadel/internal/domain"
|
2021-02-23 15:13:04 +01:00
|
|
|
"github.com/caos/zitadel/internal/eventstore"
|
2020-11-06 22:09:19 +01:00
|
|
|
)
|
2020-11-06 13:47:27 +01:00
|
|
|
|
2020-11-12 22:50:01 +01:00
|
|
|
const (
|
2021-01-04 14:52:13 +01:00
|
|
|
iamEventTypePrefix = eventstore.EventType("iam.")
|
2020-11-12 22:50:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
AggregateType = "iam"
|
|
|
|
AggregateVersion = "v1"
|
|
|
|
)
|
|
|
|
|
2020-11-06 13:47:27 +01:00
|
|
|
type Aggregate struct {
|
|
|
|
eventstore.Aggregate
|
|
|
|
}
|
2021-03-15 12:51:15 +01:00
|
|
|
|
|
|
|
func NewAggregate() *Aggregate {
|
|
|
|
return &Aggregate{
|
|
|
|
Aggregate: eventstore.Aggregate{
|
|
|
|
Typ: AggregateType,
|
|
|
|
Version: AggregateVersion,
|
|
|
|
ID: domain.IAMID,
|
|
|
|
ResourceOwner: domain.IAMID,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|