Documentation
¶
Overview ¶
Package gen contains generated code for the job API.
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CreateJobResponse
- type DeleteJobByID204Response
- type DeleteJobByID400JSONResponse
- type DeleteJobByID401JSONResponse
- type DeleteJobByID403JSONResponse
- type DeleteJobByID404JSONResponse
- type DeleteJobByID500JSONResponse
- type DeleteJobByIDRequestObject
- type DeleteJobByIDResponseObject
- type EchoRouter
- type ErrorResponse
- type GetJobByID200JSONResponse
- type GetJobByID400JSONResponse
- type GetJobByID401JSONResponse
- type GetJobByID403JSONResponse
- type GetJobByID404JSONResponse
- type GetJobByID500JSONResponse
- type GetJobByIDRequestObject
- type GetJobByIDResponseObject
- type GetJobs200JSONResponse
- type GetJobs400JSONResponse
- type GetJobs401JSONResponse
- type GetJobs403JSONResponse
- type GetJobs500JSONResponse
- type GetJobsParams
- type GetJobsParamsStatus
- type GetJobsRequestObject
- type GetJobsResponseObject
- type JobDetailResponse
- type ListJobsResponse
- type RetryJobByID201JSONResponse
- type RetryJobByID400JSONResponse
- type RetryJobByID401JSONResponse
- type RetryJobByID403JSONResponse
- type RetryJobByID404JSONResponse
- type RetryJobByID500JSONResponse
- type RetryJobByIDJSONRequestBody
- type RetryJobByIDRequestObject
- type RetryJobByIDResponseObject
- type RetryJobRequest
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type CreateJobResponse ¶
type CreateJobResponse struct {
// JobId Unique identifier for the created job.
JobId openapi_types.UUID `json:"job_id"`
// Revision The KV revision number.
Revision *int64 `json:"revision,omitempty"`
// Status Initial status of the job.
Status string `json:"status"`
// Timestamp Creation timestamp.
Timestamp *string `json:"timestamp,omitempty"`
}
CreateJobResponse defines model for CreateJobResponse.
type DeleteJobByID204Response ¶
type DeleteJobByID204Response struct {
}
func (DeleteJobByID204Response) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID204Response) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByID400JSONResponse ¶
type DeleteJobByID400JSONResponse externalRef0.ErrorResponse
func (DeleteJobByID400JSONResponse) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID400JSONResponse) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByID401JSONResponse ¶
type DeleteJobByID401JSONResponse externalRef0.ErrorResponse
func (DeleteJobByID401JSONResponse) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID401JSONResponse) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByID403JSONResponse ¶
type DeleteJobByID403JSONResponse externalRef0.ErrorResponse
func (DeleteJobByID403JSONResponse) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID403JSONResponse) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByID404JSONResponse ¶
type DeleteJobByID404JSONResponse externalRef0.ErrorResponse
func (DeleteJobByID404JSONResponse) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID404JSONResponse) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByID500JSONResponse ¶
type DeleteJobByID500JSONResponse externalRef0.ErrorResponse
func (DeleteJobByID500JSONResponse) VisitDeleteJobByIDResponse ¶
func (response DeleteJobByID500JSONResponse) VisitDeleteJobByIDResponse(w http.ResponseWriter) error
type DeleteJobByIDRequestObject ¶
type DeleteJobByIDRequestObject struct {
Id openapi_types.UUID `json:"id"`
}
type DeleteJobByIDResponseObject ¶
type DeleteJobByIDResponseObject interface {
VisitDeleteJobByIDResponse(w http.ResponseWriter) error
}
type EchoRouter ¶
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type ErrorResponse ¶
type ErrorResponse = externalRef0.ErrorResponse
ErrorResponse defines model for ErrorResponse.
type GetJobByID200JSONResponse ¶
type GetJobByID200JSONResponse JobDetailResponse
func (GetJobByID200JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID200JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByID400JSONResponse ¶
type GetJobByID400JSONResponse externalRef0.ErrorResponse
func (GetJobByID400JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID400JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByID401JSONResponse ¶
type GetJobByID401JSONResponse externalRef0.ErrorResponse
func (GetJobByID401JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID401JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByID403JSONResponse ¶
type GetJobByID403JSONResponse externalRef0.ErrorResponse
func (GetJobByID403JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID403JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByID404JSONResponse ¶
type GetJobByID404JSONResponse externalRef0.ErrorResponse
func (GetJobByID404JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID404JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByID500JSONResponse ¶
type GetJobByID500JSONResponse externalRef0.ErrorResponse
func (GetJobByID500JSONResponse) VisitGetJobByIDResponse ¶
func (response GetJobByID500JSONResponse) VisitGetJobByIDResponse(w http.ResponseWriter) error
type GetJobByIDRequestObject ¶
type GetJobByIDRequestObject struct {
Id openapi_types.UUID `json:"id"`
}
type GetJobByIDResponseObject ¶
type GetJobByIDResponseObject interface {
VisitGetJobByIDResponse(w http.ResponseWriter) error
}
type GetJobs200JSONResponse ¶
type GetJobs200JSONResponse ListJobsResponse
func (GetJobs200JSONResponse) VisitGetJobsResponse ¶
func (response GetJobs200JSONResponse) VisitGetJobsResponse(w http.ResponseWriter) error
type GetJobs400JSONResponse ¶
type GetJobs400JSONResponse externalRef0.ErrorResponse
func (GetJobs400JSONResponse) VisitGetJobsResponse ¶
func (response GetJobs400JSONResponse) VisitGetJobsResponse(w http.ResponseWriter) error
type GetJobs401JSONResponse ¶
type GetJobs401JSONResponse externalRef0.ErrorResponse
func (GetJobs401JSONResponse) VisitGetJobsResponse ¶
func (response GetJobs401JSONResponse) VisitGetJobsResponse(w http.ResponseWriter) error
type GetJobs403JSONResponse ¶
type GetJobs403JSONResponse externalRef0.ErrorResponse
func (GetJobs403JSONResponse) VisitGetJobsResponse ¶
func (response GetJobs403JSONResponse) VisitGetJobsResponse(w http.ResponseWriter) error
type GetJobs500JSONResponse ¶
type GetJobs500JSONResponse externalRef0.ErrorResponse
func (GetJobs500JSONResponse) VisitGetJobsResponse ¶
func (response GetJobs500JSONResponse) VisitGetJobsResponse(w http.ResponseWriter) error
type GetJobsParams ¶
type GetJobsParams struct {
// Status Filter jobs by status.
Status *GetJobsParamsStatus `` /* 128-byte string literal not displayed */
// Limit Maximum number of jobs per page (1-100).
Limit *int `form:"limit,omitempty" json:"limit,omitempty" validate:"omitempty,min=1,max=100"`
// Offset Number of jobs to skip for pagination.
Offset *int `form:"offset,omitempty" json:"offset,omitempty" validate:"omitempty,min=0"`
}
GetJobsParams defines parameters for GetJobs.
type GetJobsParamsStatus ¶
type GetJobsParamsStatus string
GetJobsParamsStatus defines parameters for GetJobs.
const ( Completed GetJobsParamsStatus = "completed" Failed GetJobsParamsStatus = "failed" PartialFailure GetJobsParamsStatus = "partial_failure" Processing GetJobsParamsStatus = "processing" Submitted GetJobsParamsStatus = "submitted" )
Defines values for GetJobsParamsStatus.
type GetJobsRequestObject ¶
type GetJobsRequestObject struct {
Params GetJobsParams
}
type GetJobsResponseObject ¶
type GetJobsResponseObject interface {
VisitGetJobsResponse(w http.ResponseWriter) error
}
type JobDetailResponse ¶
type JobDetailResponse struct {
// AgentStates Per-agent processing state for broadcast jobs.
AgentStates *map[string]struct {
Duration *string `json:"duration,omitempty"`
Error *string `json:"error,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"agent_states,omitempty"`
// Changed Whether the operation modified system state. Null for pending/failed jobs; true/false for completed jobs.
Changed *bool `json:"changed"`
// Created Creation timestamp.
Created *string `json:"created,omitempty"`
// Error Error message if failed.
Error *string `json:"error,omitempty"`
// Hostname Agent hostname that processed the job.
Hostname *string `json:"hostname,omitempty"`
// Id Unique identifier of the job.
Id *openapi_types.UUID `json:"id,omitempty"`
// Operation The operation data.
Operation *map[string]interface{} `json:"operation,omitempty"`
// Responses Per-agent response data for broadcast jobs.
Responses *map[string]struct {
Changed *bool `json:"changed"`
// Data Agent result data.
Data interface{} `json:"data,omitempty"`
Error *string `json:"error,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"responses,omitempty"`
// Result The result data if completed.
Result interface{} `json:"result,omitempty"`
// Status Current status of the job.
Status *string `json:"status,omitempty"`
// Timeline Chronological sequence of job lifecycle events.
Timeline *[]struct {
// Error Error details if applicable.
Error *string `json:"error,omitempty"`
// Event Event type (submitted, acknowledged, started, completed, failed, retried).
Event *string `json:"event,omitempty"`
// Hostname Agent or source that generated the event.
Hostname *string `json:"hostname,omitempty"`
// Message Human-readable description of the event.
Message *string `json:"message,omitempty"`
// Timestamp ISO 8601 timestamp of the event.
Timestamp *string `json:"timestamp,omitempty"`
} `json:"timeline,omitempty"`
// UpdatedAt Last update timestamp.
UpdatedAt *string `json:"updated_at,omitempty"`
}
JobDetailResponse defines model for JobDetailResponse.
type ListJobsResponse ¶
type ListJobsResponse struct {
Items *[]JobDetailResponse `json:"items,omitempty"`
// StatusCounts Count of all jobs by status (submitted, processing, completed, failed, partial_failure). Derived from key names during the listing pass — no extra reads.
StatusCounts *map[string]int `json:"status_counts,omitempty"`
// TotalItems Total number of jobs matching the filter.
TotalItems *int `json:"total_items,omitempty"`
}
ListJobsResponse defines model for ListJobsResponse.
type RetryJobByID201JSONResponse ¶
type RetryJobByID201JSONResponse CreateJobResponse
func (RetryJobByID201JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID201JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByID400JSONResponse ¶
type RetryJobByID400JSONResponse externalRef0.ErrorResponse
func (RetryJobByID400JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID400JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByID401JSONResponse ¶
type RetryJobByID401JSONResponse externalRef0.ErrorResponse
func (RetryJobByID401JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID401JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByID403JSONResponse ¶
type RetryJobByID403JSONResponse externalRef0.ErrorResponse
func (RetryJobByID403JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID403JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByID404JSONResponse ¶
type RetryJobByID404JSONResponse externalRef0.ErrorResponse
func (RetryJobByID404JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID404JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByID500JSONResponse ¶
type RetryJobByID500JSONResponse externalRef0.ErrorResponse
func (RetryJobByID500JSONResponse) VisitRetryJobByIDResponse ¶
func (response RetryJobByID500JSONResponse) VisitRetryJobByIDResponse(w http.ResponseWriter) error
type RetryJobByIDJSONRequestBody ¶
type RetryJobByIDJSONRequestBody = RetryJobRequest
RetryJobByIDJSONRequestBody defines body for RetryJobByID for application/json ContentType.
type RetryJobByIDRequestObject ¶
type RetryJobByIDRequestObject struct {
Id openapi_types.UUID `json:"id"`
Body *RetryJobByIDJSONRequestBody
}
type RetryJobByIDResponseObject ¶
type RetryJobByIDResponseObject interface {
VisitRetryJobByIDResponse(w http.ResponseWriter) error
}
type RetryJobRequest ¶
type RetryJobRequest struct {
// TargetHostname Override target hostname for the retried job. Defaults to _any if not specified.
TargetHostname *string `json:"target_hostname,omitempty" validate:"omitempty,min=1,valid_target"`
}
RetryJobRequest defines model for RetryJobRequest.
type ServerInterface ¶
type ServerInterface interface {
// List jobs
// (GET /api/job)
GetJobs(ctx echo.Context, params GetJobsParams) error
// Delete a job
// (DELETE /api/job/{id})
DeleteJobByID(ctx echo.Context, id openapi_types.UUID) error
// Get job detail
// (GET /api/job/{id})
GetJobByID(ctx echo.Context, id openapi_types.UUID) error
// Retry a job
// (POST /api/job/{id}/retry)
RetryJobByID(ctx echo.Context, id openapi_types.UUID) error
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) DeleteJobByID ¶
func (w *ServerInterfaceWrapper) DeleteJobByID(ctx echo.Context) error
DeleteJobByID converts echo context to params.
func (*ServerInterfaceWrapper) GetJobByID ¶
func (w *ServerInterfaceWrapper) GetJobByID(ctx echo.Context) error
GetJobByID converts echo context to params.
func (*ServerInterfaceWrapper) GetJobs ¶
func (w *ServerInterfaceWrapper) GetJobs(ctx echo.Context) error
GetJobs converts echo context to params.
func (*ServerInterfaceWrapper) RetryJobByID ¶
func (w *ServerInterfaceWrapper) RetryJobByID(ctx echo.Context) error
RetryJobByID converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List jobs
// (GET /api/job)
GetJobs(ctx context.Context, request GetJobsRequestObject) (GetJobsResponseObject, error)
// Delete a job
// (DELETE /api/job/{id})
DeleteJobByID(ctx context.Context, request DeleteJobByIDRequestObject) (DeleteJobByIDResponseObject, error)
// Get job detail
// (GET /api/job/{id})
GetJobByID(ctx context.Context, request GetJobByIDRequestObject) (GetJobByIDResponseObject, error)
// Retry a job
// (POST /api/job/{id}/retry)
RetryJobByID(ctx context.Context, request RetryJobByIDRequestObject) (RetryJobByIDResponseObject, error)
}
StrictServerInterface represents all server handlers.