Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type HMachineMutationResolver
- type HMachineResolver
- type HRouteMutationResolver
- type HRouteResolver
- type HeadscaleQueryResolver
- type MachineMutationResolver
- type MutationResolver
- type ProjectMutationResolver
- type ProjectResolver
- type QueryResolver
- type Resolver
- func (r *Resolver) HMachine() HMachineResolver
- func (r *Resolver) HMachineMutation() HMachineMutationResolver
- func (r *Resolver) HRoute() HRouteResolver
- func (r *Resolver) HRouteMutation() HRouteMutationResolver
- func (r *Resolver) HeadscaleQuery() HeadscaleQueryResolver
- func (r *Resolver) MachineMutation() MachineMutationResolver
- func (r *Resolver) Mutation() MutationResolver
- func (r *Resolver) Project() ProjectResolver
- func (r *Resolver) ProjectMutation() ProjectMutationResolver
- func (r *Resolver) Query() QueryResolver
- func (r *Resolver) Route() RouteResolver
- func (r *Resolver) RouteMutation() RouteMutationResolver
- func (r *Resolver) SyncResult() SyncResultResolver
- type ResolverRoot
- type RouteMutationResolver
- type RouteResolver
- type SyncResultResolver
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 ComplexityRoot ¶
type ComplexityRoot struct { HMachine struct { ForcedTags func(childComplexity int) int GivenName func(childComplexity int) int ID func(childComplexity int) int IPAddresses func(childComplexity int) int LastSeen func(childComplexity int) int Name func(childComplexity int) int Online func(childComplexity int) int Routes func(childComplexity int) int User func(childComplexity int) int } HMachineMutation struct { DeleteMachine func(childComplexity int, machineID int) int RenameMachine func(childComplexity int, machineID int, name string) int SetMachineTags func(childComplexity int, machineID int, tags []string) int } HRoute struct { Advertised func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Enabled func(childComplexity int) int ID func(childComplexity int) int IsPrimary func(childComplexity int) int Machine func(childComplexity int) int Prefix func(childComplexity int) int UpdatedAt func(childComplexity int) int } HRouteMutation struct { DeleteRoute func(childComplexity int, routeID int) int EnableRoute func(childComplexity int, routeID int, enable bool) int } HUser struct { ID func(childComplexity int) int Name func(childComplexity int) int } HeadscaleMutation struct { Machine func(childComplexity int) int Route func(childComplexity int) int } HeadscaleQuery struct { Machine func(childComplexity int, machineID int) int Machines func(childComplexity int) int } Machine struct { ID func(childComplexity int) int Name func(childComplexity int) int } MachineMutation struct { DeleteMachine func(childComplexity int, id string) int SaveMachine func(childComplexity int, machineInput *model.MachineInput) int } Mutation struct { Headscale func(childComplexity int) int Machine func(childComplexity int) int Project func(childComplexity int) int Route func(childComplexity int) int } Project struct { Code func(childComplexity int) int ID func(childComplexity int) int Machine func(childComplexity int) int MachineID func(childComplexity int) int MachineIDs func(childComplexity int) int Machines func(childComplexity int) int Name func(childComplexity int) int Routes func(childComplexity int) int } ProjectMutation struct { DeleteProject func(childComplexity int, id string) int SaveProject func(childComplexity int, projectInput *model.ProjectInput) int SyncProjectRoute func(childComplexity int, projectID *string) int } Query struct { Headscale func(childComplexity int) int Machines func(childComplexity int) int Projects func(childComplexity int) int Routes func(childComplexity int) int } Route struct { Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Project func(childComplexity int) int ProjectID func(childComplexity int) int } RouteMutation struct { DeleteRoute func(childComplexity int, id string) int SaveRoute func(childComplexity int, routeInput *model.RouteInput) int } SyncResult struct { Machine func(childComplexity int) int MachineID func(childComplexity int) int Project func(childComplexity int) int ProjectID func(childComplexity int) int Route func(childComplexity int) int RouteEnable func(childComplexity int) int RouteID func(childComplexity int) int } Timestamp struct { Nanos func(childComplexity int) int Seconds func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type HMachineMutationResolver ¶ added in v1.1.0
type HMachineMutationResolver interface { RenameMachine(ctx context.Context, obj *model.HMachineMutation, machineID int, name string) (*model.HMachine, error) DeleteMachine(ctx context.Context, obj *model.HMachineMutation, machineID int) (bool, error) SetMachineTags(ctx context.Context, obj *model.HMachineMutation, machineID int, tags []string) (*model.HMachine, error) }
type HMachineResolver ¶ added in v1.1.0
type HRouteMutationResolver ¶ added in v1.1.0
type HRouteResolver ¶ added in v1.1.0
type HeadscaleQueryResolver ¶ added in v1.1.0
type MachineMutationResolver ¶
type MutationResolver ¶
type MutationResolver interface { Project(ctx context.Context) (*model.ProjectMutation, error) Route(ctx context.Context) (*model.RouteMutation, error) Machine(ctx context.Context) (*model.MachineMutation, error) Headscale(ctx context.Context) (*model.HeadscaleMutation, error) }
type ProjectMutationResolver ¶
type ProjectMutationResolver interface { SaveProject(ctx context.Context, obj *model.ProjectMutation, projectInput *model.ProjectInput) (*model.Project, error) DeleteProject(ctx context.Context, obj *model.ProjectMutation, id string) (int, error) SyncProjectRoute(ctx context.Context, obj *model.ProjectMutation, projectID *string) ([]*model.SyncResult, error) }
type ProjectResolver ¶
type QueryResolver ¶
type Resolver ¶
type Resolver struct{}
func (*Resolver) HMachine ¶ added in v1.1.0
func (r *Resolver) HMachine() HMachineResolver
HMachine returns HMachineResolver implementation.
func (*Resolver) HMachineMutation ¶ added in v1.1.0
func (r *Resolver) HMachineMutation() HMachineMutationResolver
HMachineMutation returns HMachineMutationResolver implementation.
func (*Resolver) HRoute ¶ added in v1.1.0
func (r *Resolver) HRoute() HRouteResolver
HRoute returns HRouteResolver implementation.
func (*Resolver) HRouteMutation ¶ added in v1.1.0
func (r *Resolver) HRouteMutation() HRouteMutationResolver
HRouteMutation returns HRouteMutationResolver implementation.
func (*Resolver) HeadscaleQuery ¶ added in v1.1.0
func (r *Resolver) HeadscaleQuery() HeadscaleQueryResolver
HeadscaleQuery returns HeadscaleQueryResolver implementation.
func (*Resolver) MachineMutation ¶
func (r *Resolver) MachineMutation() MachineMutationResolver
MachineMutation returns MachineMutationResolver implementation.
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Project ¶
func (r *Resolver) Project() ProjectResolver
Project returns ProjectResolver implementation.
func (*Resolver) ProjectMutation ¶
func (r *Resolver) ProjectMutation() ProjectMutationResolver
ProjectMutation returns ProjectMutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Route ¶
func (r *Resolver) Route() RouteResolver
Route returns RouteResolver implementation.
func (*Resolver) RouteMutation ¶
func (r *Resolver) RouteMutation() RouteMutationResolver
RouteMutation returns RouteMutationResolver implementation.
func (*Resolver) SyncResult ¶
func (r *Resolver) SyncResult() SyncResultResolver
SyncResult returns SyncResultResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { HMachine() HMachineResolver HMachineMutation() HMachineMutationResolver HRoute() HRouteResolver HRouteMutation() HRouteMutationResolver HeadscaleQuery() HeadscaleQueryResolver MachineMutation() MachineMutationResolver Mutation() MutationResolver Project() ProjectResolver ProjectMutation() ProjectMutationResolver Query() QueryResolver Route() RouteResolver RouteMutation() RouteMutationResolver SyncResult() SyncResultResolver }