generated

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 17 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 ComplexityRoot

type ComplexityRoot struct {
	Beacon struct {
		AgentIdentifier func(childComplexity int) int
		Host            func(childComplexity int) int
		ID              func(childComplexity int) int
		Identifier      func(childComplexity int) int
		Interval        func(childComplexity int) int
		LastSeenAt      func(childComplexity int) int
		Name            func(childComplexity int) int
		Principal       func(childComplexity int) int
		Tasks           func(childComplexity int) int
	}

	File struct {
		CreatedAt      func(childComplexity int) int
		Hash           func(childComplexity int) int
		ID             func(childComplexity int) int
		LastModifiedAt func(childComplexity int) int
		Name           func(childComplexity int) int
		Size           func(childComplexity int) int
	}

	Host struct {
		Beacons    func(childComplexity int) int
		ID         func(childComplexity int) int
		Identifier func(childComplexity int) int
		LastSeenAt func(childComplexity int) int
		Name       func(childComplexity int) int
		Platform   func(childComplexity int) int
		PrimaryIP  func(childComplexity int) int
		Tags       func(childComplexity int) int
	}

	Mutation struct {
		ClaimTasks       func(childComplexity int, input models.ClaimTasksInput) int
		CreateQuest      func(childComplexity int, beaconIDs []int, input ent.CreateQuestInput) int
		CreateTag        func(childComplexity int, input ent.CreateTagInput) int
		CreateTome       func(childComplexity int, input ent.CreateTomeInput) int
		SubmitTaskResult func(childComplexity int, input models.SubmitTaskResultInput) int
		UpdateBeacon     func(childComplexity int, beaconID int, input ent.UpdateBeaconInput) int
		UpdateHost       func(childComplexity int, hostID int, input ent.UpdateHostInput) int
		UpdateTag        func(childComplexity int, tagID int, input ent.UpdateTagInput) int
		UpdateUser       func(childComplexity int, userID int, input ent.UpdateUserInput) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Query struct {
		Beacons func(childComplexity int, where *ent.BeaconWhereInput) int
		Files   func(childComplexity int, where *ent.FileWhereInput) int
		Hosts   func(childComplexity int, where *ent.HostWhereInput) int
		Me      func(childComplexity int) int
		Node    func(childComplexity int, id int) int
		Nodes   func(childComplexity int, ids []int) int
		Quests  func(childComplexity int, where *ent.QuestWhereInput) int
		Tags    func(childComplexity int, where *ent.TagWhereInput) int
		Tasks   func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.TaskOrder, where *ent.TaskWhereInput) int
		Tomes   func(childComplexity int, where *ent.TomeWhereInput) int
		Users   func(childComplexity int, where *ent.UserWhereInput) int
	}

	Quest struct {
		Bundle         func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		Creator        func(childComplexity int) int
		ID             func(childComplexity int) int
		LastModifiedAt func(childComplexity int) int
		Name           func(childComplexity int) int
		Parameters     func(childComplexity int) int
		Tasks          func(childComplexity int) int
		Tome           func(childComplexity int) int
	}

	Tag struct {
		Hosts func(childComplexity int) int
		ID    func(childComplexity int) int
		Kind  func(childComplexity int) int
		Name  func(childComplexity int) int
	}

	Task struct {
		Beacon         func(childComplexity int) int
		ClaimedAt      func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		Error          func(childComplexity int) int
		ExecFinishedAt func(childComplexity int) int
		ExecStartedAt  func(childComplexity int) int
		ID             func(childComplexity int) int
		LastModifiedAt func(childComplexity int) int
		Output         func(childComplexity int) int
		Quest          func(childComplexity int) int
	}

	TaskConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	TaskEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Tome struct {
		CreatedAt      func(childComplexity int) int
		Description    func(childComplexity int) int
		Eldritch       func(childComplexity int) int
		Files          func(childComplexity int) int
		ID             func(childComplexity int) int
		LastModifiedAt func(childComplexity int) int
		Name           func(childComplexity int) int
		ParamDefs      func(childComplexity int) int
	}

	User struct {
		ID          func(childComplexity int) int
		IsActivated func(childComplexity int) int
		IsAdmin     func(childComplexity int) int
		Name        func(childComplexity int) int
		PhotoURL    func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	RequireRole func(ctx context.Context, obj interface{}, next graphql.Resolver, role models.Role) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	CreateQuest(ctx context.Context, beaconIDs []int, input ent.CreateQuestInput) (*ent.Quest, error)
	UpdateBeacon(ctx context.Context, beaconID int, input ent.UpdateBeaconInput) (*ent.Beacon, error)
	UpdateHost(ctx context.Context, hostID int, input ent.UpdateHostInput) (*ent.Host, error)
	CreateTag(ctx context.Context, input ent.CreateTagInput) (*ent.Tag, error)
	UpdateTag(ctx context.Context, tagID int, input ent.UpdateTagInput) (*ent.Tag, error)
	ClaimTasks(ctx context.Context, input models.ClaimTasksInput) ([]*ent.Task, error)
	SubmitTaskResult(ctx context.Context, input models.SubmitTaskResultInput) (*ent.Task, error)
	CreateTome(ctx context.Context, input ent.CreateTomeInput) (*ent.Tome, error)
	UpdateUser(ctx context.Context, userID int, input ent.UpdateUserInput) (*ent.User, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id int) (ent.Noder, error)
	Nodes(ctx context.Context, ids []int) ([]ent.Noder, error)
	Files(ctx context.Context, where *ent.FileWhereInput) ([]*ent.File, error)
	Quests(ctx context.Context, where *ent.QuestWhereInput) ([]*ent.Quest, error)
	Tasks(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.TaskOrder, where *ent.TaskWhereInput) (*ent.TaskConnection, error)
	Beacons(ctx context.Context, where *ent.BeaconWhereInput) ([]*ent.Beacon, error)
	Hosts(ctx context.Context, where *ent.HostWhereInput) ([]*ent.Host, error)
	Tags(ctx context.Context, where *ent.TagWhereInput) ([]*ent.Tag, error)
	Tomes(ctx context.Context, where *ent.TomeWhereInput) ([]*ent.Tome, error)
	Users(ctx context.Context, where *ent.UserWhereInput) ([]*ent.User, error)
	Me(ctx context.Context) (*ent.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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