Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Package client is a Go client for the Workly API, generated from api/openapi.yaml. The CLI uses it; it isn't public API.
Index ¶
- func NewCancelPendingTasksRequest(server string, queue QueueName) (*http.Request, error)
- func NewCancelRunRequest(server string, id RunID) (*http.Request, error)
- func NewCancelTaskRequest(server string, id TaskID) (*http.Request, error)
- func NewCloseGroupRequest(server string, id GroupID) (*http.Request, error)
- func NewCreateAlertChannelRequest(server string, body CreateAlertChannelJSONRequestBody) (*http.Request, error)
- func NewCreateAlertChannelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateGroupRequest(server string, body CreateGroupJSONRequestBody) (*http.Request, error)
- func NewCreateGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateTaskRequest(server string, queue QueueName, params *CreateTaskParams, ...) (*http.Request, error)
- func NewCreateTaskRequestWithBody(server string, queue QueueName, params *CreateTaskParams, contentType string, ...) (*http.Request, error)
- func NewCreateTasksRequest(server string, queue QueueName, params *CreateTasksParams, ...) (*http.Request, error)
- func NewCreateTasksRequestWithBody(server string, queue QueueName, params *CreateTasksParams, contentType string, ...) (*http.Request, error)
- func NewDeleteAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)
- func NewDeleteQueueRequest(server string, queue QueueName) (*http.Request, error)
- func NewDeleteScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
- func NewGetActivityRequest(server string, params *GetActivityParams) (*http.Request, error)
- func NewGetGroupRequest(server string, id GroupID) (*http.Request, error)
- func NewGetHealthzRequest(server string) (*http.Request, error)
- func NewGetQueueActivityRequest(server string, queue QueueName, params *GetQueueActivityParams) (*http.Request, error)
- func NewGetQueueFailuresRequest(server string, queue QueueName, params *GetQueueFailuresParams) (*http.Request, error)
- func NewGetQueueRequest(server string, queue QueueName) (*http.Request, error)
- func NewGetReadyzRequest(server string) (*http.Request, error)
- func NewGetRunDeliveryRequest(server string, id RunID) (*http.Request, error)
- func NewGetRunRequest(server string, id RunID) (*http.Request, error)
- func NewGetScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
- func NewGetTaskDeliveryRequest(server string, id TaskID) (*http.Request, error)
- func NewGetTaskRequest(server string, id TaskID) (*http.Request, error)
- func NewListAlertChannelsRequest(server string) (*http.Request, error)
- func NewListAttemptsRequest(server string, id TaskID) (*http.Request, error)
- func NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)
- func NewListQueuesRequest(server string) (*http.Request, error)
- func NewListRunAttemptsRequest(server string, id RunID) (*http.Request, error)
- func NewListRunsRequest(server string, schedule ScheduleName, params *ListRunsParams) (*http.Request, error)
- func NewListSchedulesRequest(server string) (*http.Request, error)
- func NewListTasksRequest(server string, queue QueueName, params *ListTasksParams) (*http.Request, error)
- func NewPauseQueueRequest(server string, queue QueueName) (*http.Request, error)
- func NewPauseScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
- func NewPreviewCronRequest(server string, params *PreviewCronParams) (*http.Request, error)
- func NewPutQueueRequest(server string, queue QueueName, body PutQueueJSONRequestBody) (*http.Request, error)
- func NewPutQueueRequestWithBody(server string, queue QueueName, contentType string, body io.Reader) (*http.Request, error)
- func NewPutScheduleRequest(server string, schedule ScheduleName, body PutScheduleJSONRequestBody) (*http.Request, error)
- func NewPutScheduleRequestWithBody(server string, schedule ScheduleName, contentType string, body io.Reader) (*http.Request, error)
- func NewResumeQueueRequest(server string, queue QueueName) (*http.Request, error)
- func NewResumeScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
- func NewRetryFailedTasksRequest(server string, queue QueueName, params *RetryFailedTasksParams) (*http.Request, error)
- func NewRetryRunRequest(server string, id RunID) (*http.Request, error)
- func NewRetryTaskRequest(server string, id TaskID) (*http.Request, error)
- func NewSearchTasksRequest(server string, params *SearchTasksParams) (*http.Request, error)
- func NewTestAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)
- func NewTriggerScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
- type Activity
- type ActivityBucket
- type ActivityRange
- type AlertChannel
- type AlertChannelID
- type AlertChannelList
- type AlertChannelType
- type Attempt
- type AttemptList
- type BatchEnqueueRequest
- type BatchEnqueueResponse
- type BatchEnqueueResult
- type CancelPendingResult
- type CancelPendingTasksResponse
- func (r CancelPendingTasksResponse) ContentType() string
- func (r CancelPendingTasksResponse) GetBody() []byte
- func (r CancelPendingTasksResponse) GetJSON200() *CancelPendingResult
- func (r CancelPendingTasksResponse) GetJSONDefault() *Error
- func (r CancelPendingTasksResponse) Status() string
- func (r CancelPendingTasksResponse) StatusCode() int
- type CancelRunResponse
- type CancelTaskResponse
- type Client
- func (c *Client) CancelPendingTasks(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CancelRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CancelTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CloseGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateAlertChannel(ctx context.Context, body CreateAlertChannelJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAlertChannelWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateTask(ctx context.Context, queue QueueName, params *CreateTaskParams, ...) (*http.Response, error)
- func (c *Client) CreateTaskWithBody(ctx context.Context, queue QueueName, params *CreateTaskParams, ...) (*http.Response, error)
- func (c *Client) CreateTasks(ctx context.Context, queue QueueName, params *CreateTasksParams, ...) (*http.Response, error)
- func (c *Client) CreateTasksWithBody(ctx context.Context, queue QueueName, params *CreateTasksParams, ...) (*http.Response, error)
- func (c *Client) DeleteAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetActivity(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetHealthz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetQueueActivity(ctx context.Context, queue QueueName, params *GetQueueActivityParams, ...) (*http.Response, error)
- func (c *Client) GetQueueFailures(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, ...) (*http.Response, error)
- func (c *Client) GetReadyz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetRunDelivery(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTaskDelivery(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAlertChannels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAttempts(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListQueues(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListRunAttempts(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListRuns(ctx context.Context, schedule ScheduleName, params *ListRunsParams, ...) (*http.Response, error)
- func (c *Client) ListSchedules(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListTasks(ctx context.Context, queue QueueName, params *ListTasksParams, ...) (*http.Response, error)
- func (c *Client) PauseQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PauseSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PreviewCron(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PutQueue(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PutQueueWithBody(ctx context.Context, queue QueueName, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PutSchedule(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PutScheduleWithBody(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ResumeQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ResumeSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetryFailedTasks(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, ...) (*http.Response, error)
- func (c *Client) RetryRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetryTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchTasks(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) TestAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) TriggerSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelPendingTasksWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*CancelPendingTasksResponse, error)
- func (c *ClientWithResponses) CancelRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*CancelRunResponse, error)
- func (c *ClientWithResponses) CancelTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*CancelTaskResponse, error)
- func (c *ClientWithResponses) CloseGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*CloseGroupResponse, error)
- func (c *ClientWithResponses) CreateAlertChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAlertChannelResponse, error)
- func (c *ClientWithResponses) CreateAlertChannelWithResponse(ctx context.Context, body CreateAlertChannelJSONRequestBody, ...) (*CreateAlertChannelResponse, error)
- func (c *ClientWithResponses) CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateGroupResponse, error)
- func (c *ClientWithResponses) CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, ...) (*CreateGroupResponse, error)
- func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) CreateTasksWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, ...) (*CreateTasksResponse, error)
- func (c *ClientWithResponses) CreateTasksWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, ...) (*CreateTasksResponse, error)
- func (c *ClientWithResponses) DeleteAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*DeleteAlertChannelResponse, error)
- func (c *ClientWithResponses) DeleteQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*DeleteQueueResponse, error)
- func (c *ClientWithResponses) DeleteScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*DeleteScheduleResponse, error)
- func (c *ClientWithResponses) GetActivityWithResponse(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
- func (c *ClientWithResponses) GetGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
- func (c *ClientWithResponses) GetHealthzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthzResponse, error)
- func (c *ClientWithResponses) GetQueueActivityWithResponse(ctx context.Context, queue QueueName, params *GetQueueActivityParams, ...) (*GetQueueActivityResponse, error)
- func (c *ClientWithResponses) GetQueueFailuresWithResponse(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, ...) (*GetQueueFailuresResponse, error)
- func (c *ClientWithResponses) GetQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*GetQueueResponse, error)
- func (c *ClientWithResponses) GetReadyzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadyzResponse, error)
- func (c *ClientWithResponses) GetRunDeliveryWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunDeliveryResponse, error)
- func (c *ClientWithResponses) GetRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunResponse, error)
- func (c *ClientWithResponses) GetScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*GetScheduleResponse, error)
- func (c *ClientWithResponses) GetTaskDeliveryWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskDeliveryResponse, error)
- func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)
- func (c *ClientWithResponses) ListAlertChannelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAlertChannelsResponse, error)
- func (c *ClientWithResponses) ListAttemptsWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*ListAttemptsResponse, error)
- func (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
- func (c *ClientWithResponses) ListQueuesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueuesResponse, error)
- func (c *ClientWithResponses) ListRunAttemptsWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*ListRunAttemptsResponse, error)
- func (c *ClientWithResponses) ListRunsWithResponse(ctx context.Context, schedule ScheduleName, params *ListRunsParams, ...) (*ListRunsResponse, error)
- func (c *ClientWithResponses) ListSchedulesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error)
- func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, queue QueueName, params *ListTasksParams, ...) (*ListTasksResponse, error)
- func (c *ClientWithResponses) PauseQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*PauseQueueResponse, error)
- func (c *ClientWithResponses) PauseScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*PauseScheduleResponse, error)
- func (c *ClientWithResponses) PreviewCronWithResponse(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*PreviewCronResponse, error)
- func (c *ClientWithResponses) PutQueueWithBodyWithResponse(ctx context.Context, queue QueueName, contentType string, body io.Reader, ...) (*PutQueueResponse, error)
- func (c *ClientWithResponses) PutQueueWithResponse(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, ...) (*PutQueueResponse, error)
- func (c *ClientWithResponses) PutScheduleWithBodyWithResponse(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, ...) (*PutScheduleResponse, error)
- func (c *ClientWithResponses) PutScheduleWithResponse(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, ...) (*PutScheduleResponse, error)
- func (c *ClientWithResponses) ResumeQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*ResumeQueueResponse, error)
- func (c *ClientWithResponses) ResumeScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*ResumeScheduleResponse, error)
- func (c *ClientWithResponses) RetryFailedTasksWithResponse(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, ...) (*RetryFailedTasksResponse, error)
- func (c *ClientWithResponses) RetryRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*RetryRunResponse, error)
- func (c *ClientWithResponses) RetryTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*RetryTaskResponse, error)
- func (c *ClientWithResponses) SearchTasksWithResponse(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*SearchTasksResponse, error)
- func (c *ClientWithResponses) TestAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*TestAlertChannelResponse, error)
- func (c *ClientWithResponses) TriggerScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*TriggerScheduleResponse, error)
- type ClientWithResponsesInterface
- type CloseGroupResponse
- type CreateAlertChannelJSONRequestBody
- type CreateAlertChannelResponse
- func (r CreateAlertChannelResponse) ContentType() string
- func (r CreateAlertChannelResponse) GetBody() []byte
- func (r CreateAlertChannelResponse) GetJSON201() *AlertChannel
- func (r CreateAlertChannelResponse) GetJSONDefault() *Error
- func (r CreateAlertChannelResponse) Status() string
- func (r CreateAlertChannelResponse) StatusCode() int
- type CreateGroupJSONRequestBody
- type CreateGroupResponse
- func (r CreateGroupResponse) ContentType() string
- func (r CreateGroupResponse) GetBody() []byte
- func (r CreateGroupResponse) GetJSON200() *Group
- func (r CreateGroupResponse) GetJSON201() *Group
- func (r CreateGroupResponse) GetJSONDefault() *Error
- func (r CreateGroupResponse) Status() string
- func (r CreateGroupResponse) StatusCode() int
- type CreateTaskJSONRequestBody
- type CreateTaskParams
- type CreateTaskResponse
- func (r CreateTaskResponse) ContentType() string
- func (r CreateTaskResponse) GetBody() []byte
- func (r CreateTaskResponse) GetJSON200() *Task
- func (r CreateTaskResponse) GetJSON201() *Task
- func (r CreateTaskResponse) GetJSONDefault() *Error
- func (r CreateTaskResponse) Status() string
- func (r CreateTaskResponse) StatusCode() int
- type CreateTasksJSONRequestBody
- type CreateTasksParams
- type CreateTasksResponse
- func (r CreateTasksResponse) ContentType() string
- func (r CreateTasksResponse) GetBody() []byte
- func (r CreateTasksResponse) GetJSON200() *BatchEnqueueResponse
- func (r CreateTasksResponse) GetJSONDefault() *Error
- func (r CreateTasksResponse) Status() string
- func (r CreateTasksResponse) StatusCode() int
- type CronPreview
- type Cursor
- type DeleteAlertChannelResponse
- type DeleteQueueResponse
- type DeleteScheduleResponse
- type Delivery
- type EnqueueRequest
- type Error
- type ErrorBody
- type FailureGroup
- type GetActivityParams
- type GetActivityParamsRange
- type GetActivityResponse
- type GetGroupResponse
- type GetHealthzResponse
- type GetQueueActivityParams
- type GetQueueActivityResponse
- func (r GetQueueActivityResponse) ContentType() string
- func (r GetQueueActivityResponse) GetBody() []byte
- func (r GetQueueActivityResponse) GetJSON200() *QueueActivity
- func (r GetQueueActivityResponse) GetJSONDefault() *Error
- func (r GetQueueActivityResponse) Status() string
- func (r GetQueueActivityResponse) StatusCode() int
- type GetQueueFailuresParams
- type GetQueueFailuresResponse
- func (r GetQueueFailuresResponse) ContentType() string
- func (r GetQueueFailuresResponse) GetBody() []byte
- func (r GetQueueFailuresResponse) GetJSON200() *QueueFailures
- func (r GetQueueFailuresResponse) GetJSONDefault() *Error
- func (r GetQueueFailuresResponse) Status() string
- func (r GetQueueFailuresResponse) StatusCode() int
- type GetQueueResponse
- type GetReadyzResponse
- type GetRunDeliveryResponse
- func (r GetRunDeliveryResponse) ContentType() string
- func (r GetRunDeliveryResponse) GetBody() []byte
- func (r GetRunDeliveryResponse) GetJSON200() *Delivery
- func (r GetRunDeliveryResponse) GetJSONDefault() *Error
- func (r GetRunDeliveryResponse) Status() string
- func (r GetRunDeliveryResponse) StatusCode() int
- type GetRunResponse
- type GetScheduleResponse
- type GetTaskDeliveryResponse
- func (r GetTaskDeliveryResponse) ContentType() string
- func (r GetTaskDeliveryResponse) GetBody() []byte
- func (r GetTaskDeliveryResponse) GetJSON200() *Delivery
- func (r GetTaskDeliveryResponse) GetJSONDefault() *Error
- func (r GetTaskDeliveryResponse) Status() string
- func (r GetTaskDeliveryResponse) StatusCode() int
- type GetTaskResponse
- type Group
- type GroupCallback
- type GroupID
- type GroupList
- type GroupStatus
- type GroupSummary
- type HTTPMethod
- type Health
- type HttpRequestDoer
- type LastError
- type LastRun
- type Limit
- type ListAlertChannelsResponse
- func (r ListAlertChannelsResponse) ContentType() string
- func (r ListAlertChannelsResponse) GetBody() []byte
- func (r ListAlertChannelsResponse) GetJSON200() *AlertChannelList
- func (r ListAlertChannelsResponse) GetJSONDefault() *Error
- func (r ListAlertChannelsResponse) Status() string
- func (r ListAlertChannelsResponse) StatusCode() int
- type ListAttemptsResponse
- func (r ListAttemptsResponse) ContentType() string
- func (r ListAttemptsResponse) GetBody() []byte
- func (r ListAttemptsResponse) GetJSON200() *AttemptList
- func (r ListAttemptsResponse) GetJSONDefault() *Error
- func (r ListAttemptsResponse) Status() string
- func (r ListAttemptsResponse) StatusCode() int
- type ListGroupsParams
- type ListGroupsResponse
- type ListQueuesResponse
- type ListRunAttemptsResponse
- func (r ListRunAttemptsResponse) ContentType() string
- func (r ListRunAttemptsResponse) GetBody() []byte
- func (r ListRunAttemptsResponse) GetJSON200() *AttemptList
- func (r ListRunAttemptsResponse) GetJSONDefault() *Error
- func (r ListRunAttemptsResponse) Status() string
- func (r ListRunAttemptsResponse) StatusCode() int
- type ListRunsParams
- type ListRunsResponse
- type ListSchedulesResponse
- func (r ListSchedulesResponse) ContentType() string
- func (r ListSchedulesResponse) GetBody() []byte
- func (r ListSchedulesResponse) GetJSON200() *ScheduleList
- func (r ListSchedulesResponse) GetJSONDefault() *Error
- func (r ListSchedulesResponse) Status() string
- func (r ListSchedulesResponse) StatusCode() int
- type ListTasksParams
- type ListTasksParamsOrder
- type ListTasksParamsSort
- type ListTasksResponse
- type MissedPolicy
- type NewAlertChannel
- type NewGroup
- type Outcome
- type OverlapPolicy
- type PauseQueueResponse
- type PauseScheduleResponse
- func (r PauseScheduleResponse) ContentType() string
- func (r PauseScheduleResponse) GetBody() []byte
- func (r PauseScheduleResponse) GetJSON200() *Schedule
- func (r PauseScheduleResponse) GetJSONDefault() *Error
- func (r PauseScheduleResponse) Status() string
- func (r PauseScheduleResponse) StatusCode() int
- type PreviewCronParams
- type PreviewCronResponse
- type PutQueueJSONRequestBody
- type PutQueueResponse
- func (r PutQueueResponse) ContentType() string
- func (r PutQueueResponse) GetBody() []byte
- func (r PutQueueResponse) GetJSON200() *Queue
- func (r PutQueueResponse) GetJSON201() *Queue
- func (r PutQueueResponse) GetJSONDefault() *Error
- func (r PutQueueResponse) Status() string
- func (r PutQueueResponse) StatusCode() int
- type PutScheduleJSONRequestBody
- type PutScheduleResponse
- func (r PutScheduleResponse) ContentType() string
- func (r PutScheduleResponse) GetBody() []byte
- func (r PutScheduleResponse) GetJSON200() *Schedule
- func (r PutScheduleResponse) GetJSON201() *Schedule
- func (r PutScheduleResponse) GetJSONDefault() *Error
- func (r PutScheduleResponse) Status() string
- func (r PutScheduleResponse) StatusCode() int
- type Queue
- type QueueActivity
- type QueueConfig
- type QueueFailures
- type QueueList
- type QueueName
- type QueueStats
- type RequestEditorFn
- type ResumeQueueResponse
- type ResumeScheduleResponse
- func (r ResumeScheduleResponse) ContentType() string
- func (r ResumeScheduleResponse) GetBody() []byte
- func (r ResumeScheduleResponse) GetJSON200() *Schedule
- func (r ResumeScheduleResponse) GetJSONDefault() *Error
- func (r ResumeScheduleResponse) Status() string
- func (r ResumeScheduleResponse) StatusCode() int
- type RetryFailedResult
- type RetryFailedTasksParams
- type RetryFailedTasksResponse
- func (r RetryFailedTasksResponse) ContentType() string
- func (r RetryFailedTasksResponse) GetBody() []byte
- func (r RetryFailedTasksResponse) GetJSON200() *RetryFailedResult
- func (r RetryFailedTasksResponse) GetJSONDefault() *Error
- func (r RetryFailedTasksResponse) Status() string
- func (r RetryFailedTasksResponse) StatusCode() int
- type RetryRunResponse
- type RetryTaskResponse
- type Run
- type RunID
- type RunList
- type RunState
- type RunTrigger
- type Schedule
- type ScheduleConfig
- type ScheduleList
- type ScheduleName
- type SearchTasksParams
- type SearchTasksParamsOrder
- type SearchTasksParamsSort
- type SearchTasksResponse
- type SkipReason
- type SortOrder
- type Task
- type TaskID
- type TaskList
- type TaskSort
- type TaskState
- type TestAlertChannelResponse
- type TriggerScheduleResponse
- func (r TriggerScheduleResponse) ContentType() string
- func (r TriggerScheduleResponse) GetBody() []byte
- func (r TriggerScheduleResponse) GetJSON201() *Run
- func (r TriggerScheduleResponse) GetJSONDefault() *Error
- func (r TriggerScheduleResponse) Status() string
- func (r TriggerScheduleResponse) StatusCode() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCancelPendingTasksRequest ¶
NewCancelPendingTasksRequest constructs an http.Request for the CancelPendingTasks method
func NewCancelRunRequest ¶
NewCancelRunRequest constructs an http.Request for the CancelRun method
func NewCancelTaskRequest ¶
NewCancelTaskRequest constructs an http.Request for the CancelTask method
func NewCloseGroupRequest ¶ added in v0.2.0
NewCloseGroupRequest constructs an http.Request for the CloseGroup method
func NewCreateAlertChannelRequest ¶
func NewCreateAlertChannelRequest(server string, body CreateAlertChannelJSONRequestBody) (*http.Request, error)
NewCreateAlertChannelRequest calls the generic CreateAlertChannel builder with application/json body
func NewCreateAlertChannelRequestWithBody ¶
func NewCreateAlertChannelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAlertChannelRequestWithBody constructs an http.Request for the CreateAlertChannel method, with any body, and a specified content type
func NewCreateGroupRequest ¶ added in v0.2.0
func NewCreateGroupRequest(server string, body CreateGroupJSONRequestBody) (*http.Request, error)
NewCreateGroupRequest calls the generic CreateGroup builder with application/json body
func NewCreateGroupRequestWithBody ¶ added in v0.2.0
func NewCreateGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateGroupRequestWithBody constructs an http.Request for the CreateGroup method, with any body, and a specified content type
func NewCreateTaskRequest ¶
func NewCreateTaskRequest(server string, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody) (*http.Request, error)
NewCreateTaskRequest calls the generic CreateTask builder with application/json body
func NewCreateTaskRequestWithBody ¶
func NewCreateTaskRequestWithBody(server string, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateTaskRequestWithBody constructs an http.Request for the CreateTask method, with any body, and a specified content type
func NewCreateTasksRequest ¶
func NewCreateTasksRequest(server string, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody) (*http.Request, error)
NewCreateTasksRequest calls the generic CreateTasks builder with application/json body
func NewCreateTasksRequestWithBody ¶
func NewCreateTasksRequestWithBody(server string, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateTasksRequestWithBody constructs an http.Request for the CreateTasks method, with any body, and a specified content type
func NewDeleteAlertChannelRequest ¶
func NewDeleteAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)
NewDeleteAlertChannelRequest constructs an http.Request for the DeleteAlertChannel method
func NewDeleteQueueRequest ¶
NewDeleteQueueRequest constructs an http.Request for the DeleteQueue method
func NewDeleteScheduleRequest ¶
func NewDeleteScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
NewDeleteScheduleRequest constructs an http.Request for the DeleteSchedule method
func NewGetActivityRequest ¶
func NewGetActivityRequest(server string, params *GetActivityParams) (*http.Request, error)
NewGetActivityRequest constructs an http.Request for the GetActivity method
func NewGetGroupRequest ¶ added in v0.2.0
NewGetGroupRequest constructs an http.Request for the GetGroup method
func NewGetHealthzRequest ¶
NewGetHealthzRequest constructs an http.Request for the GetHealthz method
func NewGetQueueActivityRequest ¶
func NewGetQueueActivityRequest(server string, queue QueueName, params *GetQueueActivityParams) (*http.Request, error)
NewGetQueueActivityRequest constructs an http.Request for the GetQueueActivity method
func NewGetQueueFailuresRequest ¶
func NewGetQueueFailuresRequest(server string, queue QueueName, params *GetQueueFailuresParams) (*http.Request, error)
NewGetQueueFailuresRequest constructs an http.Request for the GetQueueFailures method
func NewGetQueueRequest ¶
NewGetQueueRequest constructs an http.Request for the GetQueue method
func NewGetReadyzRequest ¶
NewGetReadyzRequest constructs an http.Request for the GetReadyz method
func NewGetRunDeliveryRequest ¶
NewGetRunDeliveryRequest constructs an http.Request for the GetRunDelivery method
func NewGetRunRequest ¶
NewGetRunRequest constructs an http.Request for the GetRun method
func NewGetScheduleRequest ¶
func NewGetScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
NewGetScheduleRequest constructs an http.Request for the GetSchedule method
func NewGetTaskDeliveryRequest ¶
NewGetTaskDeliveryRequest constructs an http.Request for the GetTaskDelivery method
func NewGetTaskRequest ¶
NewGetTaskRequest constructs an http.Request for the GetTask method
func NewListAlertChannelsRequest ¶
NewListAlertChannelsRequest constructs an http.Request for the ListAlertChannels method
func NewListAttemptsRequest ¶
NewListAttemptsRequest constructs an http.Request for the ListAttempts method
func NewListGroupsRequest ¶ added in v0.2.0
func NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)
NewListGroupsRequest constructs an http.Request for the ListGroups method
func NewListQueuesRequest ¶
NewListQueuesRequest constructs an http.Request for the ListQueues method
func NewListRunAttemptsRequest ¶
NewListRunAttemptsRequest constructs an http.Request for the ListRunAttempts method
func NewListRunsRequest ¶
func NewListRunsRequest(server string, schedule ScheduleName, params *ListRunsParams) (*http.Request, error)
NewListRunsRequest constructs an http.Request for the ListRuns method
func NewListSchedulesRequest ¶
NewListSchedulesRequest constructs an http.Request for the ListSchedules method
func NewListTasksRequest ¶
func NewListTasksRequest(server string, queue QueueName, params *ListTasksParams) (*http.Request, error)
NewListTasksRequest constructs an http.Request for the ListTasks method
func NewPauseQueueRequest ¶
NewPauseQueueRequest constructs an http.Request for the PauseQueue method
func NewPauseScheduleRequest ¶
func NewPauseScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
NewPauseScheduleRequest constructs an http.Request for the PauseSchedule method
func NewPreviewCronRequest ¶
func NewPreviewCronRequest(server string, params *PreviewCronParams) (*http.Request, error)
NewPreviewCronRequest constructs an http.Request for the PreviewCron method
func NewPutQueueRequest ¶
func NewPutQueueRequest(server string, queue QueueName, body PutQueueJSONRequestBody) (*http.Request, error)
NewPutQueueRequest calls the generic PutQueue builder with application/json body
func NewPutQueueRequestWithBody ¶
func NewPutQueueRequestWithBody(server string, queue QueueName, contentType string, body io.Reader) (*http.Request, error)
NewPutQueueRequestWithBody constructs an http.Request for the PutQueue method, with any body, and a specified content type
func NewPutScheduleRequest ¶
func NewPutScheduleRequest(server string, schedule ScheduleName, body PutScheduleJSONRequestBody) (*http.Request, error)
NewPutScheduleRequest calls the generic PutSchedule builder with application/json body
func NewPutScheduleRequestWithBody ¶
func NewPutScheduleRequestWithBody(server string, schedule ScheduleName, contentType string, body io.Reader) (*http.Request, error)
NewPutScheduleRequestWithBody constructs an http.Request for the PutSchedule method, with any body, and a specified content type
func NewResumeQueueRequest ¶
NewResumeQueueRequest constructs an http.Request for the ResumeQueue method
func NewResumeScheduleRequest ¶
func NewResumeScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
NewResumeScheduleRequest constructs an http.Request for the ResumeSchedule method
func NewRetryFailedTasksRequest ¶
func NewRetryFailedTasksRequest(server string, queue QueueName, params *RetryFailedTasksParams) (*http.Request, error)
NewRetryFailedTasksRequest constructs an http.Request for the RetryFailedTasks method
func NewRetryRunRequest ¶
NewRetryRunRequest constructs an http.Request for the RetryRun method
func NewRetryTaskRequest ¶
NewRetryTaskRequest constructs an http.Request for the RetryTask method
func NewSearchTasksRequest ¶
func NewSearchTasksRequest(server string, params *SearchTasksParams) (*http.Request, error)
NewSearchTasksRequest constructs an http.Request for the SearchTasks method
func NewTestAlertChannelRequest ¶
func NewTestAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)
NewTestAlertChannelRequest constructs an http.Request for the TestAlertChannel method
func NewTriggerScheduleRequest ¶
func NewTriggerScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)
NewTriggerScheduleRequest constructs an http.Request for the TriggerSchedule method
Types ¶
type Activity ¶
type Activity struct {
BucketSeconds int `json:"bucket_seconds"`
Buckets []ActivityBucket `json:"buckets"`
Range ActivityRange `json:"range"`
// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).
// Absent if it keeps them forever.
RetentionSeconds *float64 `json:"retention_seconds,omitempty"`
}
Activity defines model for Activity.
type ActivityBucket ¶
type ActivityBucket struct {
// Counts Tasks created in the bucket, by queue; queues with none are left out.
Counts map[string]int `json:"counts"`
Start time.Time `json:"start"`
}
ActivityBucket defines model for ActivityBucket.
type ActivityRange ¶
type ActivityRange string
ActivityRange defines model for Activity.Range.
const ( ActivityRangeN1h ActivityRange = "1h" ActivityRangeN24h ActivityRange = "24h" ActivityRangeN7d ActivityRange = "7d" )
Defines values for ActivityRange.
func (ActivityRange) Valid ¶
func (e ActivityRange) Valid() bool
Valid indicates whether the value is a known member of the ActivityRange enum.
type AlertChannel ¶
type AlertChannel struct {
CreatedAt time.Time `json:"created_at"`
// Id Example: ach_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A
Id string `json:"id"`
// Target The email address, or the Slack webhook URL with its secret part
// hidden.
Target string `json:"target"`
Type AlertChannelType `json:"type"`
}
AlertChannel defines model for AlertChannel.
type AlertChannelList ¶
type AlertChannelList struct {
Channels []AlertChannel `json:"channels"`
// EmailEnabled Whether this server can send email, so email channels can be added.
EmailEnabled bool `json:"email_enabled"`
}
AlertChannelList defines model for AlertChannelList.
type AlertChannelType ¶
type AlertChannelType string
AlertChannelType defines model for AlertChannelType.
const ( Email AlertChannelType = "email" Slack AlertChannelType = "slack" )
Defines values for AlertChannelType.
func (AlertChannelType) Valid ¶
func (e AlertChannelType) Valid() bool
Valid indicates whether the value is a known member of the AlertChannelType enum.
type Attempt ¶
type Attempt struct {
DurationMs int `json:"duration_ms"`
Error *string `json:"error,omitempty"`
FinishedAt time.Time `json:"finished_at"`
Id string `json:"id"`
Number int `json:"number"`
// Outcome How a delivery attempt ended. `lost` means the result is unknown: the
// dispatcher crashed or shut down mid-delivery, and the endpoint may
// have processed the request.
Outcome Outcome `json:"outcome"`
// ResponseBody The first 4 KB of the response body.
ResponseBody *string `json:"response_body,omitempty"`
// ResponseHeaders Selected response headers (Content-Type, Retry-After, Location).
ResponseHeaders map[string]string `json:"response_headers"`
// RetriedAt Set when the task or run was retried by hand between the previous
// attempt and this one: when that happened. Absent for automatic
// retries.
RetriedAt *time.Time `json:"retried_at,omitempty"`
StartedAt time.Time `json:"started_at"`
// StatusCode Absent if there was no response.
StatusCode *int `json:"status_code,omitempty"`
}
Attempt defines model for Attempt.
type AttemptList ¶
type AttemptList struct {
Attempts []Attempt `json:"attempts"`
}
AttemptList defines model for AttemptList.
type BatchEnqueueRequest ¶
type BatchEnqueueRequest struct {
Tasks []EnqueueRequest `json:"tasks"`
}
BatchEnqueueRequest defines model for BatchEnqueueRequest.
type BatchEnqueueResponse ¶
type BatchEnqueueResponse struct {
Results []BatchEnqueueResult `json:"results"`
}
BatchEnqueueResponse defines model for BatchEnqueueResponse.
type BatchEnqueueResult ¶
type BatchEnqueueResult struct {
// Created False if a task with the same idempotency key already existed.
Created bool `json:"created"`
Task Task `json:"task"`
}
BatchEnqueueResult defines model for BatchEnqueueResult.
type CancelPendingResult ¶
type CancelPendingResult struct {
// Cancelled How many pending tasks were cancelled.
Cancelled int `json:"cancelled"`
}
CancelPendingResult defines model for CancelPendingResult.
type CancelPendingTasksResponse ¶
type CancelPendingTasksResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CancelPendingResult
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCancelPendingTasksResponse ¶
func ParseCancelPendingTasksResponse(rsp *http.Response) (*CancelPendingTasksResponse, error)
ParseCancelPendingTasksResponse parses an HTTP response from a CancelPendingTasksWithResponse call
func (CancelPendingTasksResponse) ContentType ¶
func (r CancelPendingTasksResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CancelPendingTasksResponse) GetBody ¶
func (r CancelPendingTasksResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CancelPendingTasksResponse) GetJSON200 ¶
func (r CancelPendingTasksResponse) GetJSON200() *CancelPendingResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CancelPendingTasksResponse) GetJSONDefault ¶
func (r CancelPendingTasksResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CancelPendingTasksResponse) Status ¶
func (r CancelPendingTasksResponse) Status() string
Status returns HTTPResponse.Status
func (CancelPendingTasksResponse) StatusCode ¶
func (r CancelPendingTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CancelRunResponse ¶
type CancelRunResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Run
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCancelRunResponse ¶
func ParseCancelRunResponse(rsp *http.Response) (*CancelRunResponse, error)
ParseCancelRunResponse parses an HTTP response from a CancelRunWithResponse call
func (CancelRunResponse) ContentType ¶
func (r CancelRunResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CancelRunResponse) GetBody ¶
func (r CancelRunResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CancelRunResponse) GetJSON200 ¶
func (r CancelRunResponse) GetJSON200() *Run
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CancelRunResponse) GetJSONDefault ¶
func (r CancelRunResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CancelRunResponse) Status ¶
func (r CancelRunResponse) Status() string
Status returns HTTPResponse.Status
func (CancelRunResponse) StatusCode ¶
func (r CancelRunResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CancelTaskResponse ¶
type CancelTaskResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Task
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCancelTaskResponse ¶
func ParseCancelTaskResponse(rsp *http.Response) (*CancelTaskResponse, error)
ParseCancelTaskResponse parses an HTTP response from a CancelTaskWithResponse call
func (CancelTaskResponse) ContentType ¶
func (r CancelTaskResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CancelTaskResponse) GetBody ¶
func (r CancelTaskResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CancelTaskResponse) GetJSON200 ¶
func (r CancelTaskResponse) GetJSON200() *Task
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CancelTaskResponse) GetJSONDefault ¶
func (r CancelTaskResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CancelTaskResponse) Status ¶
func (r CancelTaskResponse) Status() string
Status returns HTTPResponse.Status
func (CancelTaskResponse) StatusCode ¶
func (r CancelTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CancelPendingTasks ¶
func (c *Client) CancelPendingTasks(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
CancelPendingTasks Cancel a queue's pending tasks
Cancels every pending task, including scheduled ones and ones waiting to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running tasks finish their attempt. Cancelled tasks stay in the history until retention removes them, and can be retried.
Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).
func (*Client) CancelRun ¶
func (c *Client) CancelRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
CancelRun Cancel a run
Cancels a pending or running run. A running run's current attempt finishes and is recorded, but the run isn't retried. Cancelling a cancelled run does nothing; a finished or skipped run can't be cancelled (`invalid_state`).
Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).
func (*Client) CancelTask ¶
func (c *Client) CancelTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
CancelTask Cancel a task
Cancels a pending or running task. A running task's current attempt finishes and is recorded, but the task isn't retried. Cancelling a cancelled task does nothing; a succeeded or failed task can't be cancelled (`invalid_state`).
Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).
func (*Client) CloseGroup ¶ added in v0.2.0
func (c *Client) CloseGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
CloseGroup Close a task group
Stops the group from accepting tasks; enqueueing into it then fails with `group_closed`. If its tasks have all finished (or it has none), it completes at once. Closing a closed group does nothing.
Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).
func (*Client) CreateAlertChannel ¶
func (c *Client) CreateAlertChannel(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAlertChannel Add an alert channel
A workspace has at most 10 channels. Email channels need a server that can send email (`email_enabled` in the list); a Slack channel takes an incoming webhook URL (`https://hooks.slack.com/...`).
Takes a body of the `application/json` content type.
Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
func (*Client) CreateAlertChannelWithBody ¶
func (c *Client) CreateAlertChannelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAlertChannelWithBody Add an alert channel
A workspace has at most 10 channels. Email channels need a server that can send email (`email_enabled` in the list); a Slack channel takes an incoming webhook URL (`https://hooks.slack.com/...`).
Takes any type of body and a specified content type.
Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
func (*Client) CreateGroup ¶ added in v0.2.0
func (c *Client) CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateGroup Create a task group
Creates an open group. Enqueue tasks into it with `group_id`, then close it with `POST /v1/groups/{id}/close`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its `on_complete` callback, once.
If `idempotency_key` matches an existing group, that group is returned with status 200 and nothing is created.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/groups (the `CreateGroup` operationId).
func (*Client) CreateGroupWithBody ¶ added in v0.2.0
func (c *Client) CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateGroupWithBody Create a task group
Creates an open group. Enqueue tasks into it with `group_id`, then close it with `POST /v1/groups/{id}/close`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its `on_complete` callback, once.
If `idempotency_key` matches an existing group, that group is returned with status 200 and nothing is created.
Takes any type of body and a specified content type.
Corresponds with POST /v1/groups (the `CreateGroup` operationId).
func (*Client) CreateTask ¶
func (c *Client) CreateTask(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTask Enqueue a task
The queue is created with default settings if it doesn't exist, unless the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
If `idempotency_key` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
func (*Client) CreateTaskWithBody ¶
func (c *Client) CreateTaskWithBody(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTaskWithBody Enqueue a task
The queue is created with default settings if it doesn't exist, unless the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
If `idempotency_key` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.
Takes any type of body and a specified content type.
Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
func (*Client) CreateTasks ¶
func (c *Client) CreateTasks(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTasks Enqueue up to 100 tasks at once
Enqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (`tasks[3]: ...`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.
The whole request is limited to the payload limit plus 256 KB.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
func (*Client) CreateTasksWithBody ¶
func (c *Client) CreateTasksWithBody(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTasksWithBody Enqueue up to 100 tasks at once
Enqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (`tasks[3]: ...`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.
The whole request is limited to the payload limit plus 256 KB.
Takes any type of body and a specified content type.
Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
func (*Client) DeleteAlertChannel ¶
func (c *Client) DeleteAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteAlertChannel Remove an alert channel
Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).
func (*Client) DeleteQueue ¶
func (c *Client) DeleteQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteQueue Delete a queue and all its tasks
Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).
func (*Client) DeleteSchedule ¶
func (c *Client) DeleteSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteSchedule Delete a schedule and all its runs
A run in flight finishes, but its result isn't recorded.
Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).
func (*Client) GetActivity ¶
func (c *Client) GetActivity(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetActivity Count created tasks over time, by queue
Counts the workspace's tasks created in each bucket of the range, per queue, oldest bucket first; every bucket is listed, empty ones too. Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`, aligned to UTC. Finished tasks are deleted after the server's retention period, so buckets further back than `retention_seconds` only count what is left.
Corresponds with GET /v1/activity (the `GetActivity` operationId).
func (*Client) GetGroup ¶ added in v0.2.0
func (c *Client) GetGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetGroup Get a task group
Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).
func (*Client) GetHealthz ¶
func (c *Client) GetHealthz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetHealthz Liveness probe
Returns 200 while the process is running. Does not touch the database.
Corresponds with GET /healthz (the `GetHealthz` operationId).
func (*Client) GetQueue ¶
func (c *Client) GetQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
GetQueue Get a queue
Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).
func (*Client) GetQueueActivity ¶
func (c *Client) GetQueueActivity(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetQueueActivity Count a queue's finished tasks
Counts the tasks that finished since `since`, by final state. Finished tasks are deleted after the server's retention period, so a `since` further back than `retention_seconds` only counts what is left.
Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).
func (*Client) GetQueueFailures ¶
func (c *Client) GetQueueFailures(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetQueueFailures Group a queue's failed tasks by error
Groups the queue's failed tasks by their latest error, most common first, so one broken endpoint or bad payload shows up as one line. Only the 10,000 most recently failed tasks are grouped.
Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).
func (*Client) GetReadyz ¶
func (c *Client) GetReadyz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetReadyz Readiness probe
Returns 200 when the database is reachable and migrations are applied.
Corresponds with GET /readyz (the `GetReadyz` operationId).
func (*Client) GetRun ¶
func (c *Client) GetRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetRun Get a run
Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).
func (*Client) GetRunDelivery ¶
func (c *Client) GetRunDelivery(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetRunDelivery Get the request that delivers a run
The HTTP request Workly sends to deliver the run, as it would be sent now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`. Nothing is sent.
Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).
func (*Client) GetSchedule ¶
func (c *Client) GetSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
GetSchedule Get a schedule
Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).
func (*Client) GetTask ¶
func (c *Client) GetTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetTask Get a task
Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).
func (*Client) GetTaskDelivery ¶
func (c *Client) GetTaskDelivery(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetTaskDelivery Get the request that delivers a task
The HTTP request Workly sends to deliver the task, as it would be sent now: the task's own headers plus Workly's (`Workly-Task-Id`, `Workly-Signature`, ...), and the exact body. The signature is fresh, so replaying the request (for example with curl) while fixing an endpoint passes verification until the timestamp is too old. Nothing is sent and the task doesn't change. `Workly-Attempt` is the next attempt for a pending task, otherwise the latest.
Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).
func (*Client) ListAlertChannels ¶
func (c *Client) ListAlertChannels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAlertChannels List alert channels
Where the workspace's alerts go. When tasks in a queue or runs of a schedule fail (after their last attempt), every channel gets an alert within about a minute, naming the errors. After that, a queue or schedule gets at most one alert every 30 minutes, covering the failures since its previous one.
Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).
func (*Client) ListAttempts ¶
func (c *Client) ListAttempts(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAttempts List a task's delivery attempts, oldest first
Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).
func (*Client) ListGroups ¶ added in v0.2.0
func (c *Client) ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListGroups List task groups
Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.
Corresponds with GET /v1/groups (the `ListGroups` operationId).
func (*Client) ListQueues ¶
func (c *Client) ListQueues(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListQueues List queues
Corresponds with GET /v1/queues (the `ListQueues` operationId).
func (*Client) ListRunAttempts ¶
func (c *Client) ListRunAttempts(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
ListRunAttempts List a run's delivery attempts, oldest first
Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).
func (*Client) ListRuns ¶
func (c *Client) ListRuns(ctx context.Context, schedule ScheduleName, params *ListRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListRuns List a schedule's runs, newest first
Corresponds with GET /v1/schedules/{schedule}/runs (the `ListRuns` operationId).
func (*Client) ListSchedules ¶
func (c *Client) ListSchedules(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListSchedules List schedules
Corresponds with GET /v1/schedules (the `ListSchedules` operationId).
func (*Client) ListTasks ¶
func (c *Client) ListTasks(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListTasks List a queue's tasks
Newest first, unless `sort` and `order` say otherwise.
Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).
func (*Client) PauseQueue ¶
func (c *Client) PauseQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
PauseQueue Pause a queue
Stops dispatching the queue's tasks. Deliveries already in flight finish, and tasks can still be enqueued.
Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).
func (*Client) PauseSchedule ¶
func (c *Client) PauseSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
PauseSchedule Pause a schedule
Stops the schedule from firing. Runs already pending or in flight still finish, and "run now" still works.
Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).
func (*Client) PreviewCron ¶
func (c *Client) PreviewCron(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*http.Response, error)
PreviewCron Preview a cron timetable
The next times a schedule with this cron expression and timezone would run, from now, without creating it. For forms that check a timetable as it's typed.
Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).
func (*Client) PutQueue ¶
func (c *Client) PutQueue(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PutQueue Create or update a queue
Declarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
func (*Client) PutQueueWithBody ¶
func (c *Client) PutQueueWithBody(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PutQueueWithBody Create or update a queue
Declarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
func (*Client) PutSchedule ¶
func (c *Client) PutSchedule(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PutSchedule Create or update a schedule
Declarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's `next_runs` shows when it will run, so a cron expression can be checked before relying on it.
Runs already created keep the request they were created with; retries use the schedule's current retry policy and timeout.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
func (*Client) PutScheduleWithBody ¶
func (c *Client) PutScheduleWithBody(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PutScheduleWithBody Create or update a schedule
Declarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's `next_runs` shows when it will run, so a cron expression can be checked before relying on it.
Runs already created keep the request they were created with; retries use the schedule's current retry policy and timeout.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
func (*Client) ResumeQueue ¶
func (c *Client) ResumeQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
ResumeQueue Resume a paused queue
Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).
func (*Client) ResumeSchedule ¶
func (c *Client) ResumeSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
ResumeSchedule Resume a paused schedule
The schedule fires again from its next slot after now. Slots that passed while it was paused are not run.
Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).
func (*Client) RetryFailedTasks ¶
func (c *Client) RetryFailedTasks(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
RetryFailedTasks Retry every failed task in a queue
Replays every failed task in the queue now, each with a fresh set of `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use it to recover after an outage of the endpoint. Pause the queue first or set a rate limit to control how fast the replays are delivered.
With `last_error`, only the failed tasks whose latest error is exactly that (as `GET /v1/queues/{queue}/failures` groups them) are retried.
Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).
func (*Client) RetryRun ¶
func (c *Client) RetryRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
RetryRun Retry a run now
Makes the run due now. A succeeded, failed, cancelled or skipped run is delivered again with a fresh set of `max_attempts`; a pending run just runs sooner. A run can't be retried while an attempt is in flight (`invalid_state`).
Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).
func (*Client) RetryTask ¶
func (c *Client) RetryTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
RetryTask Retry a task now
Makes the task due now. A succeeded, failed or cancelled task is replayed with a fresh set of `max_attempts`; its attempt numbers keep counting. A pending task (scheduled or waiting to retry) just runs sooner. A task can't be retried while an attempt is in flight (`invalid_state`).
Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).
func (*Client) SearchTasks ¶
func (c *Client) SearchTasks(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
SearchTasks Search tasks across queues
All filters are optional and combine with AND. To find one task by ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and `order` say otherwise.
Corresponds with GET /v1/tasks (the `SearchTasks` operationId).
func (*Client) TestAlertChannel ¶
func (c *Client) TestAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
TestAlertChannel Send a test alert
Sends a test message to the channel now, to check it's set up right. If it can't be sent, the error (`alert_failed`, 502) says why.
Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).
func (*Client) TriggerSchedule ¶
func (c *Client) TriggerSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
TriggerSchedule Run a schedule now
Creates a run that is delivered right away, with `trigger: manual`. It runs even if the schedule is paused or a run is in flight, and doesn't change when the schedule next fires.
Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).
type ClientInterface ¶
type ClientInterface interface {
// GetHealthz Liveness probe
//
// Returns 200 while the process is running. Does not touch the database.
//
// Corresponds with GET /healthz (the `GetHealthz` operationId).
GetHealthz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetReadyz Readiness probe
//
// Returns 200 when the database is reachable and migrations are applied.
//
// Corresponds with GET /readyz (the `GetReadyz` operationId).
GetReadyz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetActivity Count created tasks over time, by queue
//
// Counts the workspace's tasks created in each bucket of the range, per
// queue, oldest bucket first; every bucket is listed, empty ones too.
// Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`,
// aligned to UTC. Finished tasks are deleted after the server's
// retention period, so buckets further back than `retention_seconds`
// only count what is left.
//
// Corresponds with GET /v1/activity (the `GetActivity` operationId).
GetActivity(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAlertChannels List alert channels
//
// Where the workspace's alerts go. When tasks in a queue or runs of a
// schedule fail (after their last attempt), every channel gets an
// alert within about a minute, naming the errors. After that, a queue
// or schedule gets at most one alert every 30 minutes, covering the
// failures since its previous one.
//
// Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).
ListAlertChannels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAlertChannelWithBody Add an alert channel
//
// A workspace has at most 10 channels. Email channels need a server
// that can send email (`email_enabled` in the list); a Slack channel
// takes an incoming webhook URL (`https://hooks.slack.com/...`).
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
CreateAlertChannelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAlertChannel Add an alert channel
//
// A workspace has at most 10 channels. Email channels need a server
// that can send email (`email_enabled` in the list); a Slack channel
// takes an incoming webhook URL (`https://hooks.slack.com/...`).
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
CreateAlertChannel(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAlertChannel Remove an alert channel
//
// Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).
DeleteAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// TestAlertChannel Send a test alert
//
// Sends a test message to the channel now, to check it's set up
// right. If it can't be sent, the error (`alert_failed`, 502) says
// why.
//
// Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).
TestAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// PreviewCron Preview a cron timetable
//
// The next times a schedule with this cron expression and timezone
// would run, from now, without creating it. For forms that check a
// timetable as it's typed.
//
// Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).
PreviewCron(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListGroups List task groups
//
// Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.
//
// Corresponds with GET /v1/groups (the `ListGroups` operationId).
ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateGroupWithBody Create a task group
//
// Creates an open group. Enqueue tasks into it with `group_id`, then
// close it with `POST /v1/groups/{id}/close`. Once it is closed and
// every task in it has succeeded, failed or been cancelled, it
// completes and enqueues its `on_complete` callback, once.
//
// If `idempotency_key` matches an existing group, that group is
// returned with status 200 and nothing is created.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/groups (the `CreateGroup` operationId).
CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateGroup Create a task group
//
// Creates an open group. Enqueue tasks into it with `group_id`, then
// close it with `POST /v1/groups/{id}/close`. Once it is closed and
// every task in it has succeeded, failed or been cancelled, it
// completes and enqueues its `on_complete` callback, once.
//
// If `idempotency_key` matches an existing group, that group is
// returned with status 200 and nothing is created.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/groups (the `CreateGroup` operationId).
CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetGroup Get a task group
//
// Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).
GetGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
// CloseGroup Close a task group
//
// Stops the group from accepting tasks; enqueueing into it then fails
// with `group_closed`. If its tasks have all finished (or it has none),
// it completes at once. Closing a closed group does nothing.
//
// Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).
CloseGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListQueues List queues
//
// Corresponds with GET /v1/queues (the `ListQueues` operationId).
ListQueues(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteQueue Delete a queue and all its tasks
//
// Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).
DeleteQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetQueue Get a queue
//
// Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).
GetQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutQueueWithBody Create or update a queue
//
// Declarative and idempotent: the queue ends up with exactly the given
// configuration, and omitted fields are reset to their defaults. This
// makes queue configuration easy to keep in code. It doesn't change
// whether the queue is paused.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
PutQueueWithBody(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutQueue Create or update a queue
//
// Declarative and idempotent: the queue ends up with exactly the given
// configuration, and omitted fields are reset to their defaults. This
// makes queue configuration easy to keep in code. It doesn't change
// whether the queue is paused.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
PutQueue(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetQueueActivity Count a queue's finished tasks
//
// Counts the tasks that finished since `since`, by final state. Finished
// tasks are deleted after the server's retention period, so a `since`
// further back than `retention_seconds` only counts what is left.
//
// Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).
GetQueueActivity(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelPendingTasks Cancel a queue's pending tasks
//
// Cancels every pending task, including scheduled ones and ones waiting
// to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running
// tasks finish their attempt. Cancelled tasks stay in the history until
// retention removes them, and can be retried.
//
// Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).
CancelPendingTasks(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetQueueFailures Group a queue's failed tasks by error
//
// Groups the queue's failed tasks by their latest error, most common
// first, so one broken endpoint or bad payload shows up as one line.
// Only the 10,000 most recently failed tasks are grouped.
//
// Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).
GetQueueFailures(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PauseQueue Pause a queue
//
// Stops dispatching the queue's tasks. Deliveries already in flight
// finish, and tasks can still be enqueued.
//
// Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).
PauseQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
// ResumeQueue Resume a paused queue
//
// Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).
ResumeQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)
// RetryFailedTasks Retry every failed task in a queue
//
// Replays every failed task in the queue now, each with a fresh set of
// `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use
// it to recover after an outage of the endpoint. Pause the queue first
// or set a rate limit to control how fast the replays are delivered.
//
// With `last_error`, only the failed tasks whose latest error is exactly
// that (as `GET /v1/queues/{queue}/failures` groups them) are retried.
//
// Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).
RetryFailedTasks(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListTasks List a queue's tasks
//
// Newest first, unless `sort` and `order` say otherwise.
//
// Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).
ListTasks(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTaskWithBody Enqueue a task
//
// The queue is created with default settings if it doesn't exist, unless
// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
//
// If `idempotency_key` matches an existing task in the queue, that task
// is returned with status 200 and nothing is enqueued.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
CreateTaskWithBody(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTask Enqueue a task
//
// The queue is created with default settings if it doesn't exist, unless
// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
//
// If `idempotency_key` matches an existing task in the queue, that task
// is returned with status 200 and nothing is enqueued.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
CreateTask(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTasksWithBody Enqueue up to 100 tasks at once
//
// Enqueues all the tasks or none: if any task is invalid, nothing is
// enqueued and the error names the first invalid one (`tasks[3]: ...`).
// Idempotency keys work as for a single enqueue, including between
// tasks in the same batch.
//
// The whole request is limited to the payload limit plus 256 KB.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
CreateTasksWithBody(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTasks Enqueue up to 100 tasks at once
//
// Enqueues all the tasks or none: if any task is invalid, nothing is
// enqueued and the error names the first invalid one (`tasks[3]: ...`).
// Idempotency keys work as for a single enqueue, including between
// tasks in the same batch.
//
// The whole request is limited to the payload limit plus 256 KB.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
CreateTasks(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRun Get a run
//
// Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).
GetRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListRunAttempts List a run's delivery attempts, oldest first
//
// Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).
ListRunAttempts(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelRun Cancel a run
//
// Cancels a pending or running run. A running run's current attempt
// finishes and is recorded, but the run isn't retried. Cancelling a
// cancelled run does nothing; a finished or skipped run can't be
// cancelled (`invalid_state`).
//
// Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).
CancelRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRunDelivery Get the request that delivers a run
//
// The HTTP request Workly sends to deliver the run, as it would be sent
// now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`.
// Nothing is sent.
//
// Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).
GetRunDelivery(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
// RetryRun Retry a run now
//
// Makes the run due now. A succeeded, failed, cancelled or skipped run
// is delivered again with a fresh set of `max_attempts`; a pending run
// just runs sooner. A run can't be retried while an attempt is in
// flight (`invalid_state`).
//
// Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).
RetryRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListSchedules List schedules
//
// Corresponds with GET /v1/schedules (the `ListSchedules` operationId).
ListSchedules(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteSchedule Delete a schedule and all its runs
//
// A run in flight finishes, but its result isn't recorded.
//
// Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).
DeleteSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSchedule Get a schedule
//
// Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).
GetSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutScheduleWithBody Create or update a schedule
//
// Declarative and idempotent: the schedule ends up with exactly the
// given settings, and omitted fields are reset to their defaults. It
// doesn't change whether the schedule is paused. The response's
// `next_runs` shows when it will run, so a cron expression can be
// checked before relying on it.
//
// Runs already created keep the request they were created with; retries
// use the schedule's current retry policy and timeout.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
PutScheduleWithBody(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutSchedule Create or update a schedule
//
// Declarative and idempotent: the schedule ends up with exactly the
// given settings, and omitted fields are reset to their defaults. It
// doesn't change whether the schedule is paused. The response's
// `next_runs` shows when it will run, so a cron expression can be
// checked before relying on it.
//
// Runs already created keep the request they were created with; retries
// use the schedule's current retry policy and timeout.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
PutSchedule(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PauseSchedule Pause a schedule
//
// Stops the schedule from firing. Runs already pending or in flight
// still finish, and "run now" still works.
//
// Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).
PauseSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
// ResumeSchedule Resume a paused schedule
//
// The schedule fires again from its next slot after now. Slots that
// passed while it was paused are not run.
//
// Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).
ResumeSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListRuns List a schedule's runs, newest first
//
// Corresponds with GET /v1/schedules/{schedule}/runs (the `ListRuns` operationId).
ListRuns(ctx context.Context, schedule ScheduleName, params *ListRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// TriggerSchedule Run a schedule now
//
// Creates a run that is delivered right away, with `trigger: manual`.
// It runs even if the schedule is paused or a run is in flight, and
// doesn't change when the schedule next fires.
//
// Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).
TriggerSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)
// SearchTasks Search tasks across queues
//
// All filters are optional and combine with AND. To find one task by
// ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and
// `order` say otherwise.
//
// Corresponds with GET /v1/tasks (the `SearchTasks` operationId).
SearchTasks(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTask Get a task
//
// Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).
GetTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAttempts List a task's delivery attempts, oldest first
//
// Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).
ListAttempts(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelTask Cancel a task
//
// Cancels a pending or running task. A running task's current attempt
// finishes and is recorded, but the task isn't retried. Cancelling a
// cancelled task does nothing; a succeeded or failed task can't be
// cancelled (`invalid_state`).
//
// Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).
CancelTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTaskDelivery Get the request that delivers a task
//
// The HTTP request Workly sends to deliver the task, as it would be sent
// now: the task's own headers plus Workly's (`Workly-Task-Id`,
// `Workly-Signature`, ...), and the exact body. The signature is fresh,
// so replaying the request (for example with curl) while fixing an
// endpoint passes verification until the timestamp is too old. Nothing
// is sent and the task doesn't change. `Workly-Attempt` is the next
// attempt for a pending task, otherwise the latest.
//
// Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).
GetTaskDelivery(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
// RetryTask Retry a task now
//
// Makes the task due now. A succeeded, failed or cancelled task is
// replayed with a fresh set of `max_attempts`; its attempt numbers keep
// counting. A pending task (scheduled or waiting to retry) just runs
// sooner. A task can't be retried while an attempt is in flight
// (`invalid_state`).
//
// Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).
RetryTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CancelPendingTasksWithResponse ¶
func (c *ClientWithResponses) CancelPendingTasksWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*CancelPendingTasksResponse, error)
CancelPendingTasksWithResponse Cancel a queue's pending tasks
Cancels every pending task, including scheduled ones and ones waiting to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running tasks finish their attempt. Cancelled tasks stay in the history until retention removes them, and can be retried.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).
func (*ClientWithResponses) CancelRunWithResponse ¶
func (c *ClientWithResponses) CancelRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*CancelRunResponse, error)
CancelRunWithResponse Cancel a run
Cancels a pending or running run. A running run's current attempt finishes and is recorded, but the run isn't retried. Cancelling a cancelled run does nothing; a finished or skipped run can't be cancelled (`invalid_state`).
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).
func (*ClientWithResponses) CancelTaskWithResponse ¶
func (c *ClientWithResponses) CancelTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*CancelTaskResponse, error)
CancelTaskWithResponse Cancel a task
Cancels a pending or running task. A running task's current attempt finishes and is recorded, but the task isn't retried. Cancelling a cancelled task does nothing; a succeeded or failed task can't be cancelled (`invalid_state`).
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).
func (*ClientWithResponses) CloseGroupWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CloseGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*CloseGroupResponse, error)
CloseGroupWithResponse Close a task group
Stops the group from accepting tasks; enqueueing into it then fails with `group_closed`. If its tasks have all finished (or it has none), it completes at once. Closing a closed group does nothing.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).
func (*ClientWithResponses) CreateAlertChannelWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAlertChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)
CreateAlertChannelWithBodyWithResponse Add an alert channel
A workspace has at most 10 channels. Email channels need a server that can send email (`email_enabled` in the list); a Slack channel takes an incoming webhook URL (`https://hooks.slack.com/...`).
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
func (*ClientWithResponses) CreateAlertChannelWithResponse ¶
func (c *ClientWithResponses) CreateAlertChannelWithResponse(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)
CreateAlertChannelWithResponse Add an alert channel
A workspace has at most 10 channels. Email channels need a server that can send email (`email_enabled` in the list); a Slack channel takes an incoming webhook URL (`https://hooks.slack.com/...`).
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
func (*ClientWithResponses) CreateGroupWithBodyWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
CreateGroupWithBodyWithResponse Create a task group
Creates an open group. Enqueue tasks into it with `group_id`, then close it with `POST /v1/groups/{id}/close`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its `on_complete` callback, once.
If `idempotency_key` matches an existing group, that group is returned with status 200 and nothing is created.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/groups (the `CreateGroup` operationId).
func (*ClientWithResponses) CreateGroupWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
CreateGroupWithResponse Create a task group
Creates an open group. Enqueue tasks into it with `group_id`, then close it with `POST /v1/groups/{id}/close`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its `on_complete` callback, once.
If `idempotency_key` matches an existing group, that group is returned with status 200 and nothing is created.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/groups (the `CreateGroup` operationId).
func (*ClientWithResponses) CreateTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
CreateTaskWithBodyWithResponse Enqueue a task
The queue is created with default settings if it doesn't exist, unless the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
If `idempotency_key` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
func (*ClientWithResponses) CreateTaskWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
CreateTaskWithResponse Enqueue a task
The queue is created with default settings if it doesn't exist, unless the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
If `idempotency_key` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
func (*ClientWithResponses) CreateTasksWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTasksWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)
CreateTasksWithBodyWithResponse Enqueue up to 100 tasks at once
Enqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (`tasks[3]: ...`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.
The whole request is limited to the payload limit plus 256 KB.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
func (*ClientWithResponses) CreateTasksWithResponse ¶
func (c *ClientWithResponses) CreateTasksWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)
CreateTasksWithResponse Enqueue up to 100 tasks at once
Enqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (`tasks[3]: ...`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.
The whole request is limited to the payload limit plus 256 KB.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
func (*ClientWithResponses) DeleteAlertChannelWithResponse ¶
func (c *ClientWithResponses) DeleteAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*DeleteAlertChannelResponse, error)
DeleteAlertChannelWithResponse Remove an alert channel
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).
func (*ClientWithResponses) DeleteQueueWithResponse ¶
func (c *ClientWithResponses) DeleteQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*DeleteQueueResponse, error)
DeleteQueueWithResponse Delete a queue and all its tasks
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).
func (*ClientWithResponses) DeleteScheduleWithResponse ¶
func (c *ClientWithResponses) DeleteScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*DeleteScheduleResponse, error)
DeleteScheduleWithResponse Delete a schedule and all its runs
A run in flight finishes, but its result isn't recorded.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).
func (*ClientWithResponses) GetActivityWithResponse ¶
func (c *ClientWithResponses) GetActivityWithResponse(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
GetActivityWithResponse Count created tasks over time, by queue
Counts the workspace's tasks created in each bucket of the range, per queue, oldest bucket first; every bucket is listed, empty ones too. Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`, aligned to UTC. Finished tasks are deleted after the server's retention period, so buckets further back than `retention_seconds` only count what is left.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/activity (the `GetActivity` operationId).
func (*ClientWithResponses) GetGroupWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
GetGroupWithResponse Get a task group
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).
func (*ClientWithResponses) GetHealthzWithResponse ¶
func (c *ClientWithResponses) GetHealthzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthzResponse, error)
GetHealthzWithResponse Liveness probe
Returns 200 while the process is running. Does not touch the database.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /healthz (the `GetHealthz` operationId).
func (*ClientWithResponses) GetQueueActivityWithResponse ¶
func (c *ClientWithResponses) GetQueueActivityWithResponse(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*GetQueueActivityResponse, error)
GetQueueActivityWithResponse Count a queue's finished tasks
Counts the tasks that finished since `since`, by final state. Finished tasks are deleted after the server's retention period, so a `since` further back than `retention_seconds` only counts what is left.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).
func (*ClientWithResponses) GetQueueFailuresWithResponse ¶
func (c *ClientWithResponses) GetQueueFailuresWithResponse(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*GetQueueFailuresResponse, error)
GetQueueFailuresWithResponse Group a queue's failed tasks by error
Groups the queue's failed tasks by their latest error, most common first, so one broken endpoint or bad payload shows up as one line. Only the 10,000 most recently failed tasks are grouped.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).
func (*ClientWithResponses) GetQueueWithResponse ¶
func (c *ClientWithResponses) GetQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*GetQueueResponse, error)
GetQueueWithResponse Get a queue
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).
func (*ClientWithResponses) GetReadyzWithResponse ¶
func (c *ClientWithResponses) GetReadyzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadyzResponse, error)
GetReadyzWithResponse Readiness probe
Returns 200 when the database is reachable and migrations are applied.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /readyz (the `GetReadyz` operationId).
func (*ClientWithResponses) GetRunDeliveryWithResponse ¶
func (c *ClientWithResponses) GetRunDeliveryWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunDeliveryResponse, error)
GetRunDeliveryWithResponse Get the request that delivers a run
The HTTP request Workly sends to deliver the run, as it would be sent now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`. Nothing is sent.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).
func (*ClientWithResponses) GetRunWithResponse ¶
func (c *ClientWithResponses) GetRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunResponse, error)
GetRunWithResponse Get a run
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).
func (*ClientWithResponses) GetScheduleWithResponse ¶
func (c *ClientWithResponses) GetScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*GetScheduleResponse, error)
GetScheduleWithResponse Get a schedule
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).
func (*ClientWithResponses) GetTaskDeliveryWithResponse ¶
func (c *ClientWithResponses) GetTaskDeliveryWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskDeliveryResponse, error)
GetTaskDeliveryWithResponse Get the request that delivers a task
The HTTP request Workly sends to deliver the task, as it would be sent now: the task's own headers plus Workly's (`Workly-Task-Id`, `Workly-Signature`, ...), and the exact body. The signature is fresh, so replaying the request (for example with curl) while fixing an endpoint passes verification until the timestamp is too old. Nothing is sent and the task doesn't change. `Workly-Attempt` is the next attempt for a pending task, otherwise the latest.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).
func (*ClientWithResponses) GetTaskWithResponse ¶
func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)
GetTaskWithResponse Get a task
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).
func (*ClientWithResponses) ListAlertChannelsWithResponse ¶
func (c *ClientWithResponses) ListAlertChannelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAlertChannelsResponse, error)
ListAlertChannelsWithResponse List alert channels
Where the workspace's alerts go. When tasks in a queue or runs of a schedule fail (after their last attempt), every channel gets an alert within about a minute, naming the errors. After that, a queue or schedule gets at most one alert every 30 minutes, covering the failures since its previous one.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).
func (*ClientWithResponses) ListAttemptsWithResponse ¶
func (c *ClientWithResponses) ListAttemptsWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*ListAttemptsResponse, error)
ListAttemptsWithResponse List a task's delivery attempts, oldest first
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).
func (*ClientWithResponses) ListGroupsWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
ListGroupsWithResponse List task groups
Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/groups (the `ListGroups` operationId).
func (*ClientWithResponses) ListQueuesWithResponse ¶
func (c *ClientWithResponses) ListQueuesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueuesResponse, error)
ListQueuesWithResponse List queues
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/queues (the `ListQueues` operationId).
func (*ClientWithResponses) ListRunAttemptsWithResponse ¶
func (c *ClientWithResponses) ListRunAttemptsWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*ListRunAttemptsResponse, error)
ListRunAttemptsWithResponse List a run's delivery attempts, oldest first
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).
func (*ClientWithResponses) ListRunsWithResponse ¶
func (c *ClientWithResponses) ListRunsWithResponse(ctx context.Context, schedule ScheduleName, params *ListRunsParams, reqEditors ...RequestEditorFn) (*ListRunsResponse, error)
ListRunsWithResponse List a schedule's runs, newest first
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/schedules/{schedule}/runs (the `ListRuns` operationId).
func (*ClientWithResponses) ListSchedulesWithResponse ¶
func (c *ClientWithResponses) ListSchedulesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error)
ListSchedulesWithResponse List schedules
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/schedules (the `ListSchedules` operationId).
func (*ClientWithResponses) ListTasksWithResponse ¶
func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error)
ListTasksWithResponse List a queue's tasks
Newest first, unless `sort` and `order` say otherwise.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).
func (*ClientWithResponses) PauseQueueWithResponse ¶
func (c *ClientWithResponses) PauseQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*PauseQueueResponse, error)
PauseQueueWithResponse Pause a queue
Stops dispatching the queue's tasks. Deliveries already in flight finish, and tasks can still be enqueued.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).
func (*ClientWithResponses) PauseScheduleWithResponse ¶
func (c *ClientWithResponses) PauseScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*PauseScheduleResponse, error)
PauseScheduleWithResponse Pause a schedule
Stops the schedule from firing. Runs already pending or in flight still finish, and "run now" still works.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).
func (*ClientWithResponses) PreviewCronWithResponse ¶
func (c *ClientWithResponses) PreviewCronWithResponse(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*PreviewCronResponse, error)
PreviewCronWithResponse Preview a cron timetable
The next times a schedule with this cron expression and timezone would run, from now, without creating it. For forms that check a timetable as it's typed.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).
func (*ClientWithResponses) PutQueueWithBodyWithResponse ¶
func (c *ClientWithResponses) PutQueueWithBodyWithResponse(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)
PutQueueWithBodyWithResponse Create or update a queue
Declarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
func (*ClientWithResponses) PutQueueWithResponse ¶
func (c *ClientWithResponses) PutQueueWithResponse(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)
PutQueueWithResponse Create or update a queue
Declarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
func (*ClientWithResponses) PutScheduleWithBodyWithResponse ¶
func (c *ClientWithResponses) PutScheduleWithBodyWithResponse(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)
PutScheduleWithBodyWithResponse Create or update a schedule
Declarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's `next_runs` shows when it will run, so a cron expression can be checked before relying on it.
Runs already created keep the request they were created with; retries use the schedule's current retry policy and timeout.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
func (*ClientWithResponses) PutScheduleWithResponse ¶
func (c *ClientWithResponses) PutScheduleWithResponse(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)
PutScheduleWithResponse Create or update a schedule
Declarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's `next_runs` shows when it will run, so a cron expression can be checked before relying on it.
Runs already created keep the request they were created with; retries use the schedule's current retry policy and timeout.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
func (*ClientWithResponses) ResumeQueueWithResponse ¶
func (c *ClientWithResponses) ResumeQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*ResumeQueueResponse, error)
ResumeQueueWithResponse Resume a paused queue
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).
func (*ClientWithResponses) ResumeScheduleWithResponse ¶
func (c *ClientWithResponses) ResumeScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*ResumeScheduleResponse, error)
ResumeScheduleWithResponse Resume a paused schedule
The schedule fires again from its next slot after now. Slots that passed while it was paused are not run.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).
func (*ClientWithResponses) RetryFailedTasksWithResponse ¶
func (c *ClientWithResponses) RetryFailedTasksWithResponse(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*RetryFailedTasksResponse, error)
RetryFailedTasksWithResponse Retry every failed task in a queue
Replays every failed task in the queue now, each with a fresh set of `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use it to recover after an outage of the endpoint. Pause the queue first or set a rate limit to control how fast the replays are delivered.
With `last_error`, only the failed tasks whose latest error is exactly that (as `GET /v1/queues/{queue}/failures` groups them) are retried.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).
func (*ClientWithResponses) RetryRunWithResponse ¶
func (c *ClientWithResponses) RetryRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*RetryRunResponse, error)
RetryRunWithResponse Retry a run now
Makes the run due now. A succeeded, failed, cancelled or skipped run is delivered again with a fresh set of `max_attempts`; a pending run just runs sooner. A run can't be retried while an attempt is in flight (`invalid_state`).
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).
func (*ClientWithResponses) RetryTaskWithResponse ¶
func (c *ClientWithResponses) RetryTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*RetryTaskResponse, error)
RetryTaskWithResponse Retry a task now
Makes the task due now. A succeeded, failed or cancelled task is replayed with a fresh set of `max_attempts`; its attempt numbers keep counting. A pending task (scheduled or waiting to retry) just runs sooner. A task can't be retried while an attempt is in flight (`invalid_state`).
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).
func (*ClientWithResponses) SearchTasksWithResponse ¶
func (c *ClientWithResponses) SearchTasksWithResponse(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*SearchTasksResponse, error)
SearchTasksWithResponse Search tasks across queues
All filters are optional and combine with AND. To find one task by ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and `order` say otherwise.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/tasks (the `SearchTasks` operationId).
func (*ClientWithResponses) TestAlertChannelWithResponse ¶
func (c *ClientWithResponses) TestAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*TestAlertChannelResponse, error)
TestAlertChannelWithResponse Send a test alert
Sends a test message to the channel now, to check it's set up right. If it can't be sent, the error (`alert_failed`, 502) says why.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).
func (*ClientWithResponses) TriggerScheduleWithResponse ¶
func (c *ClientWithResponses) TriggerScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*TriggerScheduleResponse, error)
TriggerScheduleWithResponse Run a schedule now
Creates a run that is delivered right away, with `trigger: manual`. It runs even if the schedule is paused or a run is in flight, and doesn't change when the schedule next fires.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetHealthzWithResponse Liveness probe
//
// Returns 200 while the process is running. Does not touch the database.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /healthz (the `GetHealthz` operationId).
GetHealthzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthzResponse, error)
// GetReadyzWithResponse Readiness probe
//
// Returns 200 when the database is reachable and migrations are applied.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /readyz (the `GetReadyz` operationId).
GetReadyzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadyzResponse, error)
// GetActivityWithResponse Count created tasks over time, by queue
//
// Counts the workspace's tasks created in each bucket of the range, per
// queue, oldest bucket first; every bucket is listed, empty ones too.
// Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`,
// aligned to UTC. Finished tasks are deleted after the server's
// retention period, so buckets further back than `retention_seconds`
// only count what is left.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/activity (the `GetActivity` operationId).
GetActivityWithResponse(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
// ListAlertChannelsWithResponse List alert channels
//
// Where the workspace's alerts go. When tasks in a queue or runs of a
// schedule fail (after their last attempt), every channel gets an
// alert within about a minute, naming the errors. After that, a queue
// or schedule gets at most one alert every 30 minutes, covering the
// failures since its previous one.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).
ListAlertChannelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAlertChannelsResponse, error)
// CreateAlertChannelWithBodyWithResponse Add an alert channel
//
// A workspace has at most 10 channels. Email channels need a server
// that can send email (`email_enabled` in the list); a Slack channel
// takes an incoming webhook URL (`https://hooks.slack.com/...`).
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
CreateAlertChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)
// CreateAlertChannelWithResponse Add an alert channel
//
// A workspace has at most 10 channels. Email channels need a server
// that can send email (`email_enabled` in the list); a Slack channel
// takes an incoming webhook URL (`https://hooks.slack.com/...`).
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).
CreateAlertChannelWithResponse(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)
// DeleteAlertChannelWithResponse Remove an alert channel
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).
DeleteAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*DeleteAlertChannelResponse, error)
// TestAlertChannelWithResponse Send a test alert
//
// Sends a test message to the channel now, to check it's set up
// right. If it can't be sent, the error (`alert_failed`, 502) says
// why.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).
TestAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*TestAlertChannelResponse, error)
// PreviewCronWithResponse Preview a cron timetable
//
// The next times a schedule with this cron expression and timezone
// would run, from now, without creating it. For forms that check a
// timetable as it's typed.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).
PreviewCronWithResponse(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*PreviewCronResponse, error)
// ListGroupsWithResponse List task groups
//
// Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/groups (the `ListGroups` operationId).
ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
// CreateGroupWithBodyWithResponse Create a task group
//
// Creates an open group. Enqueue tasks into it with `group_id`, then
// close it with `POST /v1/groups/{id}/close`. Once it is closed and
// every task in it has succeeded, failed or been cancelled, it
// completes and enqueues its `on_complete` callback, once.
//
// If `idempotency_key` matches an existing group, that group is
// returned with status 200 and nothing is created.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/groups (the `CreateGroup` operationId).
CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
// CreateGroupWithResponse Create a task group
//
// Creates an open group. Enqueue tasks into it with `group_id`, then
// close it with `POST /v1/groups/{id}/close`. Once it is closed and
// every task in it has succeeded, failed or been cancelled, it
// completes and enqueues its `on_complete` callback, once.
//
// If `idempotency_key` matches an existing group, that group is
// returned with status 200 and nothing is created.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/groups (the `CreateGroup` operationId).
CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
// GetGroupWithResponse Get a task group
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).
GetGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
// CloseGroupWithResponse Close a task group
//
// Stops the group from accepting tasks; enqueueing into it then fails
// with `group_closed`. If its tasks have all finished (or it has none),
// it completes at once. Closing a closed group does nothing.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).
CloseGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*CloseGroupResponse, error)
// ListQueuesWithResponse List queues
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/queues (the `ListQueues` operationId).
ListQueuesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueuesResponse, error)
// DeleteQueueWithResponse Delete a queue and all its tasks
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).
DeleteQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*DeleteQueueResponse, error)
// GetQueueWithResponse Get a queue
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).
GetQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*GetQueueResponse, error)
// PutQueueWithBodyWithResponse Create or update a queue
//
// Declarative and idempotent: the queue ends up with exactly the given
// configuration, and omitted fields are reset to their defaults. This
// makes queue configuration easy to keep in code. It doesn't change
// whether the queue is paused.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
PutQueueWithBodyWithResponse(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)
// PutQueueWithResponse Create or update a queue
//
// Declarative and idempotent: the queue ends up with exactly the given
// configuration, and omitted fields are reset to their defaults. This
// makes queue configuration easy to keep in code. It doesn't change
// whether the queue is paused.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).
PutQueueWithResponse(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)
// GetQueueActivityWithResponse Count a queue's finished tasks
//
// Counts the tasks that finished since `since`, by final state. Finished
// tasks are deleted after the server's retention period, so a `since`
// further back than `retention_seconds` only counts what is left.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).
GetQueueActivityWithResponse(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*GetQueueActivityResponse, error)
// CancelPendingTasksWithResponse Cancel a queue's pending tasks
//
// Cancels every pending task, including scheduled ones and ones waiting
// to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running
// tasks finish their attempt. Cancelled tasks stay in the history until
// retention removes them, and can be retried.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).
CancelPendingTasksWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*CancelPendingTasksResponse, error)
// GetQueueFailuresWithResponse Group a queue's failed tasks by error
//
// Groups the queue's failed tasks by their latest error, most common
// first, so one broken endpoint or bad payload shows up as one line.
// Only the 10,000 most recently failed tasks are grouped.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).
GetQueueFailuresWithResponse(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*GetQueueFailuresResponse, error)
// PauseQueueWithResponse Pause a queue
//
// Stops dispatching the queue's tasks. Deliveries already in flight
// finish, and tasks can still be enqueued.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).
PauseQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*PauseQueueResponse, error)
// ResumeQueueWithResponse Resume a paused queue
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).
ResumeQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*ResumeQueueResponse, error)
// RetryFailedTasksWithResponse Retry every failed task in a queue
//
// Replays every failed task in the queue now, each with a fresh set of
// `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use
// it to recover after an outage of the endpoint. Pause the queue first
// or set a rate limit to control how fast the replays are delivered.
//
// With `last_error`, only the failed tasks whose latest error is exactly
// that (as `GET /v1/queues/{queue}/failures` groups them) are retried.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).
RetryFailedTasksWithResponse(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*RetryFailedTasksResponse, error)
// ListTasksWithResponse List a queue's tasks
//
// Newest first, unless `sort` and `order` say otherwise.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).
ListTasksWithResponse(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error)
// CreateTaskWithBodyWithResponse Enqueue a task
//
// The queue is created with default settings if it doesn't exist, unless
// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
//
// If `idempotency_key` matches an existing task in the queue, that task
// is returned with status 200 and nothing is enqueued.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
CreateTaskWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
// CreateTaskWithResponse Enqueue a task
//
// The queue is created with default settings if it doesn't exist, unless
// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.
//
// If `idempotency_key` matches an existing task in the queue, that task
// is returned with status 200 and nothing is enqueued.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).
CreateTaskWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
// CreateTasksWithBodyWithResponse Enqueue up to 100 tasks at once
//
// Enqueues all the tasks or none: if any task is invalid, nothing is
// enqueued and the error names the first invalid one (`tasks[3]: ...`).
// Idempotency keys work as for a single enqueue, including between
// tasks in the same batch.
//
// The whole request is limited to the payload limit plus 256 KB.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
CreateTasksWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)
// CreateTasksWithResponse Enqueue up to 100 tasks at once
//
// Enqueues all the tasks or none: if any task is invalid, nothing is
// enqueued and the error names the first invalid one (`tasks[3]: ...`).
// Idempotency keys work as for a single enqueue, including between
// tasks in the same batch.
//
// The whole request is limited to the payload limit plus 256 KB.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).
CreateTasksWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)
// GetRunWithResponse Get a run
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).
GetRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunResponse, error)
// ListRunAttemptsWithResponse List a run's delivery attempts, oldest first
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).
ListRunAttemptsWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*ListRunAttemptsResponse, error)
// CancelRunWithResponse Cancel a run
//
// Cancels a pending or running run. A running run's current attempt
// finishes and is recorded, but the run isn't retried. Cancelling a
// cancelled run does nothing; a finished or skipped run can't be
// cancelled (`invalid_state`).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).
CancelRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*CancelRunResponse, error)
// GetRunDeliveryWithResponse Get the request that delivers a run
//
// The HTTP request Workly sends to deliver the run, as it would be sent
// now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`.
// Nothing is sent.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).
GetRunDeliveryWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunDeliveryResponse, error)
// RetryRunWithResponse Retry a run now
//
// Makes the run due now. A succeeded, failed, cancelled or skipped run
// is delivered again with a fresh set of `max_attempts`; a pending run
// just runs sooner. A run can't be retried while an attempt is in
// flight (`invalid_state`).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).
RetryRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*RetryRunResponse, error)
// ListSchedulesWithResponse List schedules
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/schedules (the `ListSchedules` operationId).
ListSchedulesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error)
// DeleteScheduleWithResponse Delete a schedule and all its runs
//
// A run in flight finishes, but its result isn't recorded.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).
DeleteScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*DeleteScheduleResponse, error)
// GetScheduleWithResponse Get a schedule
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).
GetScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*GetScheduleResponse, error)
// PutScheduleWithBodyWithResponse Create or update a schedule
//
// Declarative and idempotent: the schedule ends up with exactly the
// given settings, and omitted fields are reset to their defaults. It
// doesn't change whether the schedule is paused. The response's
// `next_runs` shows when it will run, so a cron expression can be
// checked before relying on it.
//
// Runs already created keep the request they were created with; retries
// use the schedule's current retry policy and timeout.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
PutScheduleWithBodyWithResponse(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)
// PutScheduleWithResponse Create or update a schedule
//
// Declarative and idempotent: the schedule ends up with exactly the
// given settings, and omitted fields are reset to their defaults. It
// doesn't change whether the schedule is paused. The response's
// `next_runs` shows when it will run, so a cron expression can be
// checked before relying on it.
//
// Runs already created keep the request they were created with; retries
// use the schedule's current retry policy and timeout.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).
PutScheduleWithResponse(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)
// PauseScheduleWithResponse Pause a schedule
//
// Stops the schedule from firing. Runs already pending or in flight
// still finish, and "run now" still works.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).
PauseScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*PauseScheduleResponse, error)
// ResumeScheduleWithResponse Resume a paused schedule
//
// The schedule fires again from its next slot after now. Slots that
// passed while it was paused are not run.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).
ResumeScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*ResumeScheduleResponse, error)
// ListRunsWithResponse List a schedule's runs, newest first
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/schedules/{schedule}/runs (the `ListRuns` operationId).
ListRunsWithResponse(ctx context.Context, schedule ScheduleName, params *ListRunsParams, reqEditors ...RequestEditorFn) (*ListRunsResponse, error)
// TriggerScheduleWithResponse Run a schedule now
//
// Creates a run that is delivered right away, with `trigger: manual`.
// It runs even if the schedule is paused or a run is in flight, and
// doesn't change when the schedule next fires.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).
TriggerScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*TriggerScheduleResponse, error)
// SearchTasksWithResponse Search tasks across queues
//
// All filters are optional and combine with AND. To find one task by
// ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and
// `order` say otherwise.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/tasks (the `SearchTasks` operationId).
SearchTasksWithResponse(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*SearchTasksResponse, error)
// GetTaskWithResponse Get a task
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).
GetTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)
// ListAttemptsWithResponse List a task's delivery attempts, oldest first
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).
ListAttemptsWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*ListAttemptsResponse, error)
// CancelTaskWithResponse Cancel a task
//
// Cancels a pending or running task. A running task's current attempt
// finishes and is recorded, but the task isn't retried. Cancelling a
// cancelled task does nothing; a succeeded or failed task can't be
// cancelled (`invalid_state`).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).
CancelTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*CancelTaskResponse, error)
// GetTaskDeliveryWithResponse Get the request that delivers a task
//
// The HTTP request Workly sends to deliver the task, as it would be sent
// now: the task's own headers plus Workly's (`Workly-Task-Id`,
// `Workly-Signature`, ...), and the exact body. The signature is fresh,
// so replaying the request (for example with curl) while fixing an
// endpoint passes verification until the timestamp is too old. Nothing
// is sent and the task doesn't change. `Workly-Attempt` is the next
// attempt for a pending task, otherwise the latest.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).
GetTaskDeliveryWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskDeliveryResponse, error)
// RetryTaskWithResponse Retry a task now
//
// Makes the task due now. A succeeded, failed or cancelled task is
// replayed with a fresh set of `max_attempts`; its attempt numbers keep
// counting. A pending task (scheduled or waiting to retry) just runs
// sooner. A task can't be retried while an attempt is in flight
// (`invalid_state`).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).
RetryTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*RetryTaskResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CloseGroupResponse ¶ added in v0.2.0
type CloseGroupResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Group
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCloseGroupResponse ¶ added in v0.2.0
func ParseCloseGroupResponse(rsp *http.Response) (*CloseGroupResponse, error)
ParseCloseGroupResponse parses an HTTP response from a CloseGroupWithResponse call
func (CloseGroupResponse) ContentType ¶ added in v0.2.0
func (r CloseGroupResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CloseGroupResponse) GetBody ¶ added in v0.2.0
func (r CloseGroupResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CloseGroupResponse) GetJSON200 ¶ added in v0.2.0
func (r CloseGroupResponse) GetJSON200() *Group
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CloseGroupResponse) GetJSONDefault ¶ added in v0.2.0
func (r CloseGroupResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CloseGroupResponse) Status ¶ added in v0.2.0
func (r CloseGroupResponse) Status() string
Status returns HTTPResponse.Status
func (CloseGroupResponse) StatusCode ¶ added in v0.2.0
func (r CloseGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAlertChannelJSONRequestBody ¶
type CreateAlertChannelJSONRequestBody = NewAlertChannel
CreateAlertChannelJSONRequestBody defines body for CreateAlertChannel for application/json ContentType.
type CreateAlertChannelResponse ¶
type CreateAlertChannelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *AlertChannel
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCreateAlertChannelResponse ¶
func ParseCreateAlertChannelResponse(rsp *http.Response) (*CreateAlertChannelResponse, error)
ParseCreateAlertChannelResponse parses an HTTP response from a CreateAlertChannelWithResponse call
func (CreateAlertChannelResponse) ContentType ¶
func (r CreateAlertChannelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAlertChannelResponse) GetBody ¶
func (r CreateAlertChannelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateAlertChannelResponse) GetJSON201 ¶
func (r CreateAlertChannelResponse) GetJSON201() *AlertChannel
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateAlertChannelResponse) GetJSONDefault ¶
func (r CreateAlertChannelResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateAlertChannelResponse) Status ¶
func (r CreateAlertChannelResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAlertChannelResponse) StatusCode ¶
func (r CreateAlertChannelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateGroupJSONRequestBody ¶ added in v0.2.0
type CreateGroupJSONRequestBody = NewGroup
CreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.
type CreateGroupResponse ¶ added in v0.2.0
type CreateGroupResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Group
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Group
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCreateGroupResponse ¶ added in v0.2.0
func ParseCreateGroupResponse(rsp *http.Response) (*CreateGroupResponse, error)
ParseCreateGroupResponse parses an HTTP response from a CreateGroupWithResponse call
func (CreateGroupResponse) ContentType ¶ added in v0.2.0
func (r CreateGroupResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateGroupResponse) GetBody ¶ added in v0.2.0
func (r CreateGroupResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateGroupResponse) GetJSON200 ¶ added in v0.2.0
func (r CreateGroupResponse) GetJSON200() *Group
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateGroupResponse) GetJSON201 ¶ added in v0.2.0
func (r CreateGroupResponse) GetJSON201() *Group
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateGroupResponse) GetJSONDefault ¶ added in v0.2.0
func (r CreateGroupResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateGroupResponse) Status ¶ added in v0.2.0
func (r CreateGroupResponse) Status() string
Status returns HTTPResponse.Status
func (CreateGroupResponse) StatusCode ¶ added in v0.2.0
func (r CreateGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateTaskJSONRequestBody ¶
type CreateTaskJSONRequestBody = EnqueueRequest
CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
type CreateTaskParams ¶
type CreateTaskParams struct {
// Traceparent W3C trace context, propagated on delivery.
Traceparent *string `json:"traceparent,omitempty"`
}
CreateTaskParams defines parameters for CreateTask.
type CreateTaskResponse ¶
type CreateTaskResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Task
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Task
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCreateTaskResponse ¶
func ParseCreateTaskResponse(rsp *http.Response) (*CreateTaskResponse, error)
ParseCreateTaskResponse parses an HTTP response from a CreateTaskWithResponse call
func (CreateTaskResponse) ContentType ¶
func (r CreateTaskResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateTaskResponse) GetBody ¶
func (r CreateTaskResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateTaskResponse) GetJSON200 ¶
func (r CreateTaskResponse) GetJSON200() *Task
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateTaskResponse) GetJSON201 ¶
func (r CreateTaskResponse) GetJSON201() *Task
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateTaskResponse) GetJSONDefault ¶
func (r CreateTaskResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateTaskResponse) Status ¶
func (r CreateTaskResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTaskResponse) StatusCode ¶
func (r CreateTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateTasksJSONRequestBody ¶
type CreateTasksJSONRequestBody = BatchEnqueueRequest
CreateTasksJSONRequestBody defines body for CreateTasks for application/json ContentType.
type CreateTasksParams ¶
type CreateTasksParams struct {
// Traceparent W3C trace context, propagated on delivery of every task.
Traceparent *string `json:"traceparent,omitempty"`
}
CreateTasksParams defines parameters for CreateTasks.
type CreateTasksResponse ¶
type CreateTasksResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *BatchEnqueueResponse
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseCreateTasksResponse ¶
func ParseCreateTasksResponse(rsp *http.Response) (*CreateTasksResponse, error)
ParseCreateTasksResponse parses an HTTP response from a CreateTasksWithResponse call
func (CreateTasksResponse) ContentType ¶
func (r CreateTasksResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateTasksResponse) GetBody ¶
func (r CreateTasksResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateTasksResponse) GetJSON200 ¶
func (r CreateTasksResponse) GetJSON200() *BatchEnqueueResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateTasksResponse) GetJSONDefault ¶
func (r CreateTasksResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateTasksResponse) Status ¶
func (r CreateTasksResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTasksResponse) StatusCode ¶
func (r CreateTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CronPreview ¶
type CronPreview struct {
// IntervalSeconds The shortest time between two of its runs.
IntervalSeconds int `json:"interval_seconds"`
// NextRuns The next 5 runs, from now.
NextRuns []time.Time `json:"next_runs"`
}
CronPreview defines model for CronPreview.
type DeleteAlertChannelResponse ¶
type DeleteAlertChannelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseDeleteAlertChannelResponse ¶
func ParseDeleteAlertChannelResponse(rsp *http.Response) (*DeleteAlertChannelResponse, error)
ParseDeleteAlertChannelResponse parses an HTTP response from a DeleteAlertChannelWithResponse call
func (DeleteAlertChannelResponse) ContentType ¶
func (r DeleteAlertChannelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAlertChannelResponse) GetBody ¶
func (r DeleteAlertChannelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteAlertChannelResponse) GetJSONDefault ¶
func (r DeleteAlertChannelResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (DeleteAlertChannelResponse) Status ¶
func (r DeleteAlertChannelResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAlertChannelResponse) StatusCode ¶
func (r DeleteAlertChannelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteQueueResponse ¶
type DeleteQueueResponse struct {
Body []byte
HTTPResponse *http.Response
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseDeleteQueueResponse ¶
func ParseDeleteQueueResponse(rsp *http.Response) (*DeleteQueueResponse, error)
ParseDeleteQueueResponse parses an HTTP response from a DeleteQueueWithResponse call
func (DeleteQueueResponse) ContentType ¶
func (r DeleteQueueResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteQueueResponse) GetBody ¶
func (r DeleteQueueResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteQueueResponse) GetJSONDefault ¶
func (r DeleteQueueResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (DeleteQueueResponse) Status ¶
func (r DeleteQueueResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteQueueResponse) StatusCode ¶
func (r DeleteQueueResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteScheduleResponse ¶
type DeleteScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseDeleteScheduleResponse ¶
func ParseDeleteScheduleResponse(rsp *http.Response) (*DeleteScheduleResponse, error)
ParseDeleteScheduleResponse parses an HTTP response from a DeleteScheduleWithResponse call
func (DeleteScheduleResponse) ContentType ¶
func (r DeleteScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteScheduleResponse) GetBody ¶
func (r DeleteScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteScheduleResponse) GetJSONDefault ¶
func (r DeleteScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (DeleteScheduleResponse) Status ¶
func (r DeleteScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteScheduleResponse) StatusCode ¶
func (r DeleteScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Delivery ¶
type Delivery struct {
// Body The body exactly as sent; the signature covers these bytes.
Body string `json:"body"`
// Headers Every header Workly sets, including the task's own.
Headers map[string]string `json:"headers"`
Method HTTPMethod `json:"method"`
Url string `json:"url"`
}
Delivery defines model for Delivery.
type EnqueueRequest ¶
type EnqueueRequest struct {
// Body A raw text body. Use this or `payload`.
Body *string `json:"body,omitempty"`
// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.
ContentType *string `json:"content_type,omitempty"`
// DelaySeconds Deliver after this delay. Use this or `run_at`.
DelaySeconds *float64 `json:"delay_seconds,omitempty"`
// GroupId Adds the task to this group, which must be open (`group_closed`
// otherwise). A task enqueued again with the same
// `idempotency_key` isn't added twice.
GroupId *string `json:"group_id,omitempty"`
// Headers Headers sent with every delivery. `Workly-*` headers are reserved.
Headers *map[string]string `json:"headers,omitempty"`
// IdempotencyKey Deduplicates enqueues within the queue.
IdempotencyKey *string `json:"idempotency_key,omitempty"`
// MaxAttempts Overrides the queue's `max_attempts`.
MaxAttempts *int `json:"max_attempts,omitempty"`
Method *HTTPMethod `json:"method,omitempty"`
// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.
Payload *json.RawMessage `json:"payload,omitempty"`
// RunAt Deliver at this time. Use this or `delay_seconds`.
RunAt *time.Time `json:"run_at,omitempty"`
// TimeoutSeconds Overrides the queue's `timeout_seconds`.
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
// Url The http(s) URL to deliver the task to.
//
// Example: https://api.example.com/send-email
Url string `json:"url"`
}
EnqueueRequest defines model for EnqueueRequest.
type ErrorBody ¶
type ErrorBody struct {
// Code Stable, machine-readable error code.
//
// Example: queue_not_found
Code string `json:"code"`
// Message Human-readable description.
Message string `json:"message"`
}
ErrorBody defines model for ErrorBody.
type FailureGroup ¶
type FailureGroup struct {
Count int `json:"count"`
// Error The tasks' `last_error`. Pass it as `last_error` to list or retry them.
Error string `json:"error"`
LastFailedAt time.Time `json:"last_failed_at"`
// LatestTaskId The most recently failed task in the group.
LatestTaskId string `json:"latest_task_id"`
// Outcome How a delivery attempt ended. `lost` means the result is unknown: the
// dispatcher crashed or shut down mid-delivery, and the endpoint may
// have processed the request.
Outcome *Outcome `json:"outcome,omitempty"`
// ResponseBody The start (500 bytes) of the latest task's last response body, if it had one.
ResponseBody *string `json:"response_body,omitempty"`
// StatusCode Absent if there was no response.
StatusCode *int `json:"status_code,omitempty"`
}
FailureGroup Failed tasks whose latest attempt ended the same way.
type GetActivityParams ¶
type GetActivityParams struct {
Range *GetActivityParamsRange `form:"range,omitempty" json:"range,omitempty"`
}
GetActivityParams defines parameters for GetActivity.
type GetActivityParamsRange ¶
type GetActivityParamsRange string
GetActivityParamsRange defines parameters for GetActivity.
const ( GetActivityParamsRangeN1h GetActivityParamsRange = "1h" GetActivityParamsRangeN24h GetActivityParamsRange = "24h" GetActivityParamsRangeN7d GetActivityParamsRange = "7d" )
Defines values for GetActivityParamsRange.
func (GetActivityParamsRange) Valid ¶
func (e GetActivityParamsRange) Valid() bool
Valid indicates whether the value is a known member of the GetActivityParamsRange enum.
type GetActivityResponse ¶
type GetActivityResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Activity
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetActivityResponse ¶
func ParseGetActivityResponse(rsp *http.Response) (*GetActivityResponse, error)
ParseGetActivityResponse parses an HTTP response from a GetActivityWithResponse call
func (GetActivityResponse) ContentType ¶
func (r GetActivityResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetActivityResponse) GetBody ¶
func (r GetActivityResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetActivityResponse) GetJSON200 ¶
func (r GetActivityResponse) GetJSON200() *Activity
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetActivityResponse) GetJSONDefault ¶
func (r GetActivityResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetActivityResponse) Status ¶
func (r GetActivityResponse) Status() string
Status returns HTTPResponse.Status
func (GetActivityResponse) StatusCode ¶
func (r GetActivityResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetGroupResponse ¶ added in v0.2.0
type GetGroupResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Group
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetGroupResponse ¶ added in v0.2.0
func ParseGetGroupResponse(rsp *http.Response) (*GetGroupResponse, error)
ParseGetGroupResponse parses an HTTP response from a GetGroupWithResponse call
func (GetGroupResponse) ContentType ¶ added in v0.2.0
func (r GetGroupResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetGroupResponse) GetBody ¶ added in v0.2.0
func (r GetGroupResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetGroupResponse) GetJSON200 ¶ added in v0.2.0
func (r GetGroupResponse) GetJSON200() *Group
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetGroupResponse) GetJSONDefault ¶ added in v0.2.0
func (r GetGroupResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetGroupResponse) Status ¶ added in v0.2.0
func (r GetGroupResponse) Status() string
Status returns HTTPResponse.Status
func (GetGroupResponse) StatusCode ¶ added in v0.2.0
func (r GetGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHealthzResponse ¶
type GetHealthzResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Health
}
func ParseGetHealthzResponse ¶
func ParseGetHealthzResponse(rsp *http.Response) (*GetHealthzResponse, error)
ParseGetHealthzResponse parses an HTTP response from a GetHealthzWithResponse call
func (GetHealthzResponse) ContentType ¶
func (r GetHealthzResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetHealthzResponse) GetBody ¶
func (r GetHealthzResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetHealthzResponse) GetJSON200 ¶
func (r GetHealthzResponse) GetJSON200() *Health
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetHealthzResponse) Status ¶
func (r GetHealthzResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthzResponse) StatusCode ¶
func (r GetHealthzResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetQueueActivityParams ¶
type GetQueueActivityParams struct {
// Since Defaults to 7 days ago.
Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}
GetQueueActivityParams defines parameters for GetQueueActivity.
type GetQueueActivityResponse ¶
type GetQueueActivityResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *QueueActivity
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetQueueActivityResponse ¶
func ParseGetQueueActivityResponse(rsp *http.Response) (*GetQueueActivityResponse, error)
ParseGetQueueActivityResponse parses an HTTP response from a GetQueueActivityWithResponse call
func (GetQueueActivityResponse) ContentType ¶
func (r GetQueueActivityResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetQueueActivityResponse) GetBody ¶
func (r GetQueueActivityResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetQueueActivityResponse) GetJSON200 ¶
func (r GetQueueActivityResponse) GetJSON200() *QueueActivity
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetQueueActivityResponse) GetJSONDefault ¶
func (r GetQueueActivityResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetQueueActivityResponse) Status ¶
func (r GetQueueActivityResponse) Status() string
Status returns HTTPResponse.Status
func (GetQueueActivityResponse) StatusCode ¶
func (r GetQueueActivityResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetQueueFailuresParams ¶
type GetQueueFailuresParams struct {
// Limit How many groups to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
GetQueueFailuresParams defines parameters for GetQueueFailures.
type GetQueueFailuresResponse ¶
type GetQueueFailuresResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *QueueFailures
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetQueueFailuresResponse ¶
func ParseGetQueueFailuresResponse(rsp *http.Response) (*GetQueueFailuresResponse, error)
ParseGetQueueFailuresResponse parses an HTTP response from a GetQueueFailuresWithResponse call
func (GetQueueFailuresResponse) ContentType ¶
func (r GetQueueFailuresResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetQueueFailuresResponse) GetBody ¶
func (r GetQueueFailuresResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetQueueFailuresResponse) GetJSON200 ¶
func (r GetQueueFailuresResponse) GetJSON200() *QueueFailures
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetQueueFailuresResponse) GetJSONDefault ¶
func (r GetQueueFailuresResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetQueueFailuresResponse) Status ¶
func (r GetQueueFailuresResponse) Status() string
Status returns HTTPResponse.Status
func (GetQueueFailuresResponse) StatusCode ¶
func (r GetQueueFailuresResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetQueueResponse ¶
type GetQueueResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Queue
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetQueueResponse ¶
func ParseGetQueueResponse(rsp *http.Response) (*GetQueueResponse, error)
ParseGetQueueResponse parses an HTTP response from a GetQueueWithResponse call
func (GetQueueResponse) ContentType ¶
func (r GetQueueResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetQueueResponse) GetBody ¶
func (r GetQueueResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetQueueResponse) GetJSON200 ¶
func (r GetQueueResponse) GetJSON200() *Queue
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetQueueResponse) GetJSONDefault ¶
func (r GetQueueResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetQueueResponse) Status ¶
func (r GetQueueResponse) Status() string
Status returns HTTPResponse.Status
func (GetQueueResponse) StatusCode ¶
func (r GetQueueResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetReadyzResponse ¶
type GetReadyzResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Health
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *Error
}
func ParseGetReadyzResponse ¶
func ParseGetReadyzResponse(rsp *http.Response) (*GetReadyzResponse, error)
ParseGetReadyzResponse parses an HTTP response from a GetReadyzWithResponse call
func (GetReadyzResponse) ContentType ¶
func (r GetReadyzResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetReadyzResponse) GetBody ¶
func (r GetReadyzResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetReadyzResponse) GetJSON200 ¶
func (r GetReadyzResponse) GetJSON200() *Health
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetReadyzResponse) GetJSON503 ¶
func (r GetReadyzResponse) GetJSON503() *Error
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GetReadyzResponse) Status ¶
func (r GetReadyzResponse) Status() string
Status returns HTTPResponse.Status
func (GetReadyzResponse) StatusCode ¶
func (r GetReadyzResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRunDeliveryResponse ¶
type GetRunDeliveryResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Delivery
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetRunDeliveryResponse ¶
func ParseGetRunDeliveryResponse(rsp *http.Response) (*GetRunDeliveryResponse, error)
ParseGetRunDeliveryResponse parses an HTTP response from a GetRunDeliveryWithResponse call
func (GetRunDeliveryResponse) ContentType ¶
func (r GetRunDeliveryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRunDeliveryResponse) GetBody ¶
func (r GetRunDeliveryResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetRunDeliveryResponse) GetJSON200 ¶
func (r GetRunDeliveryResponse) GetJSON200() *Delivery
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetRunDeliveryResponse) GetJSONDefault ¶
func (r GetRunDeliveryResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetRunDeliveryResponse) Status ¶
func (r GetRunDeliveryResponse) Status() string
Status returns HTTPResponse.Status
func (GetRunDeliveryResponse) StatusCode ¶
func (r GetRunDeliveryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRunResponse ¶
type GetRunResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Run
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetRunResponse ¶
func ParseGetRunResponse(rsp *http.Response) (*GetRunResponse, error)
ParseGetRunResponse parses an HTTP response from a GetRunWithResponse call
func (GetRunResponse) ContentType ¶
func (r GetRunResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRunResponse) GetBody ¶
func (r GetRunResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetRunResponse) GetJSON200 ¶
func (r GetRunResponse) GetJSON200() *Run
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetRunResponse) GetJSONDefault ¶
func (r GetRunResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetRunResponse) Status ¶
func (r GetRunResponse) Status() string
Status returns HTTPResponse.Status
func (GetRunResponse) StatusCode ¶
func (r GetRunResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetScheduleResponse ¶
type GetScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Schedule
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetScheduleResponse ¶
func ParseGetScheduleResponse(rsp *http.Response) (*GetScheduleResponse, error)
ParseGetScheduleResponse parses an HTTP response from a GetScheduleWithResponse call
func (GetScheduleResponse) ContentType ¶
func (r GetScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetScheduleResponse) GetBody ¶
func (r GetScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetScheduleResponse) GetJSON200 ¶
func (r GetScheduleResponse) GetJSON200() *Schedule
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetScheduleResponse) GetJSONDefault ¶
func (r GetScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetScheduleResponse) Status ¶
func (r GetScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (GetScheduleResponse) StatusCode ¶
func (r GetScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskDeliveryResponse ¶
type GetTaskDeliveryResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Delivery
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetTaskDeliveryResponse ¶
func ParseGetTaskDeliveryResponse(rsp *http.Response) (*GetTaskDeliveryResponse, error)
ParseGetTaskDeliveryResponse parses an HTTP response from a GetTaskDeliveryWithResponse call
func (GetTaskDeliveryResponse) ContentType ¶
func (r GetTaskDeliveryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetTaskDeliveryResponse) GetBody ¶
func (r GetTaskDeliveryResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetTaskDeliveryResponse) GetJSON200 ¶
func (r GetTaskDeliveryResponse) GetJSON200() *Delivery
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetTaskDeliveryResponse) GetJSONDefault ¶
func (r GetTaskDeliveryResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetTaskDeliveryResponse) Status ¶
func (r GetTaskDeliveryResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskDeliveryResponse) StatusCode ¶
func (r GetTaskDeliveryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskResponse ¶
type GetTaskResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Task
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetTaskResponse ¶
func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error)
ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call
func (GetTaskResponse) ContentType ¶
func (r GetTaskResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetTaskResponse) GetBody ¶
func (r GetTaskResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetTaskResponse) GetJSON200 ¶
func (r GetTaskResponse) GetJSON200() *Task
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetTaskResponse) GetJSONDefault ¶
func (r GetTaskResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetTaskResponse) Status ¶
func (r GetTaskResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskResponse) StatusCode ¶
func (r GetTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Group ¶ added in v0.2.0
type Group struct {
// CallbackTaskId The callback task, once the group has completed.
CallbackTaskId *string `json:"callback_task_id,omitempty"`
Cancelled int `json:"cancelled"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
Failed int `json:"failed"`
// FinishedAt When the group completed.
FinishedAt *time.Time `json:"finished_at,omitempty"`
// Id Example: grp_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A
Id string `json:"id"`
IdempotencyKey *string `json:"idempotency_key,omitempty"`
Name *string `json:"name,omitempty"`
// OnComplete The task a group enqueues when it completes: a `POST` whose JSON body
// is the group's summary (`GroupSummary`). It is delivered like any task
// in its queue, with the queue's retries; if the queue has been deleted
// by then, it is created again with default settings.
OnComplete *GroupCallback `json:"on_complete,omitempty"`
// Remaining Tasks still pending or running.
Remaining int `json:"remaining"`
// Status `open`: accepting tasks. `running`: closed, with tasks still to
// finish. `succeeded`: every task succeeded. `failed`: every task
// finished and at least one failed or was cancelled. Completed groups
// (`succeeded` and `failed`) don't change again, even if a task in
// them is retried.
Status GroupStatus `json:"status"`
Succeeded int `json:"succeeded"`
// Total Tasks enqueued into the group (less those whose queue was deleted).
Total int `json:"total"`
}
Group defines model for Group.
type GroupCallback ¶ added in v0.2.0
type GroupCallback struct {
// Headers Headers sent with the callback. `Workly-*` headers are reserved.
Headers *map[string]string `json:"headers,omitempty"`
// Queue The queue to enqueue the callback into.
Queue string `json:"queue"`
// Url The http(s) URL to deliver the callback to.
//
// Example: https://api.example.com/jobs/refresh-views
Url string `json:"url"`
}
GroupCallback The task a group enqueues when it completes: a `POST` whose JSON body is the group's summary (`GroupSummary`). It is delivered like any task in its queue, with the queue's retries; if the queue has been deleted by then, it is created again with default settings.
type GroupList ¶ added in v0.2.0
type GroupList struct {
Groups []Group `json:"groups"`
// NextCursor Pass as `cursor` to get the next page. Absent on the last page.
NextCursor *string `json:"next_cursor,omitempty"`
}
GroupList defines model for GroupList.
type GroupStatus ¶ added in v0.2.0
type GroupStatus string
GroupStatus `open`: accepting tasks. `running`: closed, with tasks still to finish. `succeeded`: every task succeeded. `failed`: every task finished and at least one failed or was cancelled. Completed groups (`succeeded` and `failed`) don't change again, even if a task in them is retried.
const ( GroupStatusFailed GroupStatus = "failed" GroupStatusOpen GroupStatus = "open" GroupStatusRunning GroupStatus = "running" GroupStatusSucceeded GroupStatus = "succeeded" )
Defines values for GroupStatus.
func (GroupStatus) Valid ¶ added in v0.2.0
func (e GroupStatus) Valid() bool
Valid indicates whether the value is a known member of the GroupStatus enum.
type GroupSummary ¶ added in v0.2.0
type GroupSummary struct {
Cancelled int `json:"cancelled"`
Failed int `json:"failed"`
GroupId string `json:"group_id"`
Name *string `json:"name,omitempty"`
// Status `open`: accepting tasks. `running`: closed, with tasks still to
// finish. `succeeded`: every task succeeded. `failed`: every task
// finished and at least one failed or was cancelled. Completed groups
// (`succeeded` and `failed`) don't change again, even if a task in
// them is retried.
Status GroupStatus `json:"status"`
Succeeded int `json:"succeeded"`
Total int `json:"total"`
}
GroupSummary The body of a group's callback.
type HTTPMethod ¶
type HTTPMethod string
HTTPMethod defines model for HTTPMethod.
const ( DELETE HTTPMethod = "DELETE" GET HTTPMethod = "GET" PATCH HTTPMethod = "PATCH" POST HTTPMethod = "POST" PUT HTTPMethod = "PUT" )
Defines values for HTTPMethod.
func (HTTPMethod) Valid ¶
func (e HTTPMethod) Valid() bool
Valid indicates whether the value is a known member of the HTTPMethod enum.
type Health ¶
type Health struct {
// Status Example: ok
Status string `json:"status"`
}
Health defines model for Health.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type LastRun ¶
type LastRun struct {
FinishedAt *time.Time `json:"finished_at,omitempty"`
Id string `json:"id"`
LastError *string `json:"last_error,omitempty"`
LastStatus *int `json:"last_status,omitempty"`
ScheduledFor time.Time `json:"scheduled_for"`
// State A `skipped` run was never delivered: see `skip_reason`. It can be
// retried to deliver it now.
State RunState `json:"state"`
// Trigger `schedule` for a cron slot, `manual` for "run now".
Trigger RunTrigger `json:"trigger"`
}
LastRun The schedule's most recent run. Absent before the first.
type ListAlertChannelsResponse ¶
type ListAlertChannelsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AlertChannelList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListAlertChannelsResponse ¶
func ParseListAlertChannelsResponse(rsp *http.Response) (*ListAlertChannelsResponse, error)
ParseListAlertChannelsResponse parses an HTTP response from a ListAlertChannelsWithResponse call
func (ListAlertChannelsResponse) ContentType ¶
func (r ListAlertChannelsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAlertChannelsResponse) GetBody ¶
func (r ListAlertChannelsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAlertChannelsResponse) GetJSON200 ¶
func (r ListAlertChannelsResponse) GetJSON200() *AlertChannelList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAlertChannelsResponse) GetJSONDefault ¶
func (r ListAlertChannelsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListAlertChannelsResponse) Status ¶
func (r ListAlertChannelsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAlertChannelsResponse) StatusCode ¶
func (r ListAlertChannelsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAttemptsResponse ¶
type ListAttemptsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AttemptList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListAttemptsResponse ¶
func ParseListAttemptsResponse(rsp *http.Response) (*ListAttemptsResponse, error)
ParseListAttemptsResponse parses an HTTP response from a ListAttemptsWithResponse call
func (ListAttemptsResponse) ContentType ¶
func (r ListAttemptsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAttemptsResponse) GetBody ¶
func (r ListAttemptsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAttemptsResponse) GetJSON200 ¶
func (r ListAttemptsResponse) GetJSON200() *AttemptList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAttemptsResponse) GetJSONDefault ¶
func (r ListAttemptsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListAttemptsResponse) Status ¶
func (r ListAttemptsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAttemptsResponse) StatusCode ¶
func (r ListAttemptsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListGroupsParams ¶ added in v0.2.0
type ListGroupsParams struct {
Status *GroupStatus `form:"status,omitempty" json:"status,omitempty"`
Name *string `form:"name,omitempty" json:"name,omitempty"`
// Cursor The `next_cursor` of the previous page, requested with the same
// filters and order.
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
ListGroupsParams defines parameters for ListGroups.
type ListGroupsResponse ¶ added in v0.2.0
type ListGroupsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GroupList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListGroupsResponse ¶ added in v0.2.0
func ParseListGroupsResponse(rsp *http.Response) (*ListGroupsResponse, error)
ParseListGroupsResponse parses an HTTP response from a ListGroupsWithResponse call
func (ListGroupsResponse) ContentType ¶ added in v0.2.0
func (r ListGroupsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListGroupsResponse) GetBody ¶ added in v0.2.0
func (r ListGroupsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListGroupsResponse) GetJSON200 ¶ added in v0.2.0
func (r ListGroupsResponse) GetJSON200() *GroupList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListGroupsResponse) GetJSONDefault ¶ added in v0.2.0
func (r ListGroupsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListGroupsResponse) Status ¶ added in v0.2.0
func (r ListGroupsResponse) Status() string
Status returns HTTPResponse.Status
func (ListGroupsResponse) StatusCode ¶ added in v0.2.0
func (r ListGroupsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListQueuesResponse ¶
type ListQueuesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *QueueList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListQueuesResponse ¶
func ParseListQueuesResponse(rsp *http.Response) (*ListQueuesResponse, error)
ParseListQueuesResponse parses an HTTP response from a ListQueuesWithResponse call
func (ListQueuesResponse) ContentType ¶
func (r ListQueuesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListQueuesResponse) GetBody ¶
func (r ListQueuesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListQueuesResponse) GetJSON200 ¶
func (r ListQueuesResponse) GetJSON200() *QueueList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListQueuesResponse) GetJSONDefault ¶
func (r ListQueuesResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListQueuesResponse) Status ¶
func (r ListQueuesResponse) Status() string
Status returns HTTPResponse.Status
func (ListQueuesResponse) StatusCode ¶
func (r ListQueuesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListRunAttemptsResponse ¶
type ListRunAttemptsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AttemptList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListRunAttemptsResponse ¶
func ParseListRunAttemptsResponse(rsp *http.Response) (*ListRunAttemptsResponse, error)
ParseListRunAttemptsResponse parses an HTTP response from a ListRunAttemptsWithResponse call
func (ListRunAttemptsResponse) ContentType ¶
func (r ListRunAttemptsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListRunAttemptsResponse) GetBody ¶
func (r ListRunAttemptsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListRunAttemptsResponse) GetJSON200 ¶
func (r ListRunAttemptsResponse) GetJSON200() *AttemptList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListRunAttemptsResponse) GetJSONDefault ¶
func (r ListRunAttemptsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListRunAttemptsResponse) Status ¶
func (r ListRunAttemptsResponse) Status() string
Status returns HTTPResponse.Status
func (ListRunAttemptsResponse) StatusCode ¶
func (r ListRunAttemptsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListRunsParams ¶
type ListRunsParams struct {
State *RunState `form:"state,omitempty" json:"state,omitempty"`
// Cursor The `next_cursor` of the previous page, requested with the same
// filters and order.
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
ListRunsParams defines parameters for ListRuns.
type ListRunsResponse ¶
type ListRunsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RunList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListRunsResponse ¶
func ParseListRunsResponse(rsp *http.Response) (*ListRunsResponse, error)
ParseListRunsResponse parses an HTTP response from a ListRunsWithResponse call
func (ListRunsResponse) ContentType ¶
func (r ListRunsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListRunsResponse) GetBody ¶
func (r ListRunsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListRunsResponse) GetJSON200 ¶
func (r ListRunsResponse) GetJSON200() *RunList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListRunsResponse) GetJSONDefault ¶
func (r ListRunsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListRunsResponse) Status ¶
func (r ListRunsResponse) Status() string
Status returns HTTPResponse.Status
func (ListRunsResponse) StatusCode ¶
func (r ListRunsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListSchedulesResponse ¶
type ListSchedulesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ScheduleList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListSchedulesResponse ¶
func ParseListSchedulesResponse(rsp *http.Response) (*ListSchedulesResponse, error)
ParseListSchedulesResponse parses an HTTP response from a ListSchedulesWithResponse call
func (ListSchedulesResponse) ContentType ¶
func (r ListSchedulesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListSchedulesResponse) GetBody ¶
func (r ListSchedulesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListSchedulesResponse) GetJSON200 ¶
func (r ListSchedulesResponse) GetJSON200() *ScheduleList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListSchedulesResponse) GetJSONDefault ¶
func (r ListSchedulesResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListSchedulesResponse) Status ¶
func (r ListSchedulesResponse) Status() string
Status returns HTTPResponse.Status
func (ListSchedulesResponse) StatusCode ¶
func (r ListSchedulesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListTasksParams ¶
type ListTasksParams struct {
State *TaskState `form:"state,omitempty" json:"state,omitempty"`
// LastError Only tasks whose latest error is exactly this.
LastError *LastError `form:"last_error,omitempty" json:"last_error,omitempty"`
// Sort What to order tasks by:
//
// - `created_at` (the default): when the task was enqueued.
// - `run_at`: when it runs next. Pending tasks are delivered in this
// order, so ascending lists them as they'll run.
// - `last_attempt_at`: when its latest attempt finished. Tasks never
// attempted count as oldest.
// - `attempt_count`: how many attempts it has had.
//
// Ties are broken by task ID.
Sort *ListTasksParamsSort `form:"sort,omitempty" json:"sort,omitempty"`
// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and
// to `desc` (newest or most first) for the rest.
Order *ListTasksParamsOrder `form:"order,omitempty" json:"order,omitempty"`
// Cursor The `next_cursor` of the previous page, requested with the same
// filters and order.
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
ListTasksParams defines parameters for ListTasks.
type ListTasksParamsOrder ¶ added in v0.2.0
type ListTasksParamsOrder string
ListTasksParamsOrder defines parameters for ListTasks.
const ( ListTasksParamsOrderAsc ListTasksParamsOrder = "asc" ListTasksParamsOrderDesc ListTasksParamsOrder = "desc" )
Defines values for ListTasksParamsOrder.
func (ListTasksParamsOrder) Valid ¶ added in v0.2.0
func (e ListTasksParamsOrder) Valid() bool
Valid indicates whether the value is a known member of the ListTasksParamsOrder enum.
type ListTasksParamsSort ¶ added in v0.2.0
type ListTasksParamsSort string
ListTasksParamsSort defines parameters for ListTasks.
const ( ListTasksParamsSortAttemptCount ListTasksParamsSort = "attempt_count" ListTasksParamsSortCreatedAt ListTasksParamsSort = "created_at" ListTasksParamsSortLastAttemptAt ListTasksParamsSort = "last_attempt_at" ListTasksParamsSortRunAt ListTasksParamsSort = "run_at" )
Defines values for ListTasksParamsSort.
func (ListTasksParamsSort) Valid ¶ added in v0.2.0
func (e ListTasksParamsSort) Valid() bool
Valid indicates whether the value is a known member of the ListTasksParamsSort enum.
type ListTasksResponse ¶
type ListTasksResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *TaskList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseListTasksResponse ¶
func ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error)
ParseListTasksResponse parses an HTTP response from a ListTasksWithResponse call
func (ListTasksResponse) ContentType ¶
func (r ListTasksResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListTasksResponse) GetBody ¶
func (r ListTasksResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListTasksResponse) GetJSON200 ¶
func (r ListTasksResponse) GetJSON200() *TaskList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListTasksResponse) GetJSONDefault ¶
func (r ListTasksResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListTasksResponse) Status ¶
func (r ListTasksResponse) Status() string
Status returns HTTPResponse.Status
func (ListTasksResponse) StatusCode ¶
func (r ListTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MissedPolicy ¶
type MissedPolicy string
MissedPolicy What happens to slots missed while the server was down (a slot is missed if it can't fire within a minute). `skip` records the most recent missed slot as a `skipped` run; `catch_up` runs it. Either way, at most one run is created for the missed slots.
const ( MissedPolicyCatchUp MissedPolicy = "catch_up" MissedPolicySkip MissedPolicy = "skip" )
Defines values for MissedPolicy.
func (MissedPolicy) Valid ¶
func (e MissedPolicy) Valid() bool
Valid indicates whether the value is a known member of the MissedPolicy enum.
type NewAlertChannel ¶
type NewAlertChannel struct {
// Target An email address, or a Slack incoming webhook URL.
//
// Example: oncall@example.com
Target string `json:"target"`
Type AlertChannelType `json:"type"`
}
NewAlertChannel defines model for NewAlertChannel.
type NewGroup ¶ added in v0.2.0
type NewGroup struct {
// IdempotencyKey Deduplicates group creation within the workspace.
IdempotencyKey *string `json:"idempotency_key,omitempty"`
// Name A label, e.g. the job the group is one run of. Names needn't be unique.
//
// Example: daily-stock-prices
Name *string `json:"name,omitempty"`
// OnComplete The task a group enqueues when it completes: a `POST` whose JSON body
// is the group's summary (`GroupSummary`). It is delivered like any task
// in its queue, with the queue's retries; if the queue has been deleted
// by then, it is created again with default settings.
OnComplete *GroupCallback `json:"on_complete,omitempty"`
}
NewGroup defines model for NewGroup.
type Outcome ¶
type Outcome string
Outcome How a delivery attempt ended. `lost` means the result is unknown: the dispatcher crashed or shut down mid-delivery, and the endpoint may have processed the request.
type OverlapPolicy ¶
type OverlapPolicy string
OverlapPolicy What happens when a slot comes up while the previous run is still pending or running. `skip` records the slot as a `skipped` run; `allow` runs it alongside.
const ( OverlapPolicyAllow OverlapPolicy = "allow" OverlapPolicySkip OverlapPolicy = "skip" )
Defines values for OverlapPolicy.
func (OverlapPolicy) Valid ¶
func (e OverlapPolicy) Valid() bool
Valid indicates whether the value is a known member of the OverlapPolicy enum.
type PauseQueueResponse ¶
type PauseQueueResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Queue
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParsePauseQueueResponse ¶
func ParsePauseQueueResponse(rsp *http.Response) (*PauseQueueResponse, error)
ParsePauseQueueResponse parses an HTTP response from a PauseQueueWithResponse call
func (PauseQueueResponse) ContentType ¶
func (r PauseQueueResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PauseQueueResponse) GetBody ¶
func (r PauseQueueResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PauseQueueResponse) GetJSON200 ¶
func (r PauseQueueResponse) GetJSON200() *Queue
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PauseQueueResponse) GetJSONDefault ¶
func (r PauseQueueResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (PauseQueueResponse) Status ¶
func (r PauseQueueResponse) Status() string
Status returns HTTPResponse.Status
func (PauseQueueResponse) StatusCode ¶
func (r PauseQueueResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PauseScheduleResponse ¶
type PauseScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Schedule
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParsePauseScheduleResponse ¶
func ParsePauseScheduleResponse(rsp *http.Response) (*PauseScheduleResponse, error)
ParsePauseScheduleResponse parses an HTTP response from a PauseScheduleWithResponse call
func (PauseScheduleResponse) ContentType ¶
func (r PauseScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PauseScheduleResponse) GetBody ¶
func (r PauseScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PauseScheduleResponse) GetJSON200 ¶
func (r PauseScheduleResponse) GetJSON200() *Schedule
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PauseScheduleResponse) GetJSONDefault ¶
func (r PauseScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (PauseScheduleResponse) Status ¶
func (r PauseScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (PauseScheduleResponse) StatusCode ¶
func (r PauseScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PreviewCronParams ¶
type PreviewCronParams struct {
Cron string `form:"cron" json:"cron"`
// Timezone IANA name. Defaults to UTC.
Timezone *string `form:"timezone,omitempty" json:"timezone,omitempty"`
}
PreviewCronParams defines parameters for PreviewCron.
type PreviewCronResponse ¶
type PreviewCronResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CronPreview
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParsePreviewCronResponse ¶
func ParsePreviewCronResponse(rsp *http.Response) (*PreviewCronResponse, error)
ParsePreviewCronResponse parses an HTTP response from a PreviewCronWithResponse call
func (PreviewCronResponse) ContentType ¶
func (r PreviewCronResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PreviewCronResponse) GetBody ¶
func (r PreviewCronResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PreviewCronResponse) GetJSON200 ¶
func (r PreviewCronResponse) GetJSON200() *CronPreview
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PreviewCronResponse) GetJSONDefault ¶
func (r PreviewCronResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (PreviewCronResponse) Status ¶
func (r PreviewCronResponse) Status() string
Status returns HTTPResponse.Status
func (PreviewCronResponse) StatusCode ¶
func (r PreviewCronResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PutQueueJSONRequestBody ¶
type PutQueueJSONRequestBody = QueueConfig
PutQueueJSONRequestBody defines body for PutQueue for application/json ContentType.
type PutQueueResponse ¶
type PutQueueResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Queue
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Queue
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParsePutQueueResponse ¶
func ParsePutQueueResponse(rsp *http.Response) (*PutQueueResponse, error)
ParsePutQueueResponse parses an HTTP response from a PutQueueWithResponse call
func (PutQueueResponse) ContentType ¶
func (r PutQueueResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PutQueueResponse) GetBody ¶
func (r PutQueueResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PutQueueResponse) GetJSON200 ¶
func (r PutQueueResponse) GetJSON200() *Queue
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PutQueueResponse) GetJSON201 ¶
func (r PutQueueResponse) GetJSON201() *Queue
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (PutQueueResponse) GetJSONDefault ¶
func (r PutQueueResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (PutQueueResponse) Status ¶
func (r PutQueueResponse) Status() string
Status returns HTTPResponse.Status
func (PutQueueResponse) StatusCode ¶
func (r PutQueueResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PutScheduleJSONRequestBody ¶
type PutScheduleJSONRequestBody = ScheduleConfig
PutScheduleJSONRequestBody defines body for PutSchedule for application/json ContentType.
type PutScheduleResponse ¶
type PutScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Schedule
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Schedule
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParsePutScheduleResponse ¶
func ParsePutScheduleResponse(rsp *http.Response) (*PutScheduleResponse, error)
ParsePutScheduleResponse parses an HTTP response from a PutScheduleWithResponse call
func (PutScheduleResponse) ContentType ¶
func (r PutScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PutScheduleResponse) GetBody ¶
func (r PutScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PutScheduleResponse) GetJSON200 ¶
func (r PutScheduleResponse) GetJSON200() *Schedule
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PutScheduleResponse) GetJSON201 ¶
func (r PutScheduleResponse) GetJSON201() *Schedule
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (PutScheduleResponse) GetJSONDefault ¶
func (r PutScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (PutScheduleResponse) Status ¶
func (r PutScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (PutScheduleResponse) StatusCode ¶
func (r PutScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Queue ¶
type Queue struct {
// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and
// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at
// `max_backoff_seconds`. `Retry-After` response headers are honoured.
BackoffMultiplier float64 `json:"backoff_multiplier"`
CreatedAt time.Time `json:"created_at"`
// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.
MaxAttempts int `json:"max_attempts"`
MaxBackoffSeconds float64 `json:"max_backoff_seconds"`
// MaxConcurrency Most deliveries in flight at once. There is always a limit; the
// default is low so a new queue can't overwhelm its endpoint.
MaxConcurrency int `json:"max_concurrency"`
MinBackoffSeconds float64 `json:"min_backoff_seconds"`
Name string `json:"name"`
Paused bool `json:"paused"`
// RatePerSecond Most deliveries started per second. Omit for no limit. Retries
// count; recovering a lost attempt does too. Deliveries are spread
// out evenly: after an idle spell, at most a tenth of a second's
// worth (at least 1) start at once.
RatePerSecond *float64 `json:"rate_per_second,omitempty"`
// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as
// other client errors usually fail again.
RetryOn4xx bool `json:"retry_on_4xx"`
// Stats The queue's current work. Returned when getting or listing queues.
// Counts stop at 10,000, so 10000 means "10,000 or more".
Stats *QueueStats `json:"stats,omitempty"`
// TimeoutSeconds How long to wait for a response. Tasks can override it.
TimeoutSeconds float64 `json:"timeout_seconds"`
UpdatedAt time.Time `json:"updated_at"`
}
Queue defines model for Queue.
type QueueActivity ¶
type QueueActivity struct {
Cancelled int `json:"cancelled"`
Failed int `json:"failed"`
// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).
// Absent if it keeps them forever.
RetentionSeconds *float64 `json:"retention_seconds,omitempty"`
// Since The start of the period counted.
Since time.Time `json:"since"`
Succeeded int `json:"succeeded"`
}
QueueActivity Counts stop at 10,000, so 10000 means "10,000 or more".
type QueueConfig ¶
type QueueConfig struct {
// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and
// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at
// `max_backoff_seconds`. `Retry-After` response headers are honoured.
BackoffMultiplier *float64 `json:"backoff_multiplier,omitempty"`
// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.
MaxAttempts *int `json:"max_attempts,omitempty"`
MaxBackoffSeconds *float64 `json:"max_backoff_seconds,omitempty"`
// MaxConcurrency Most deliveries in flight at once. There is always a limit; the
// default is low so a new queue can't overwhelm its endpoint.
MaxConcurrency *int `json:"max_concurrency,omitempty"`
MinBackoffSeconds *float64 `json:"min_backoff_seconds,omitempty"`
// RatePerSecond Most deliveries started per second. Omit for no limit. Retries
// count; recovering a lost attempt does too. Deliveries are spread
// out evenly: after an idle spell, at most a tenth of a second's
// worth (at least 1) start at once.
RatePerSecond *float64 `json:"rate_per_second,omitempty"`
// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as
// other client errors usually fail again.
RetryOn4xx *bool `json:"retry_on_4xx,omitempty"`
// TimeoutSeconds How long to wait for a response. Tasks can override it.
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
}
QueueConfig A queue's delivery policy. Omitted fields take the default.
type QueueFailures ¶
type QueueFailures struct {
Groups []FailureGroup `json:"groups"`
}
QueueFailures defines model for QueueFailures.
type QueueList ¶
type QueueList struct {
Queues []Queue `json:"queues"`
}
QueueList defines model for QueueList.
type QueueStats ¶
type QueueStats struct {
// Due Pending tasks that are due now.
Due int `json:"due"`
// Failed Failed tasks still retained (see `WORKLY_RETENTION`). Retry them
// with `POST /v1/queues/{queue}/retry-failed`.
Failed int `json:"failed"`
// OldestDueAt When the longest-waiting due task became due, i.e. how far behind
// the queue is. Absent when nothing is due.
OldestDueAt *time.Time `json:"oldest_due_at,omitempty"`
// Running Tasks with a delivery in flight.
Running int `json:"running"`
// Scheduled Pending tasks due later, including ones waiting to retry.
Scheduled int `json:"scheduled"`
}
QueueStats The queue's current work. Returned when getting or listing queues. Counts stop at 10,000, so 10000 means "10,000 or more".
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResumeQueueResponse ¶
type ResumeQueueResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Queue
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseResumeQueueResponse ¶
func ParseResumeQueueResponse(rsp *http.Response) (*ResumeQueueResponse, error)
ParseResumeQueueResponse parses an HTTP response from a ResumeQueueWithResponse call
func (ResumeQueueResponse) ContentType ¶
func (r ResumeQueueResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ResumeQueueResponse) GetBody ¶
func (r ResumeQueueResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ResumeQueueResponse) GetJSON200 ¶
func (r ResumeQueueResponse) GetJSON200() *Queue
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ResumeQueueResponse) GetJSONDefault ¶
func (r ResumeQueueResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ResumeQueueResponse) Status ¶
func (r ResumeQueueResponse) Status() string
Status returns HTTPResponse.Status
func (ResumeQueueResponse) StatusCode ¶
func (r ResumeQueueResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ResumeScheduleResponse ¶
type ResumeScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Schedule
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseResumeScheduleResponse ¶
func ParseResumeScheduleResponse(rsp *http.Response) (*ResumeScheduleResponse, error)
ParseResumeScheduleResponse parses an HTTP response from a ResumeScheduleWithResponse call
func (ResumeScheduleResponse) ContentType ¶
func (r ResumeScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ResumeScheduleResponse) GetBody ¶
func (r ResumeScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ResumeScheduleResponse) GetJSON200 ¶
func (r ResumeScheduleResponse) GetJSON200() *Schedule
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ResumeScheduleResponse) GetJSONDefault ¶
func (r ResumeScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ResumeScheduleResponse) Status ¶
func (r ResumeScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (ResumeScheduleResponse) StatusCode ¶
func (r ResumeScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetryFailedResult ¶
type RetryFailedResult struct {
// Retried How many failed tasks were made pending again.
Retried int `json:"retried"`
}
RetryFailedResult defines model for RetryFailedResult.
type RetryFailedTasksParams ¶
type RetryFailedTasksParams struct {
// LastError Only tasks whose latest error is exactly this.
LastError *LastError `form:"last_error,omitempty" json:"last_error,omitempty"`
}
RetryFailedTasksParams defines parameters for RetryFailedTasks.
type RetryFailedTasksResponse ¶
type RetryFailedTasksResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RetryFailedResult
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseRetryFailedTasksResponse ¶
func ParseRetryFailedTasksResponse(rsp *http.Response) (*RetryFailedTasksResponse, error)
ParseRetryFailedTasksResponse parses an HTTP response from a RetryFailedTasksWithResponse call
func (RetryFailedTasksResponse) ContentType ¶
func (r RetryFailedTasksResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RetryFailedTasksResponse) GetBody ¶
func (r RetryFailedTasksResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RetryFailedTasksResponse) GetJSON200 ¶
func (r RetryFailedTasksResponse) GetJSON200() *RetryFailedResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RetryFailedTasksResponse) GetJSONDefault ¶
func (r RetryFailedTasksResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RetryFailedTasksResponse) Status ¶
func (r RetryFailedTasksResponse) Status() string
Status returns HTTPResponse.Status
func (RetryFailedTasksResponse) StatusCode ¶
func (r RetryFailedTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetryRunResponse ¶
type RetryRunResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Run
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseRetryRunResponse ¶
func ParseRetryRunResponse(rsp *http.Response) (*RetryRunResponse, error)
ParseRetryRunResponse parses an HTTP response from a RetryRunWithResponse call
func (RetryRunResponse) ContentType ¶
func (r RetryRunResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RetryRunResponse) GetBody ¶
func (r RetryRunResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RetryRunResponse) GetJSON200 ¶
func (r RetryRunResponse) GetJSON200() *Run
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RetryRunResponse) GetJSONDefault ¶
func (r RetryRunResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RetryRunResponse) Status ¶
func (r RetryRunResponse) Status() string
Status returns HTTPResponse.Status
func (RetryRunResponse) StatusCode ¶
func (r RetryRunResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetryTaskResponse ¶
type RetryTaskResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Task
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseRetryTaskResponse ¶
func ParseRetryTaskResponse(rsp *http.Response) (*RetryTaskResponse, error)
ParseRetryTaskResponse parses an HTTP response from a RetryTaskWithResponse call
func (RetryTaskResponse) ContentType ¶
func (r RetryTaskResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RetryTaskResponse) GetBody ¶
func (r RetryTaskResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RetryTaskResponse) GetJSON200 ¶
func (r RetryTaskResponse) GetJSON200() *Task
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RetryTaskResponse) GetJSONDefault ¶
func (r RetryTaskResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RetryTaskResponse) Status ¶
func (r RetryTaskResponse) Status() string
Status returns HTTPResponse.Status
func (RetryTaskResponse) StatusCode ¶
func (r RetryTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Run ¶
type Run struct {
AttemptCount int `json:"attempt_count"`
// Body The body, when it is not JSON.
Body *string `json:"body,omitempty"`
CreatedAt time.Time `json:"created_at"`
// FinishedAt When the run succeeded, failed, was cancelled or was skipped.
FinishedAt *time.Time `json:"finished_at,omitempty"`
Headers map[string]string `json:"headers"`
// Id Example: run_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A
Id string `json:"id"`
LastAttemptAt *time.Time `json:"last_attempt_at,omitempty"`
LastError *string `json:"last_error,omitempty"`
// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the
// dispatcher crashed or shut down mid-delivery, and the endpoint may
// have processed the request.
LastOutcome *Outcome `json:"last_outcome,omitempty"`
// LastStatus HTTP status of the latest attempt, if it got a response.
LastStatus *int `json:"last_status,omitempty"`
Method HTTPMethod `json:"method"`
// Payload The body, when it is JSON.
Payload *json.RawMessage `json:"payload,omitempty"`
// RetriedAt When the run was last retried by hand. Absent if never.
RetriedAt *time.Time `json:"retried_at,omitempty"`
// RunAt When the run is next eligible for delivery.
RunAt time.Time `json:"run_at"`
Schedule string `json:"schedule"`
// ScheduledFor The cron slot, or when a manual run was triggered. Sent as `Workly-Scheduled-For`.
ScheduledFor time.Time `json:"scheduled_for"`
// SkipReason `overlap`: the previous run was still pending or running (overlap
// policy `skip`). `missed`: the server was down at the slot (missed
// policy `skip`).
SkipReason *SkipReason `json:"skip_reason,omitempty"`
// State A `skipped` run was never delivered: see `skip_reason`. It can be
// retried to deliver it now.
State RunState `json:"state"`
// Trigger `schedule` for a cron slot, `manual` for "run now".
Trigger RunTrigger `json:"trigger"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Run defines model for Run.
type RunList ¶
type RunList struct {
// NextCursor Pass as `cursor` to get the next page. Absent on the last page.
NextCursor *string `json:"next_cursor,omitempty"`
Runs []Run `json:"runs"`
}
RunList defines model for RunList.
type RunState ¶
type RunState string
RunState A `skipped` run was never delivered: see `skip_reason`. It can be retried to deliver it now.
type RunTrigger ¶
type RunTrigger string
RunTrigger `schedule` for a cron slot, `manual` for "run now".
const ( RunTriggerManual RunTrigger = "manual" RunTriggerSchedule RunTrigger = "schedule" )
Defines values for RunTrigger.
func (RunTrigger) Valid ¶
func (e RunTrigger) Valid() bool
Valid indicates whether the value is a known member of the RunTrigger enum.
type Schedule ¶
type Schedule struct {
BackoffMultiplier float64 `json:"backoff_multiplier"`
// Body The body, when it is not JSON.
Body *string `json:"body,omitempty"`
CreatedAt time.Time `json:"created_at"`
Cron string `json:"cron"`
Headers map[string]string `json:"headers"`
// LastRun The schedule's most recent run. Absent before the first.
LastRun *LastRun `json:"last_run,omitempty"`
MaxAttempts int `json:"max_attempts"`
MaxBackoffSeconds float64 `json:"max_backoff_seconds"`
Method HTTPMethod `json:"method"`
MinBackoffSeconds float64 `json:"min_backoff_seconds"`
// Missed What happens to slots missed while the server was down (a slot is
// missed if it can't fire within a minute). `skip` records the most
// recent missed slot as a `skipped` run; `catch_up` runs it. Either
// way, at most one run is created for the missed slots.
Missed MissedPolicy `json:"missed"`
Name string `json:"name"`
// NextRunAt When the schedule next fires. Absent while paused.
NextRunAt *time.Time `json:"next_run_at,omitempty"`
// NextRuns The next five slots, also while paused (as if resumed now).
NextRuns []time.Time `json:"next_runs"`
// Overlap What happens when a slot comes up while the previous run is still
// pending or running. `skip` records the slot as a `skipped` run;
// `allow` runs it alongside.
Overlap OverlapPolicy `json:"overlap"`
Paused bool `json:"paused"`
// Payload The body, when it is JSON.
Payload *json.RawMessage `json:"payload,omitempty"`
RetryOn4xx bool `json:"retry_on_4xx"`
TimeoutSeconds float64 `json:"timeout_seconds"`
Timezone string `json:"timezone"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Schedule defines model for Schedule.
type ScheduleConfig ¶
type ScheduleConfig struct {
// BackoffMultiplier Retries back off as for queues (see `QueueConfig`).
BackoffMultiplier *float64 `json:"backoff_multiplier,omitempty"`
// Body A raw text body. Use this or `payload`.
Body *string `json:"body,omitempty"`
// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.
ContentType *string `json:"content_type,omitempty"`
// Cron When to run: five fields (minute, hour, day of month, month, day
// of week) with `*`, lists, ranges, steps and names (`jan`, `mon`),
// or `@yearly`, `@monthly`, `@weekly`, `@daily` or `@hourly`. When
// both day fields are restricted, a day matches either.
//
//
// Example: 0 3 * * *
Cron string `json:"cron"`
// Headers Headers sent with every run. `Workly-*` headers are reserved.
Headers *map[string]string `json:"headers,omitempty"`
// MaxAttempts Total delivery attempts before a run fails.
MaxAttempts *int `json:"max_attempts,omitempty"`
MaxBackoffSeconds *float64 `json:"max_backoff_seconds,omitempty"`
Method *HTTPMethod `json:"method,omitempty"`
MinBackoffSeconds *float64 `json:"min_backoff_seconds,omitempty"`
// Missed What happens to slots missed while the server was down (a slot is
// missed if it can't fire within a minute). `skip` records the most
// recent missed slot as a `skipped` run; `catch_up` runs it. Either
// way, at most one run is created for the missed slots.
Missed *MissedPolicy `json:"missed,omitempty"`
// Overlap What happens when a slot comes up while the previous run is still
// pending or running. `skip` records the slot as a `skipped` run;
// `allow` runs it alongside.
Overlap *OverlapPolicy `json:"overlap,omitempty"`
// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.
Payload *json.RawMessage `json:"payload,omitempty"`
// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried.
RetryOn4xx *bool `json:"retry_on_4xx,omitempty"`
// TimeoutSeconds How long to wait for a response.
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
// Timezone IANA timezone the cron expression is read in, e.g.
// `Europe/Stockholm`. A slot in the hour skipped by a daylight
// saving change runs right after it; a slot in a repeated hour runs
// once.
Timezone *string `json:"timezone,omitempty"`
// Url The http(s) URL to call.
//
// Example: https://api.example.com/reports/nightly
Url string `json:"url"`
}
ScheduleConfig A schedule's settings. Omitted fields take the default. The request fields (`url` to `content_type`) work as in `EnqueueRequest`.
type ScheduleList ¶
type ScheduleList struct {
Schedules []Schedule `json:"schedules"`
}
ScheduleList defines model for ScheduleList.
type SearchTasksParams ¶
type SearchTasksParams struct {
Queue *string `form:"queue,omitempty" json:"queue,omitempty"`
State *TaskState `form:"state,omitempty" json:"state,omitempty"`
IdempotencyKey *string `form:"idempotency_key,omitempty" json:"idempotency_key,omitempty"`
// GroupId Only the tasks of this group.
GroupId *string `form:"group_id,omitempty" json:"group_id,omitempty"`
// LastError Only tasks whose latest error is exactly this.
LastError *LastError `form:"last_error,omitempty" json:"last_error,omitempty"`
// CreatedAfter Only tasks created at or after this time.
CreatedAfter *time.Time `form:"created_after,omitempty" json:"created_after,omitempty"`
// CreatedBefore Only tasks created before this time.
CreatedBefore *time.Time `form:"created_before,omitempty" json:"created_before,omitempty"`
// Sort What to order tasks by:
//
// - `created_at` (the default): when the task was enqueued.
// - `run_at`: when it runs next. Pending tasks are delivered in this
// order, so ascending lists them as they'll run.
// - `last_attempt_at`: when its latest attempt finished. Tasks never
// attempted count as oldest.
// - `attempt_count`: how many attempts it has had.
//
// Ties are broken by task ID.
Sort *SearchTasksParamsSort `form:"sort,omitempty" json:"sort,omitempty"`
// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and
// to `desc` (newest or most first) for the rest.
Order *SearchTasksParamsOrder `form:"order,omitempty" json:"order,omitempty"`
// Cursor The `next_cursor` of the previous page, requested with the same
// filters and order.
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
SearchTasksParams defines parameters for SearchTasks.
type SearchTasksParamsOrder ¶ added in v0.2.0
type SearchTasksParamsOrder string
SearchTasksParamsOrder defines parameters for SearchTasks.
const ( SearchTasksParamsOrderAsc SearchTasksParamsOrder = "asc" SearchTasksParamsOrderDesc SearchTasksParamsOrder = "desc" )
Defines values for SearchTasksParamsOrder.
func (SearchTasksParamsOrder) Valid ¶ added in v0.2.0
func (e SearchTasksParamsOrder) Valid() bool
Valid indicates whether the value is a known member of the SearchTasksParamsOrder enum.
type SearchTasksParamsSort ¶ added in v0.2.0
type SearchTasksParamsSort string
SearchTasksParamsSort defines parameters for SearchTasks.
const ( SearchTasksParamsSortAttemptCount SearchTasksParamsSort = "attempt_count" SearchTasksParamsSortCreatedAt SearchTasksParamsSort = "created_at" SearchTasksParamsSortLastAttemptAt SearchTasksParamsSort = "last_attempt_at" SearchTasksParamsSortRunAt SearchTasksParamsSort = "run_at" )
Defines values for SearchTasksParamsSort.
func (SearchTasksParamsSort) Valid ¶ added in v0.2.0
func (e SearchTasksParamsSort) Valid() bool
Valid indicates whether the value is a known member of the SearchTasksParamsSort enum.
type SearchTasksResponse ¶
type SearchTasksResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *TaskList
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseSearchTasksResponse ¶
func ParseSearchTasksResponse(rsp *http.Response) (*SearchTasksResponse, error)
ParseSearchTasksResponse parses an HTTP response from a SearchTasksWithResponse call
func (SearchTasksResponse) ContentType ¶
func (r SearchTasksResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SearchTasksResponse) GetBody ¶
func (r SearchTasksResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SearchTasksResponse) GetJSON200 ¶
func (r SearchTasksResponse) GetJSON200() *TaskList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SearchTasksResponse) GetJSONDefault ¶
func (r SearchTasksResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (SearchTasksResponse) Status ¶
func (r SearchTasksResponse) Status() string
Status returns HTTPResponse.Status
func (SearchTasksResponse) StatusCode ¶
func (r SearchTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SkipReason ¶
type SkipReason string
SkipReason `overlap`: the previous run was still pending or running (overlap policy `skip`). `missed`: the server was down at the slot (missed policy `skip`).
const ( Missed SkipReason = "missed" Overlap SkipReason = "overlap" )
Defines values for SkipReason.
func (SkipReason) Valid ¶
func (e SkipReason) Valid() bool
Valid indicates whether the value is a known member of the SkipReason enum.
type SortOrder ¶ added in v0.2.0
type SortOrder string
SortOrder defines model for SortOrder.
Defines values for SortOrder.
type Task ¶
type Task struct {
AttemptCount int `json:"attempt_count"`
// Body The body, when it is not JSON.
Body *string `json:"body,omitempty"`
CreatedAt time.Time `json:"created_at"`
// FinishedAt When the task succeeded, failed or was cancelled.
FinishedAt *time.Time `json:"finished_at,omitempty"`
// GroupId The group the task belongs to, if any.
GroupId *string `json:"group_id,omitempty"`
Headers map[string]string `json:"headers"`
// Id Example: task_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A
Id string `json:"id"`
IdempotencyKey *string `json:"idempotency_key,omitempty"`
// LastAttemptAt When the latest attempt finished. Absent before the first attempt.
LastAttemptAt *time.Time `json:"last_attempt_at,omitempty"`
LastError *string `json:"last_error,omitempty"`
// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the
// dispatcher crashed or shut down mid-delivery, and the endpoint may
// have processed the request.
LastOutcome *Outcome `json:"last_outcome,omitempty"`
// LastStatus HTTP status of the latest attempt, if it got a response.
LastStatus *int `json:"last_status,omitempty"`
// MaxAttempts Per-task override, if set.
MaxAttempts *int `json:"max_attempts,omitempty"`
Method HTTPMethod `json:"method"`
// Payload The body, when it is JSON.
Payload *json.RawMessage `json:"payload,omitempty"`
Queue string `json:"queue"`
// RetriedAt When the task was last retried by hand (`POST /v1/tasks/{id}/retry`
// or `POST /v1/queues/{queue}/retry-failed`). Absent if never.
RetriedAt *time.Time `json:"retried_at,omitempty"`
// RunAt When the task is next eligible for delivery.
RunAt time.Time `json:"run_at"`
// State A `pending` task with `run_at` in the future is scheduled. A `failed`
// task has exhausted its attempts or got a non-retryable response.
State TaskState `json:"state"`
// TimeoutSeconds Per-task override, if set.
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Task defines model for Task.
type TaskList ¶
type TaskList struct {
// NextCursor Pass as `cursor` to get the next page. Absent on the last page.
NextCursor *string `json:"next_cursor,omitempty"`
Tasks []Task `json:"tasks"`
}
TaskList defines model for TaskList.
type TaskSort ¶ added in v0.2.0
type TaskSort string
TaskSort defines model for TaskSort.
type TaskState ¶
type TaskState string
TaskState A `pending` task with `run_at` in the future is scheduled. A `failed` task has exhausted its attempts or got a non-retryable response.
type TestAlertChannelResponse ¶
type TestAlertChannelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseTestAlertChannelResponse ¶
func ParseTestAlertChannelResponse(rsp *http.Response) (*TestAlertChannelResponse, error)
ParseTestAlertChannelResponse parses an HTTP response from a TestAlertChannelWithResponse call
func (TestAlertChannelResponse) ContentType ¶
func (r TestAlertChannelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (TestAlertChannelResponse) GetBody ¶
func (r TestAlertChannelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (TestAlertChannelResponse) GetJSONDefault ¶
func (r TestAlertChannelResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (TestAlertChannelResponse) Status ¶
func (r TestAlertChannelResponse) Status() string
Status returns HTTPResponse.Status
func (TestAlertChannelResponse) StatusCode ¶
func (r TestAlertChannelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TriggerScheduleResponse ¶
type TriggerScheduleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Run
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseTriggerScheduleResponse ¶
func ParseTriggerScheduleResponse(rsp *http.Response) (*TriggerScheduleResponse, error)
ParseTriggerScheduleResponse parses an HTTP response from a TriggerScheduleWithResponse call
func (TriggerScheduleResponse) ContentType ¶
func (r TriggerScheduleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (TriggerScheduleResponse) GetBody ¶
func (r TriggerScheduleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (TriggerScheduleResponse) GetJSON201 ¶
func (r TriggerScheduleResponse) GetJSON201() *Run
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (TriggerScheduleResponse) GetJSONDefault ¶
func (r TriggerScheduleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (TriggerScheduleResponse) Status ¶
func (r TriggerScheduleResponse) Status() string
Status returns HTTPResponse.Status
func (TriggerScheduleResponse) StatusCode ¶
func (r TriggerScheduleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode