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 AddJobInput ¶
type AddJobInput struct { // Cron expression for scheduling e.g. '0 * * * *' CronExp string `json:"cronExp"` // Root directory to run the command RootDir string `json:"rootDir"` // Terminal-based command Cmd string `json:"cmd"` // Command arguments Args []*string `json:"args"` // Tags for easier job retrieval Tags []*string `json:"tags"` }
type ComplexityRoot ¶
type ComplexityRoot struct { Job struct { Args func(childComplexity int) int Cmd func(childComplexity int) int CronExp func(childComplexity int) int JobID func(childComplexity int) int LastForcedRun func(childComplexity int) int LastForcedTime func(childComplexity int) int LastScheduledRun func(childComplexity int) int LastScheduledTime func(childComplexity int) int NextScheduledRun func(childComplexity int) int NextScheduledTime func(childComplexity int) int RootDir func(childComplexity int) int Tags func(childComplexity int) int } Mutation struct { AddJob func(childComplexity int, input AddJobInput) int RemoveJob func(childComplexity int, jobID int) int RunJob func(childComplexity int, jobID int) int } Query struct { Jobs func(childComplexity int, input *JobsInput) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type Job ¶
type Job struct { // Unique ID for the job (generated) JobID int `json:"jobID"` // Cron expression used for scheduling e.g. '0 * * * *' CronExp string `json:"cronExp"` // Root directory to run the command RootDir string `json:"rootDir"` // Terminal-based command Cmd string `json:"cmd"` // Command arguments Args []*string `json:"args"` // Tags for easier job retrieval Tags []*string `json:"tags"` // Last scheduled execution time (human friendly) LastScheduledRun *string `json:"lastScheduledRun"` // Next scheduled execution time (human friendly) NextScheduledRun *string `json:"nextScheduledRun"` // Last forced execution time (human friendly) LastForcedRun *string `json:"lastForcedRun"` // Last scheduled execution time (seconds) LastScheduledTime *int `json:"lastScheduledTime"` // Next scheduled execution time (seconds) NextScheduledTime *int `json:"nextScheduledTime"` // Last forced execution time (seconds) LastForcedTime *int `json:"lastForcedTime"` }
type MutationResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.