Documentation ¶
Overview ¶
GENERATED DO NOT EDIT GENERATOR: scripts/gencode/gencode.go ARGUMENTS: --component server --config ../../api/api.yml --package apiserver --out-dir ./ --out ./apiserver.gen.go --model-package github.com/adamlouis/goq/pkg/goqmodel
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorCode ¶
func RegisterRouter ¶
func RegisterRouter(apiHandler APIHandler, r *mux.Router, c ErrorCoder)
Types ¶
type APIHandler ¶
type APIHandler interface { ListJobs(ctx context.Context, queryParams *goqmodel.ListJobsQueryParams) (*goqmodel.ListJobsResponse, error) SearchJobs(ctx context.Context, body *goqmodel.SearchJobsRequest) (*goqmodel.SearchJobsResponse, error) GetJob(ctx context.Context, pathParams *goqmodel.GetJobPathParams) (*goqmodel.Job, error) DeleteJob(ctx context.Context, pathParams *goqmodel.DeleteJobPathParams) error QueueJob(ctx context.Context, body *goqmodel.Job) (*goqmodel.Job, error) ClaimSomeJob(ctx context.Context, body *goqmodel.ClaimSomeJobRequest) (*goqmodel.Job, error) ClaimJob(ctx context.Context, pathParams *goqmodel.ClaimJobPathParams) (*goqmodel.Job, error) ReleaseJob(ctx context.Context, pathParams *goqmodel.ReleaseJobPathParams) (*goqmodel.Job, error) SetJobSuccess(ctx context.Context, pathParams *goqmodel.SetJobSuccessPathParams, body *goqmodel.Job) (*goqmodel.Job, error) SetJobError(ctx context.Context, pathParams *goqmodel.SetJobErrorPathParams, body *goqmodel.Job) (*goqmodel.Job, error) ListSchedulers(ctx context.Context, queryParams *goqmodel.ListSchedulersRequest) (*goqmodel.ListSchedulersResponse, error) PostScheduler(ctx context.Context, body *goqmodel.Scheduler) (*goqmodel.Scheduler, error) GetScheduler(ctx context.Context, pathParams *goqmodel.GetSchedulerPathParams) (*goqmodel.Scheduler, error) PutScheduler(ctx context.Context, pathParams *goqmodel.PutSchedulerPathParams, body *goqmodel.Scheduler) (*goqmodel.Scheduler, error) DeleteScheduler(ctx context.Context, pathParams *goqmodel.DeleteSchedulerPathParams) error }
func NewAPIHandler ¶
func NewAPIHandler(ctx context.Context, jobDB, schedulerDB *sqlx.DB) APIHandler
type ErrorCoder ¶
type HTTPHandler ¶
type HTTPHandler interface { ListJobs(w http.ResponseWriter, req *http.Request) SearchJobs(w http.ResponseWriter, req *http.Request) GetJob(w http.ResponseWriter, req *http.Request) DeleteJob(w http.ResponseWriter, req *http.Request) QueueJob(w http.ResponseWriter, req *http.Request) ClaimSomeJob(w http.ResponseWriter, req *http.Request) ClaimJob(w http.ResponseWriter, req *http.Request) ReleaseJob(w http.ResponseWriter, req *http.Request) SetJobSuccess(w http.ResponseWriter, req *http.Request) SetJobError(w http.ResponseWriter, req *http.Request) ListSchedulers(w http.ResponseWriter, req *http.Request) PostScheduler(w http.ResponseWriter, req *http.Request) GetScheduler(w http.ResponseWriter, req *http.Request) PutScheduler(w http.ResponseWriter, req *http.Request) DeleteScheduler(w http.ResponseWriter, req *http.Request) }
type RollbackFn ¶
type RollbackFn func() error
Source Files ¶
- apiserver.gen.go
- error.go
- gen.go
- handler.go
- handler_claim_job.go
- handler_claim_some_job.go
- handler_delete_job.go
- handler_delete_scheduler.go
- handler_get_job.go
- handler_get_scheduler.go
- handler_list_jobs.go
- handler_list_schedulers.go
- handler_post_scheduler.go
- handler_put_scheduler.go
- handler_queue_job.go
- handler_release_job.go
- handler_search_jobs.go
- handler_set_job_error.go
- handler_set_job_success.go
Click to show internal directories.
Click to hide internal directories.