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.
Types ¶
type BMCResolver ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Bmc struct { BmcType func(childComplexity int) int Ipv4 func(childComplexity int) int } BMCInfo struct { IPv4 func(childComplexity int) int } Label struct { Name func(childComplexity int) int Value func(childComplexity int) int } Machine struct { Info func(childComplexity int) int Spec func(childComplexity int) int Status func(childComplexity int) int } MachineInfo struct { BMC func(childComplexity int) int Network func(childComplexity int) int } MachineSpec struct { BMC func(childComplexity int) int IndexInRack func(childComplexity int) int Ipv4 func(childComplexity int) int Labels func(childComplexity int) int Rack func(childComplexity int) int RegisterDate func(childComplexity int) int RetireDate func(childComplexity int) int Role func(childComplexity int) int Serial func(childComplexity int) int } MachineStatus struct { Duration func(childComplexity int) int State func(childComplexity int) int Timestamp func(childComplexity int) int } Mutation struct { SetMachineState func(childComplexity int, serial string, state sabakan.MachineState) int } NICConfig struct { Address func(childComplexity int) int Gateway func(childComplexity int) int MaskBits func(childComplexity int) int Netmask func(childComplexity int) int } NetworkInfo struct { IPv4 func(childComplexity int) int } Query struct { Machine func(childComplexity int, serial string) int SearchMachines func(childComplexity int, having *model.MachineParams, notHaving *model.MachineParams) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MachineSpecResolver ¶
type MachineSpecResolver interface { Labels(ctx context.Context, obj *sabakan.MachineSpec) ([]*model.Label, error) Rack(ctx context.Context, obj *sabakan.MachineSpec) (int, error) IndexInRack(ctx context.Context, obj *sabakan.MachineSpec) (int, error) Ipv4(ctx context.Context, obj *sabakan.MachineSpec) ([]*gql.IPAddress, error) RegisterDate(ctx context.Context, obj *sabakan.MachineSpec) (*gql.DateTime, error) RetireDate(ctx context.Context, obj *sabakan.MachineSpec) (*gql.DateTime, error) }
type MachineStatusResolver ¶
type MutationResolver ¶
type MutationResolver interface {
SetMachineState(ctx context.Context, serial string, state sabakan.MachineState) (*sabakan.MachineStatus, error)
}
type NICConfigResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { BMC() BMCResolver MachineSpec() MachineSpecResolver MachineStatus() MachineStatusResolver Mutation() MutationResolver NICConfig() NICConfigResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.