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 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 TargetResolver ¶
Click to show internal directories.
Click to hide internal directories.