generated

package
v2.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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 BMCResolver interface {
	BmcType(ctx context.Context, obj *sabakan.MachineBMC) (string, error)
	Ipv4(ctx context.Context, obj *sabakan.MachineBMC) (*gql.IPAddress, error)
}

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 MachineStatusResolver interface {
	Timestamp(ctx context.Context, obj *sabakan.MachineStatus) (*gql.DateTime, error)
}

type MutationResolver

type MutationResolver interface {
	SetMachineState(ctx context.Context, serial string, state sabakan.MachineState) (*sabakan.MachineStatus, error)
}

type NICConfigResolver

type NICConfigResolver interface {
	Address(ctx context.Context, obj *sabakan.NICConfig) (*gql.IPAddress, error)
	Netmask(ctx context.Context, obj *sabakan.NICConfig) (*gql.IPAddress, error)

	Gateway(ctx context.Context, obj *sabakan.NICConfig) (*gql.IPAddress, error)
}

type QueryResolver

type QueryResolver interface {
	Machine(ctx context.Context, serial string) (*sabakan.Machine, error)
	SearchMachines(ctx context.Context, having *model.MachineParams, notHaving *model.MachineParams) ([]*sabakan.Machine, error)
}

type ResolverRoot

type ResolverRoot interface {
	BMC() BMCResolver
	MachineSpec() MachineSpecResolver
	MachineStatus() MachineStatusResolver
	Mutation() MutationResolver
	NICConfig() NICConfigResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL