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