Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func PlaygroundHandler ¶
func PlaygroundHandler(title, endpoint string) http.HandlerFunc
PlaygroundHandler returns a handler that serves the GraphQL Playground with custom examples
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct {
Placement struct {
Annotations func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Request func(childComplexity int) int
Resources func(childComplexity int) int
ServiceUUID func(childComplexity int) int
Status func(childComplexity int) int
ToCleanup func(childComplexity int) int
UpdatedAt func(childComplexity int) int
}
Query struct {
Placement func(childComplexity int, id int) int
PlacementByServiceUUID func(childComplexity int, serviceUUID string) int
Placements func(childComplexity int, status *string, serviceUUID *string, toCleanup *bool, annotations map[string]any, limit *int, offset *int) int
}
}
type Config ¶
type Config struct {
Schema *ast.Schema
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type PlacementResolver ¶
type QueryResolver ¶
type QueryResolver interface {
Placements(ctx context.Context, status *string, serviceUUID *string, toCleanup *bool, annotations map[string]any, limit *int, offset *int) ([]*model.Placement, error)
Placement(ctx context.Context, id int) (*model.Placement, error)
PlacementByServiceUUID(ctx context.Context, serviceUUID string) (*model.Placement, error)
}
type Resolver ¶
type Resolver struct {
DbPool *pgxpool.Pool
AwsProvider models.AwsAccountProvider
OcpProvider models.OcpSandboxProvider
DnsProvider models.DNSSandboxProvider
IbmProvider models.IBMResourceGroupSandboxProvider
}
func (*Resolver) Placement ¶
func (r *Resolver) Placement() PlacementResolver
Placement returns PlacementResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface {
Placement() PlacementResolver
Query() QueryResolver
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.