generated

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: AGPL-3.0 Imports: 12 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 {
	Credential struct {
		Fails     func(childComplexity int) int
		ID        func(childComplexity int) int
		Principal func(childComplexity int) int
		Secret    func(childComplexity int) int
	}

	Job struct {
		Content      func(childComplexity int) int
		CreationTime func(childComplexity int) int
		ID           func(childComplexity int) int
		Name         func(childComplexity int) int
		Next         func(childComplexity int) int
		Prev         func(childComplexity int) int
		Tags         func(childComplexity int) int
		Tasks        func(childComplexity int) int
	}

	Mutation struct {
		AddCredentialForTarget func(childComplexity int, input *models.AddCredentialForTargetRequest) int
		ApplyTagToJob          func(childComplexity int, input *models.ApplyTagRequest) int
		ApplyTagToTarget       func(childComplexity int, input *models.ApplyTagRequest) int
		ApplyTagToTask         func(childComplexity int, input *models.ApplyTagRequest) int
		ClaimTask              func(childComplexity int, id int) int
		ClaimTasks             func(childComplexity int, input *models.ClaimTasksRequest) int
		CreateJob              func(childComplexity int, input *models.CreateJobRequest) int
		CreateTag              func(childComplexity int, input *models.CreateTagRequest) int
		CreateTarget           func(childComplexity int, input *models.CreateTargetRequest) int
		DeleteTarget           func(childComplexity int, input *models.DeleteTargetRequest) int
		FailCredential         func(childComplexity int, input *models.FailCredentialRequest) int
		RemoveTagFromJob       func(childComplexity int, input *models.RemoveTagRequest) int
		RemoveTagFromTarget    func(childComplexity int, input *models.RemoveTagRequest) int
		RemoveTagFromTask      func(childComplexity int, input *models.RemoveTagRequest) int
		SetTargetFields        func(childComplexity int, input *models.SetTargetFieldsRequest) int
		SubmitTaskResult       func(childComplexity int, input *models.SubmitTaskResultRequest) int
	}

	Query struct {
		Credential  func(childComplexity int, id int) int
		Credentials func(childComplexity int) int
		Job         func(childComplexity int, id int) int
		Jobs        func(childComplexity int) int
		Tag         func(childComplexity int, id int) int
		Tags        func(childComplexity int) int
		Target      func(childComplexity int, id int) int
		Targets     func(childComplexity int) int
		Task        func(childComplexity int, id int) int
		Tasks       func(childComplexity int) int
	}

	Tag struct {
		ID      func(childComplexity int) int
		Jobs    func(childComplexity int) int
		Name    func(childComplexity int) int
		Targets func(childComplexity int) int
		Tasks   func(childComplexity int) int
	}

	Target struct {
		Credentials func(childComplexity int) int
		Hostname    func(childComplexity int) int
		ID          func(childComplexity int) int
		LastSeen    func(childComplexity int) int
		MachineUUID func(childComplexity int) int
		Name        func(childComplexity int) int
		PrimaryIP   func(childComplexity int) int
		PrimaryMAC  func(childComplexity int) int
		PublicIP    func(childComplexity int) int
		Tags        func(childComplexity int) int
		Tasks       func(childComplexity int) int
	}

	Task struct {
		ClaimTime     func(childComplexity int) int
		Content       func(childComplexity int) int
		Error         func(childComplexity int) int
		ExecStartTime func(childComplexity int) int
		ExecStopTime  func(childComplexity int) int
		ID            func(childComplexity int) int
		Job           func(childComplexity int) int
		Output        func(childComplexity int) int
		QueueTime     func(childComplexity int) int
		SessionID     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type JobResolver

type JobResolver interface {
	Tasks(ctx context.Context, obj *ent.Job) ([]*ent.Task, error)
	Tags(ctx context.Context, obj *ent.Job) ([]*ent.Tag, error)
	Next(ctx context.Context, obj *ent.Job) (*ent.Job, error)
	Prev(ctx context.Context, obj *ent.Job) (*ent.Job, error)
}

type MutationResolver

type MutationResolver interface {
	FailCredential(ctx context.Context, input *models.FailCredentialRequest) (*ent.Credential, error)
	CreateJob(ctx context.Context, input *models.CreateJobRequest) (*ent.Job, error)
	CreateTag(ctx context.Context, input *models.CreateTagRequest) (*ent.Tag, error)
	ApplyTagToTask(ctx context.Context, input *models.ApplyTagRequest) (*ent.Task, error)
	ApplyTagToTarget(ctx context.Context, input *models.ApplyTagRequest) (*ent.Target, error)
	ApplyTagToJob(ctx context.Context, input *models.ApplyTagRequest) (*ent.Job, error)
	RemoveTagFromTask(ctx context.Context, input *models.RemoveTagRequest) (*ent.Task, error)
	RemoveTagFromTarget(ctx context.Context, input *models.RemoveTagRequest) (*ent.Target, error)
	RemoveTagFromJob(ctx context.Context, input *models.RemoveTagRequest) (*ent.Job, error)
	CreateTarget(ctx context.Context, input *models.CreateTargetRequest) (*ent.Target, error)
	SetTargetFields(ctx context.Context, input *models.SetTargetFieldsRequest) (*ent.Target, error)
	DeleteTarget(ctx context.Context, input *models.DeleteTargetRequest) (bool, error)
	AddCredentialForTarget(ctx context.Context, input *models.AddCredentialForTargetRequest) (*ent.Target, error)
	ClaimTasks(ctx context.Context, input *models.ClaimTasksRequest) ([]*ent.Task, error)
	ClaimTask(ctx context.Context, id int) (*ent.Task, error)
	SubmitTaskResult(ctx context.Context, input *models.SubmitTaskResultRequest) (*ent.Task, error)
}

type QueryResolver

type QueryResolver interface {
	Credential(ctx context.Context, id int) (*ent.Credential, error)
	Credentials(ctx context.Context) ([]*ent.Credential, error)
	Job(ctx context.Context, id int) (*ent.Job, error)
	Jobs(ctx context.Context) ([]*ent.Job, error)
	Tag(ctx context.Context, id int) (*ent.Tag, error)
	Tags(ctx context.Context) ([]*ent.Tag, error)
	Target(ctx context.Context, id int) (*ent.Target, error)
	Targets(ctx context.Context) ([]*ent.Target, error)
	Task(ctx context.Context, id int) (*ent.Task, error)
	Tasks(ctx context.Context) ([]*ent.Task, error)
}

type ResolverRoot

type ResolverRoot interface {
	Job() JobResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Tag() TagResolver
	Target() TargetResolver
	Task() TaskResolver
}

type TagResolver

type TagResolver interface {
	Tasks(ctx context.Context, obj *ent.Tag) ([]*ent.Task, error)
	Targets(ctx context.Context, obj *ent.Tag) ([]*ent.Target, error)
	Jobs(ctx context.Context, obj *ent.Tag) ([]*ent.Job, error)
}

type TargetResolver

type TargetResolver interface {
	Tasks(ctx context.Context, obj *ent.Target) ([]*ent.Task, error)
	Tags(ctx context.Context, obj *ent.Target) ([]*ent.Tag, error)
	Credentials(ctx context.Context, obj *ent.Target) ([]*ent.Credential, error)
}

type TaskResolver

type TaskResolver interface {
	Job(ctx context.Context, obj *ent.Task) (*ent.Job, error)
}

Jump to

Keyboard shortcuts

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