zitadel/internal/repository/iam/aggregate.go

31 lines
519 B
Go
Raw Normal View History

2020-11-06 12:47:27 +00:00
package iam
2020-11-06 21:09:19 +00:00
import (
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/eventstore"
2020-11-06 21:09:19 +00:00
)
2020-11-06 12:47:27 +00:00
const (
iamEventTypePrefix = eventstore.EventType("iam.")
)
const (
AggregateType = "iam"
AggregateVersion = "v1"
)
2020-11-06 12:47:27 +00:00
type Aggregate struct {
eventstore.Aggregate
}
func NewAggregate() *Aggregate {
return &Aggregate{
Aggregate: eventstore.Aggregate{
Typ: AggregateType,
Version: AggregateVersion,
ID: domain.IAMID,
ResourceOwner: domain.IAMID,
},
}
}