generated

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 14 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 {
	Mutation struct {
		CommitJobs         func(childComplexity int, executor string, commits []model.CommitArgs) int
		CreateJob          func(childComplexity int, executor string, args model.CreateJobArgs) int
		DeleteJobByID      func(childComplexity int, executor string, id int64) int
		DeleteJobByName    func(childComplexity int, executor string, name string) int
		FailJobs           func(childComplexity int, executor string, commits []model.CommitArgs) int
		FetchForProcessing func(childComplexity int, executor string, limit int) int
		RestartJob         func(childComplexity int, executor string, id int64) int
		RetryJobs          func(childComplexity int, executor string, commits []model.CommitArgs) int
		StopJob            func(childComplexity int, executor string, id int64) int
		UpdateExprByID     func(childComplexity int, executor string, id int64, expr string) int
		UpdateJobByID      func(childComplexity int, executor string, id int64, args model.UpdateJobArgs) int
		UpdateJobByName    func(childComplexity int, executor string, name string, args model.UpdateJobArgs) int
		UpdateStateByID    func(childComplexity int, executor string, id int64, state string) int
		ValidateExprFormat func(childComplexity int, expr string) int
	}

	Query struct {
		QueryJobByID     func(childComplexity int, executor string, id int64) int
		QueryJobByName   func(childComplexity int, executor string, name string) int
		SearchJobs       func(childComplexity int, executor string, args model.QueryJobsArgs) int
		SearchJobsByMeta func(childComplexity int, executor string, args model.QueryJobsMetaArgs) int
	}

	SearchJobsByMetaResult struct {
		Jobs  func(childComplexity int) int
		Total func(childComplexity int) int
	}

	TinyJob struct {
		CreatedAt       func(childComplexity int) int
		ExecutionAmount func(childComplexity int) int
		Executor        func(childComplexity int) int
		Expr            func(childComplexity int) int
		ID              func(childComplexity int) int
		LastRunAt       func(childComplexity int) int
		Meta            func(childComplexity int) int
		Name            func(childComplexity int) int
		Retries         func(childComplexity int) int
		RunAt           func(childComplexity int) int
		StartAt         func(childComplexity int) int
		State           func(childComplexity int) int
		Status          func(childComplexity int) int
		Timeout         func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	ValidateExprFormat(ctx context.Context, expr string) (bool, error)
	CreateJob(ctx context.Context, executor string, args model.CreateJobArgs) (sqlc.TinyJob, error)
	UpdateJobByName(ctx context.Context, executor string, name string, args model.UpdateJobArgs) (sqlc.TinyJob, error)
	UpdateJobByID(ctx context.Context, executor string, id int64, args model.UpdateJobArgs) (sqlc.TinyJob, error)
	UpdateStateByID(ctx context.Context, executor string, id int64, state string) (sqlc.TinyJob, error)
	UpdateExprByID(ctx context.Context, executor string, id int64, expr string) (sqlc.TinyJob, error)
	DeleteJobByName(ctx context.Context, executor string, name string) (sqlc.TinyJob, error)
	DeleteJobByID(ctx context.Context, executor string, id int64) (sqlc.TinyJob, error)
	StopJob(ctx context.Context, executor string, id int64) (sqlc.TinyJob, error)
	RestartJob(ctx context.Context, executor string, id int64) (sqlc.TinyJob, error)
	FetchForProcessing(ctx context.Context, executor string, limit int) ([]sqlc.TinyJob, error)
	CommitJobs(ctx context.Context, executor string, commits []model.CommitArgs) ([]int64, error)
	FailJobs(ctx context.Context, executor string, commits []model.CommitArgs) ([]int64, error)
	RetryJobs(ctx context.Context, executor string, commits []model.CommitArgs) ([]int64, error)
}

type QueryResolver

type QueryResolver interface {
	SearchJobs(ctx context.Context, executor string, args model.QueryJobsArgs) ([]sqlc.TinyJob, error)
	SearchJobsByMeta(ctx context.Context, executor string, args model.QueryJobsMetaArgs) (model.SearchJobsByMetaResult, error)
	QueryJobByName(ctx context.Context, executor string, name string) (sqlc.TinyJob, error)
	QueryJobByID(ctx context.Context, executor string, id int64) (sqlc.TinyJob, error)
}

type ResolverRoot

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

type TinyJobResolver

type TinyJobResolver interface {
	RunAt(ctx context.Context, obj *sqlc.TinyJob) (time.Time, error)
	LastRunAt(ctx context.Context, obj *sqlc.TinyJob) (*time.Time, error)
	StartAt(ctx context.Context, obj *sqlc.TinyJob) (*time.Time, error)

	CreatedAt(ctx context.Context, obj *sqlc.TinyJob) (time.Time, error)

	Meta(ctx context.Context, obj *sqlc.TinyJob) (string, error)
}

Jump to

Keyboard shortcuts

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