mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
b32c02a39b
Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com>
31 lines
542 B
Go
31 lines
542 B
Go
package instance
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
const (
|
|
instanceEventTypePrefix = eventstore.EventType("instance.")
|
|
)
|
|
|
|
const (
|
|
AggregateType = "instance"
|
|
AggregateVersion = "v1"
|
|
)
|
|
|
|
type Aggregate struct {
|
|
eventstore.Aggregate
|
|
}
|
|
|
|
func NewAggregate(instanceID string) *Aggregate {
|
|
return &Aggregate{
|
|
Aggregate: eventstore.Aggregate{
|
|
InstanceID: instanceID,
|
|
Type: AggregateType,
|
|
Version: AggregateVersion,
|
|
ID: instanceID,
|
|
ResourceOwner: instanceID,
|
|
},
|
|
}
|
|
}
|