mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 12:57:34 +00:00
chore: move the go code into a subfolder
This commit is contained in:
22
apps/api/internal/repository/permission/aggregate.go
Normal file
22
apps/api/internal/repository/permission/aggregate.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package permission
|
||||
|
||||
import "github.com/zitadel/zitadel/internal/eventstore"
|
||||
|
||||
const (
|
||||
AggregateType eventstore.AggregateType = "permission"
|
||||
AggregateVersion eventstore.Version = "v1"
|
||||
)
|
||||
|
||||
func NewAggregate(aggregateID string) *eventstore.Aggregate {
|
||||
var instanceID string
|
||||
if aggregateID != "SYSTEM" {
|
||||
instanceID = aggregateID
|
||||
}
|
||||
return &eventstore.Aggregate{
|
||||
ID: aggregateID,
|
||||
Type: AggregateType,
|
||||
ResourceOwner: aggregateID,
|
||||
InstanceID: instanceID,
|
||||
Version: AggregateVersion,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user