feat: organizations and API keys

This commit is contained in:
2023-04-27 07:09:10 +02:00
parent 504f40902e
commit 554a6c252f
22 changed files with 2469 additions and 199 deletions
+5
View File
@@ -2,6 +2,7 @@ package graph
import (
"context"
"fmt"
"github.com/apex/log"
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
@@ -29,3 +30,7 @@ type Resolver struct {
func (r *Resolver) handler(ctx context.Context, aggregate eventsourced.Aggregate) (eventsourced.CommandHandler, error) {
return eventsourced.NewHandler(ctx, aggregate, r.EventStore, eventsourced.WithEventPublisher(r.Publisher))
}
func apiKeyId(orgId, name string) string {
return fmt.Sprintf("%s-%s", orgId, name)
}