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
+29
View File
@@ -10,6 +10,24 @@ type Supergraph interface {
IsSupergraph()
}
type APIKey struct {
ID string `json:"id"`
Name string `json:"name"`
Key *string `json:"key,omitempty"`
Organization *Organization `json:"organization"`
Refs []string `json:"refs"`
Read bool `json:"read"`
Publish bool `json:"publish"`
}
type InputAPIKey struct {
Name string `json:"name"`
OrganizationID string `json:"organizationId"`
Refs []string `json:"refs"`
Read bool `json:"read"`
Publish bool `json:"publish"`
}
type InputSubGraph struct {
Ref string `json:"ref"`
Service string `json:"service"`
@@ -18,6 +36,13 @@ type InputSubGraph struct {
Sdl string `json:"sdl"`
}
type Organization struct {
ID string `json:"id"`
Name string `json:"name"`
Users []*User `json:"users"`
APIKeys []*APIKey `json:"apiKeys"`
}
type SubGraph struct {
ID string `json:"id"`
Service string `json:"service"`
@@ -42,3 +67,7 @@ type Unchanged struct {
}
func (Unchanged) IsSupergraph() {}
type User struct {
ID string `json:"id"`
}