gqlgen

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 18 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 AlertResolver

type AlertResolver interface {
	Incidents(ctx context.Context, obj *ent.Alert) ([]*db.IncidentSummary, error)
	IncidentEntries(ctx context.Context, obj *ent.Alert) ([]*ent.Incident, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Alert struct {
		Counters        func(childComplexity int) int
		Error           func(childComplexity int) int
		Failures        func(childComplexity int) int
		Files           func(childComplexity int) int
		ID              func(childComplexity int) int
		IncidentEntries func(childComplexity int) int
		IncidentID      func(childComplexity int) int
		Incidents       func(childComplexity int) int
		Level           func(childComplexity int) int
		Name            func(childComplexity int) int
		ProbeHost       func(childComplexity int) int
		ProbeOS         func(childComplexity int) int
		Region          func(childComplexity int) int
		Stati           func(childComplexity int) int
		Time            func(childComplexity int) int
		UUID            func(childComplexity int) int
		Username        func(childComplexity int) int
	}

	Counter struct {
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Failure struct {
		Error func(childComplexity int) int
		ID    func(childComplexity int) int
		Idx   func(childComplexity int) int
	}

	File struct {
		Ext     func(childComplexity int) int
		ID      func(childComplexity int) int
		Name    func(childComplexity int) int
		Payload func(childComplexity int) int
		Size    func(childComplexity int) int
		Type    func(childComplexity int) int
		UUID    func(childComplexity int) int
	}

	Incident struct {
		Alerts     func(childComplexity int) int
		Counters   func(childComplexity int) int
		End        func(childComplexity int) int
		Error      func(childComplexity int) int
		Failures   func(childComplexity int) int
		Files      func(childComplexity int) int
		ID         func(childComplexity int) int
		IncidentID func(childComplexity int) int
		Level      func(childComplexity int) int
		Name       func(childComplexity int) int
		ProbeHost  func(childComplexity int) int
		ProbeOS    func(childComplexity int) int
		Region     func(childComplexity int) int
		Start      func(childComplexity int) int
		State      func(childComplexity int) int
		Stati      func(childComplexity int) int
		UUID       func(childComplexity int) int
		Username   func(childComplexity int) int
	}

	IncidentSummary struct {
		Alerts          func(childComplexity int, level *status.Level) int
		End             func(childComplexity int) int
		IncidentEntries func(childComplexity int) int
		IncidentID      func(childComplexity int) int
		Level           func(childComplexity int) int
		Name            func(childComplexity int) int
		Start           func(childComplexity int) int
		Total           func(childComplexity int) int
	}

	Query struct {
		Alerts          func(childComplexity int, szenario *string, after *time.Time, before *time.Time) int
		IncidentEntries func(childComplexity int, szenario *string, timestamp *time.Time, incidentID *uuid.UUID, after *time.Time, before *time.Time) int
		Incidents       func(childComplexity int, szenario *string, timestamp *time.Time, incidentID *uuid.UUID, after *time.Time, before *time.Time) int
	}

	Status struct {
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Subscription struct {
		Alert    func(childComplexity int, szenario *string) int
		Incident func(childComplexity int, szenario *string) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type FileResolver

type FileResolver interface {
	Payload(ctx context.Context, obj *ent.File) (string, error)
}

type IncidentResolver

type IncidentResolver interface {
	State(ctx context.Context, obj *ent.Incident) (string, error)

	Alerts(ctx context.Context, obj *ent.Incident) ([]*ent.Alert, error)
}

type IncidentSummaryResolver

type IncidentSummaryResolver interface {
	Start(ctx context.Context, obj *db.IncidentSummary) (*time.Time, error)
	End(ctx context.Context, obj *db.IncidentSummary) (*time.Time, error)

	IncidentEntries(ctx context.Context, obj *db.IncidentSummary) ([]*ent.Incident, error)

	Alerts(ctx context.Context, obj *db.IncidentSummary, level *status.Level) ([]*ent.Alert, error)
}

type QueryResolver

type QueryResolver interface {
	Incidents(ctx context.Context, szenario *string, timestamp *time.Time, incidentID *uuid.UUID, after *time.Time, before *time.Time) ([]*db.IncidentSummary, error)
	IncidentEntries(ctx context.Context, szenario *string, timestamp *time.Time, incidentID *uuid.UUID, after *time.Time, before *time.Time) ([]*ent.Incident, error)
	Alerts(ctx context.Context, szenario *string, after *time.Time, before *time.Time) ([]*ent.Alert, error)
}

type ResolverRoot

type ResolverRoot interface {
	Alert() AlertResolver
	File() FileResolver
	Incident() IncidentResolver
	IncidentSummary() IncidentSummaryResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver added in v0.12.3

type SubscriptionResolver interface {
	Incident(ctx context.Context, szenario *string) (<-chan *ent.Incident, error)
	Alert(ctx context.Context, szenario *string) (<-chan *ent.Alert, error)
}

Jump to

Keyboard shortcuts

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