feat: organizations and API keys
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user