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.6.0 DO NOT EDIT.
Index ¶
- Constants
- func NewDeleteRunV1Request(server string, runId int) (*http.Request, error)
- func NewGetRunV1Request(server string, runId int) (*http.Request, error)
- func NewGetTaskV1Request(server string, task string) (*http.Request, error)
- func NewGetWorkV1Request(server string) (*http.Request, error)
- func NewListRunsV1Request(server string, params *ListRunsV1Params) (*http.Request, error)
- func NewListTaskRecentTaskResultsV1Request(server string, task string, params *ListTaskRecentTaskResultsV1Params) (*http.Request, error)
- func NewListTaskResultsV1Request(server string, params *ListTaskResultsV1Params) (*http.Request, error)
- func NewListTasksV1Request(server string, params *ListTasksV1Params) (*http.Request, error)
- func NewReportWorkV1Request(server string, body ReportWorkV1JSONRequestBody) (*http.Request, error)
- func NewReportWorkV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewScheduleRunV1Request(server string, body ScheduleRunV1JSONRequestBody) (*http.Request, error)
- func NewScheduleRunV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) DeleteRunV1(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetRunV1(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTaskV1(ctx context.Context, task string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetWorkV1(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListRunsV1(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListTaskRecentTaskResultsV1(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, ...) (*http.Response, error)
- func (c *Client) ListTaskResultsV1(ctx context.Context, params *ListTaskResultsV1Params, ...) (*http.Response, error)
- func (c *Client) ListTasksV1(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ReportWorkV1(ctx context.Context, body ReportWorkV1JSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ReportWorkV1WithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ScheduleRunV1(ctx context.Context, body ScheduleRunV1JSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ScheduleRunV1WithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*DeleteRunV1ResponseBody, error)
- func (c *ClientWithResponses) GetRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*GetRunV1ResponseBody, error)
- func (c *ClientWithResponses) GetTaskV1WithResponse(ctx context.Context, task string, reqEditors ...RequestEditorFn) (*GetTaskV1ResponseBody, error)
- func (c *ClientWithResponses) GetWorkV1WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWorkV1ResponseBody, error)
- func (c *ClientWithResponses) ListRunsV1WithResponse(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*ListRunsV1ResponseBody, error)
- func (c *ClientWithResponses) ListTaskRecentTaskResultsV1WithResponse(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, ...) (*ListTaskRecentTaskResultsV1ResponseBody, error)
- func (c *ClientWithResponses) ListTaskResultsV1WithResponse(ctx context.Context, params *ListTaskResultsV1Params, ...) (*ListTaskResultsV1ResponseBody, error)
- func (c *ClientWithResponses) ListTasksV1WithResponse(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*ListTasksV1ResponseBody, error)
- func (c *ClientWithResponses) ReportWorkV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ReportWorkV1ResponseBody, error)
- func (c *ClientWithResponses) ReportWorkV1WithResponse(ctx context.Context, body ReportWorkV1JSONRequestBody, ...) (*ReportWorkV1ResponseBody, error)
- func (c *ClientWithResponses) ScheduleRunV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ScheduleRunV1ResponseBody, error)
- func (c *ClientWithResponses) ScheduleRunV1WithResponse(ctx context.Context, body ScheduleRunV1JSONRequestBody, ...) (*ScheduleRunV1ResponseBody, error)
- type ClientWithResponsesInterface
- type CustomClientWithResponsesOptions
- type DeleteRunV1Response
- type DeleteRunV1ResponseBody
- type Error
- type ErrorDetail
- type GetRunV1Response
- type GetRunV1ResponseBody
- type GetTaskV1Response
- type GetTaskV1ResponseBody
- type GetWorkV1Response
- type GetWorkV1ResponseBody
- type HttpRequestDoer
- type ListOptions
- type ListRunsV1Params
- type ListRunsV1Response
- type ListRunsV1ResponseBody
- type ListTaskRecentTaskResultsV1Params
- type ListTaskRecentTaskResultsV1Response
- type ListTaskRecentTaskResultsV1ResponseBody
- type ListTaskResultsV1Params
- type ListTaskResultsV1Response
- type ListTaskResultsV1ResponseBody
- type ListTasksV1Params
- type ListTasksV1Response
- type ListTasksV1ResponseBody
- type ListTasksV1ResponseTask
- type Page
- type ReportWorkV1JSONRequestBody
- type ReportWorkV1Request
- type ReportWorkV1Response
- type ReportWorkV1ResponseBody
- type ReportWorkV1ResponseResult
- type ReportWorkV1TaskResult
- type RequestEditorFn
- type RunStatusV1
- type RunV1
- type RunV1Reason
- type ScheduleRunV1JSONRequestBody
- type ScheduleRunV1Request
- type ScheduleRunV1Response
- type ScheduleRunV1ResponseBody
- type TaskResultStateV1
- type TaskResultV1
- type TaskV1Input
- type Unauthorized
- type WorkTaskV1
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewDeleteRunV1Request ¶
NewDeleteRunV1Request generates requests for DeleteRunV1
func NewGetRunV1Request ¶
NewGetRunV1Request generates requests for GetRunV1
func NewGetTaskV1Request ¶
NewGetTaskV1Request generates requests for GetTaskV1
func NewGetWorkV1Request ¶
NewGetWorkV1Request generates requests for GetWorkV1
func NewListRunsV1Request ¶
func NewListRunsV1Request(server string, params *ListRunsV1Params) (*http.Request, error)
NewListRunsV1Request generates requests for ListRunsV1
func NewListTaskRecentTaskResultsV1Request ¶
func NewListTaskRecentTaskResultsV1Request(server string, task string, params *ListTaskRecentTaskResultsV1Params) (*http.Request, error)
NewListTaskRecentTaskResultsV1Request generates requests for ListTaskRecentTaskResultsV1
func NewListTaskResultsV1Request ¶
func NewListTaskResultsV1Request(server string, params *ListTaskResultsV1Params) (*http.Request, error)
NewListTaskResultsV1Request generates requests for ListTaskResultsV1
func NewListTasksV1Request ¶
func NewListTasksV1Request(server string, params *ListTasksV1Params) (*http.Request, error)
NewListTasksV1Request generates requests for ListTasksV1
func NewReportWorkV1Request ¶
func NewReportWorkV1Request(server string, body ReportWorkV1JSONRequestBody) (*http.Request, error)
NewReportWorkV1Request calls the generic ReportWorkV1 builder with application/json body
func NewReportWorkV1RequestWithBody ¶
func NewReportWorkV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewReportWorkV1RequestWithBody generates requests for ReportWorkV1 with any type of body
func NewScheduleRunV1Request ¶
func NewScheduleRunV1Request(server string, body ScheduleRunV1JSONRequestBody) (*http.Request, error)
NewScheduleRunV1Request calls the generic ScheduleRunV1 builder with application/json body
Types ¶
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) DeleteRunV1 ¶
func (*Client) ListRunsV1 ¶
func (c *Client) ListRunsV1(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListTaskRecentTaskResultsV1 ¶
func (c *Client) ListTaskRecentTaskResultsV1(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListTaskResultsV1 ¶
func (c *Client) ListTaskResultsV1(ctx context.Context, params *ListTaskResultsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListTasksV1 ¶
func (c *Client) ListTasksV1(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReportWorkV1 ¶
func (c *Client) ReportWorkV1(ctx context.Context, body ReportWorkV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReportWorkV1WithBody ¶
func (*Client) ScheduleRunV1 ¶
func (c *Client) ScheduleRunV1(ctx context.Context, body ScheduleRunV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListRunsV1 request
ListRunsV1(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
// ScheduleRunV1WithBody request with any body
ScheduleRunV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ScheduleRunV1(ctx context.Context, body ScheduleRunV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteRunV1 request
DeleteRunV1(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRunV1 request
GetRunV1(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListTaskResultsV1 request
ListTaskResultsV1(ctx context.Context, params *ListTaskResultsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListTasksV1 request
ListTasksV1(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTaskV1 request
GetTaskV1(ctx context.Context, task string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListTaskRecentTaskResultsV1 request
ListTaskRecentTaskResultsV1(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetWorkV1 request
GetWorkV1(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReportWorkV1WithBody request with any body
ReportWorkV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReportWorkV1(ctx context.Context, body ReportWorkV1JSONRequestBody, 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) DeleteRunV1WithResponse ¶
func (c *ClientWithResponses) DeleteRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*DeleteRunV1ResponseBody, error)
DeleteRunV1WithResponse request returning *DeleteRunV1ResponseBody
func (*ClientWithResponses) GetRunV1WithResponse ¶
func (c *ClientWithResponses) GetRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*GetRunV1ResponseBody, error)
GetRunV1WithResponse request returning *GetRunV1ResponseBody
func (*ClientWithResponses) GetTaskV1WithResponse ¶
func (c *ClientWithResponses) GetTaskV1WithResponse(ctx context.Context, task string, reqEditors ...RequestEditorFn) (*GetTaskV1ResponseBody, error)
GetTaskV1WithResponse request returning *GetTaskV1ResponseBody
func (*ClientWithResponses) GetWorkV1WithResponse ¶
func (c *ClientWithResponses) GetWorkV1WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWorkV1ResponseBody, error)
GetWorkV1WithResponse request returning *GetWorkV1ResponseBody
func (*ClientWithResponses) ListRunsV1WithResponse ¶
func (c *ClientWithResponses) ListRunsV1WithResponse(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*ListRunsV1ResponseBody, error)
ListRunsV1WithResponse request returning *ListRunsV1ResponseBody
func (*ClientWithResponses) ListTaskRecentTaskResultsV1WithResponse ¶
func (c *ClientWithResponses) ListTaskRecentTaskResultsV1WithResponse(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, reqEditors ...RequestEditorFn) (*ListTaskRecentTaskResultsV1ResponseBody, error)
ListTaskRecentTaskResultsV1WithResponse request returning *ListTaskRecentTaskResultsV1ResponseBody
func (*ClientWithResponses) ListTaskResultsV1WithResponse ¶
func (c *ClientWithResponses) ListTaskResultsV1WithResponse(ctx context.Context, params *ListTaskResultsV1Params, reqEditors ...RequestEditorFn) (*ListTaskResultsV1ResponseBody, error)
ListTaskResultsV1WithResponse request returning *ListTaskResultsV1ResponseBody
func (*ClientWithResponses) ListTasksV1WithResponse ¶
func (c *ClientWithResponses) ListTasksV1WithResponse(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*ListTasksV1ResponseBody, error)
ListTasksV1WithResponse request returning *ListTasksV1ResponseBody
func (*ClientWithResponses) ReportWorkV1WithBodyWithResponse ¶
func (c *ClientWithResponses) ReportWorkV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportWorkV1ResponseBody, error)
ReportWorkV1WithBodyWithResponse request with arbitrary body returning *ReportWorkV1ResponseBody
func (*ClientWithResponses) ReportWorkV1WithResponse ¶
func (c *ClientWithResponses) ReportWorkV1WithResponse(ctx context.Context, body ReportWorkV1JSONRequestBody, reqEditors ...RequestEditorFn) (*ReportWorkV1ResponseBody, error)
func (*ClientWithResponses) ScheduleRunV1WithBodyWithResponse ¶
func (c *ClientWithResponses) ScheduleRunV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ScheduleRunV1ResponseBody, error)
ScheduleRunV1WithBodyWithResponse request with arbitrary body returning *ScheduleRunV1ResponseBody
func (*ClientWithResponses) ScheduleRunV1WithResponse ¶
func (c *ClientWithResponses) ScheduleRunV1WithResponse(ctx context.Context, body ScheduleRunV1JSONRequestBody, reqEditors ...RequestEditorFn) (*ScheduleRunV1ResponseBody, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListRunsV1WithResponse request
ListRunsV1WithResponse(ctx context.Context, params *ListRunsV1Params, reqEditors ...RequestEditorFn) (*ListRunsV1ResponseBody, error)
// ScheduleRunV1WithBodyWithResponse request with any body
ScheduleRunV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ScheduleRunV1ResponseBody, error)
ScheduleRunV1WithResponse(ctx context.Context, body ScheduleRunV1JSONRequestBody, reqEditors ...RequestEditorFn) (*ScheduleRunV1ResponseBody, error)
// DeleteRunV1WithResponse request
DeleteRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*DeleteRunV1ResponseBody, error)
// GetRunV1WithResponse request
GetRunV1WithResponse(ctx context.Context, runId int, reqEditors ...RequestEditorFn) (*GetRunV1ResponseBody, error)
// ListTaskResultsV1WithResponse request
ListTaskResultsV1WithResponse(ctx context.Context, params *ListTaskResultsV1Params, reqEditors ...RequestEditorFn) (*ListTaskResultsV1ResponseBody, error)
// ListTasksV1WithResponse request
ListTasksV1WithResponse(ctx context.Context, params *ListTasksV1Params, reqEditors ...RequestEditorFn) (*ListTasksV1ResponseBody, error)
// GetTaskV1WithResponse request
GetTaskV1WithResponse(ctx context.Context, task string, reqEditors ...RequestEditorFn) (*GetTaskV1ResponseBody, error)
// ListTaskRecentTaskResultsV1WithResponse request
ListTaskRecentTaskResultsV1WithResponse(ctx context.Context, task string, params *ListTaskRecentTaskResultsV1Params, reqEditors ...RequestEditorFn) (*ListTaskRecentTaskResultsV1ResponseBody, error)
// GetWorkV1WithResponse request
GetWorkV1WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWorkV1ResponseBody, error)
// ReportWorkV1WithBodyWithResponse request with any body
ReportWorkV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportWorkV1ResponseBody, error)
ReportWorkV1WithResponse(ctx context.Context, body ReportWorkV1JSONRequestBody, reqEditors ...RequestEditorFn) (*ReportWorkV1ResponseBody, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
func NewCustomClientWithResponses ¶
func NewCustomClientWithResponses(opts CustomClientWithResponsesOptions) (ClientWithResponsesInterface, error)
NewCustomClientWithResponses wraps NewClientWithResponses. It provides useful defaults for the API client.
type CustomClientWithResponsesOptions ¶
type CustomClientWithResponsesOptions struct {
ApiKey string `json:"-"` // Add json tag to work around gosec G117
BaseUrl string
HttpClient *http.Client
}
CustomClientWithResponsesOptions defines options for NewCustomClientWithResponses.
type DeleteRunV1Response ¶
type DeleteRunV1Response = map[string]interface{}
DeleteRunV1Response defines model for DeleteRunV1Response.
type DeleteRunV1ResponseBody ¶
type DeleteRunV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DeleteRunV1Response
JSON400 *Error
JSON401 *Unauthorized
JSON404 *Error
}
func ParseDeleteRunV1ResponseBody ¶
func ParseDeleteRunV1ResponseBody(rsp *http.Response) (*DeleteRunV1ResponseBody, error)
ParseDeleteRunV1ResponseBody parses an HTTP response from a DeleteRunV1WithResponse call
func (DeleteRunV1ResponseBody) Status ¶
func (r DeleteRunV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (DeleteRunV1ResponseBody) StatusCode ¶
func (r DeleteRunV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct {
// Errors A list of errors.
Errors []ErrorDetail `json:"errors"`
}
Error defines model for Error.
type ErrorDetail ¶
type ErrorDetail struct {
// Detail A human-readable message that provides more details about the error.
Detail *string `json:"detail,omitempty"`
// Error Internal identifier of the error.
Error int `json:"error"`
// Message A short, human-readable error message.
Message string `json:"message"`
}
ErrorDetail defines model for ErrorDetail.
type GetRunV1Response ¶
type GetRunV1Response struct {
Run RunV1 `json:"run"`
}
GetRunV1Response defines model for GetRunV1Response.
type GetRunV1ResponseBody ¶
type GetRunV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetRunV1Response
JSON401 *Unauthorized
JSON404 *Error
}
func ParseGetRunV1ResponseBody ¶
func ParseGetRunV1ResponseBody(rsp *http.Response) (*GetRunV1ResponseBody, error)
ParseGetRunV1ResponseBody parses an HTTP response from a GetRunV1WithResponse call
func (GetRunV1ResponseBody) Status ¶
func (r GetRunV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (GetRunV1ResponseBody) StatusCode ¶
func (r GetRunV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskV1Response ¶
type GetTaskV1Response struct {
Content string `json:"content"`
Hash string `json:"hash"`
Inputs *[]TaskV1Input `json:"inputs,omitempty"`
Name string `json:"name"`
}
GetTaskV1Response defines model for GetTaskV1Response.
type GetTaskV1ResponseBody ¶
type GetTaskV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetTaskV1Response
JSON401 *Unauthorized
JSON404 *Error
JSON500 *Error
}
func ParseGetTaskV1ResponseBody ¶
func ParseGetTaskV1ResponseBody(rsp *http.Response) (*GetTaskV1ResponseBody, error)
ParseGetTaskV1ResponseBody parses an HTTP response from a GetTaskV1WithResponse call
func (GetTaskV1ResponseBody) Status ¶
func (r GetTaskV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (GetTaskV1ResponseBody) StatusCode ¶
func (r GetTaskV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetWorkV1Response ¶
type GetWorkV1Response struct {
// Repositories Names of repositories for which to apply the tasks.
Repositories *[]string `json:"repositories,omitempty"`
// RunData Run data.
RunData *map[string]string `json:"runData,omitempty"`
// RunID Internal identifier of the unit of work.
RunID int `json:"runID"`
// Task The task to execute.
Task WorkTaskV1 `json:"task"`
}
GetWorkV1Response defines model for GetWorkV1Response.
type GetWorkV1ResponseBody ¶
type GetWorkV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetWorkV1Response
JSON401 *Unauthorized
}
func ParseGetWorkV1ResponseBody ¶
func ParseGetWorkV1ResponseBody(rsp *http.Response) (*GetWorkV1ResponseBody, error)
ParseGetWorkV1ResponseBody parses an HTTP response from a GetWorkV1WithResponse call
func (GetWorkV1ResponseBody) Status ¶
func (r GetWorkV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (GetWorkV1ResponseBody) StatusCode ¶
func (r GetWorkV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListOptions ¶
ListOptions defines model for ListOptions.
type ListRunsV1Params ¶
type ListRunsV1Params struct {
// Task Name of the task to filter by.
Task *string `form:"task,omitempty" json:"task,omitempty"`
ListOptions *ListOptions `form:"listOptions,omitempty" json:"listOptions,omitempty"`
Status *[]RunStatusV1 `form:"status,omitempty" json:"status,omitempty"`
}
ListRunsV1Params defines parameters for ListRunsV1.
type ListRunsV1Response ¶
type ListRunsV1Response struct {
Page Page `json:"page"`
// Result List of runs.
Result []RunV1 `json:"result"`
}
ListRunsV1Response defines model for ListRunsV1Response.
type ListRunsV1ResponseBody ¶
type ListRunsV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListRunsV1Response
JSON401 *Unauthorized
}
func ParseListRunsV1ResponseBody ¶
func ParseListRunsV1ResponseBody(rsp *http.Response) (*ListRunsV1ResponseBody, error)
ParseListRunsV1ResponseBody parses an HTTP response from a ListRunsV1WithResponse call
func (ListRunsV1ResponseBody) Status ¶
func (r ListRunsV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ListRunsV1ResponseBody) StatusCode ¶
func (r ListRunsV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListTaskRecentTaskResultsV1Params ¶
type ListTaskRecentTaskResultsV1Params struct {
Status *[]TaskResultStateV1 `form:"status,omitempty" json:"status,omitempty"`
ListOptions *ListOptions `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}
ListTaskRecentTaskResultsV1Params defines parameters for ListTaskRecentTaskResultsV1.
type ListTaskRecentTaskResultsV1Response ¶
type ListTaskRecentTaskResultsV1Response struct {
Page Page `json:"page"`
TaskResults []TaskResultV1 `json:"taskResults"`
}
ListTaskRecentTaskResultsV1Response defines model for ListTaskRecentTaskResultsV1Response.
type ListTaskRecentTaskResultsV1ResponseBody ¶
type ListTaskRecentTaskResultsV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListTaskRecentTaskResultsV1Response
JSON401 *Unauthorized
JSON404 *Error
JSON500 *Error
}
func ParseListTaskRecentTaskResultsV1ResponseBody ¶
func ParseListTaskRecentTaskResultsV1ResponseBody(rsp *http.Response) (*ListTaskRecentTaskResultsV1ResponseBody, error)
ParseListTaskRecentTaskResultsV1ResponseBody parses an HTTP response from a ListTaskRecentTaskResultsV1WithResponse call
func (ListTaskRecentTaskResultsV1ResponseBody) Status ¶
func (r ListTaskRecentTaskResultsV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ListTaskRecentTaskResultsV1ResponseBody) StatusCode ¶
func (r ListTaskRecentTaskResultsV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListTaskResultsV1Params ¶
type ListTaskResultsV1Params struct {
// RepositoryName Name of a repository to filter by.
RepositoryName *string `form:"repositoryName,omitempty" json:"repositoryName,omitempty"`
// RunId ID of a run to filter by.
RunId *int `form:"runId,omitempty" json:"runId,omitempty"`
Status *[]TaskResultStateV1 `form:"status,omitempty" json:"status,omitempty"`
ListOptions *ListOptions `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}
ListTaskResultsV1Params defines parameters for ListTaskResultsV1.
type ListTaskResultsV1Response ¶
type ListTaskResultsV1Response struct {
Page Page `json:"page"`
TaskResults []TaskResultV1 `json:"taskResults"`
}
ListTaskResultsV1Response defines model for ListTaskResultsV1Response.
type ListTaskResultsV1ResponseBody ¶
type ListTaskResultsV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListTaskResultsV1Response
JSON401 *Unauthorized
}
func ParseListTaskResultsV1ResponseBody ¶
func ParseListTaskResultsV1ResponseBody(rsp *http.Response) (*ListTaskResultsV1ResponseBody, error)
ParseListTaskResultsV1ResponseBody parses an HTTP response from a ListTaskResultsV1WithResponse call
func (ListTaskResultsV1ResponseBody) Status ¶
func (r ListTaskResultsV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ListTaskResultsV1ResponseBody) StatusCode ¶
func (r ListTaskResultsV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListTasksV1Params ¶
type ListTasksV1Params struct {
Active *bool `form:"active,omitempty" json:"active,omitempty"`
ListOptions *ListOptions `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}
ListTasksV1Params defines parameters for ListTasksV1.
type ListTasksV1Response ¶
type ListTasksV1Response struct {
Page Page `json:"page"`
// Results Names of registered tasks.
Results []ListTasksV1ResponseTask `json:"results"`
}
ListTasksV1Response defines model for ListTasksV1Response.
type ListTasksV1ResponseBody ¶
type ListTasksV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListTasksV1Response
JSON401 *Unauthorized
}
func ParseListTasksV1ResponseBody ¶
func ParseListTasksV1ResponseBody(rsp *http.Response) (*ListTasksV1ResponseBody, error)
ParseListTasksV1ResponseBody parses an HTTP response from a ListTasksV1WithResponse call
func (ListTasksV1ResponseBody) Status ¶
func (r ListTasksV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ListTasksV1ResponseBody) StatusCode ¶
func (r ListTasksV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListTasksV1ResponseTask ¶
type ListTasksV1ResponseTask struct {
Active bool `json:"active"`
Checksum string `json:"checksum"`
Name string `json:"name"`
}
ListTasksV1ResponseTask defines model for ListTasksV1ResponseTask.
type Page ¶
type Page struct {
// CurrentPage Number of the current page.
CurrentPage int `json:"currentPage"`
// ItemsPerPage Count of items per page.
ItemsPerPage int `json:"itemsPerPage"`
// NextPage Number of the page with the next results.
// 0 if there is no next page.
NextPage int `json:"nextPage"`
// PreviousPage Number of the previous page.
// 0 if there is no previous page.
PreviousPage int `json:"previousPage"`
// TotalItems Total number of items.
TotalItems int `json:"totalItems"`
// TotalPages Total number of pages.
TotalPages int `json:"totalPages"`
}
Page defines model for Page.
type ReportWorkV1JSONRequestBody ¶
type ReportWorkV1JSONRequestBody = ReportWorkV1Request
ReportWorkV1JSONRequestBody defines body for ReportWorkV1 for application/json ContentType.
type ReportWorkV1Request ¶
type ReportWorkV1Request struct {
// Error General that occurred during the run, if any.
Error *string `json:"error,omitempty"`
// RunID Internal identifier of the unit of work.
RunID int `json:"runID"`
// Task The task to execute.
Task WorkTaskV1 `json:"task"`
// TaskResults Results of each task.
TaskResults []ReportWorkV1TaskResult `json:"taskResults"`
}
ReportWorkV1Request defines model for ReportWorkV1Request.
type ReportWorkV1Response ¶
type ReportWorkV1Response struct {
// Result Indicator of the result of the operation.
Result ReportWorkV1ResponseResult `json:"result"`
}
ReportWorkV1Response defines model for ReportWorkV1Response.
type ReportWorkV1ResponseBody ¶
type ReportWorkV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ReportWorkV1Response
JSON401 *Unauthorized
}
func ParseReportWorkV1ResponseBody ¶
func ParseReportWorkV1ResponseBody(rsp *http.Response) (*ReportWorkV1ResponseBody, error)
ParseReportWorkV1ResponseBody parses an HTTP response from a ReportWorkV1WithResponse call
func (ReportWorkV1ResponseBody) Status ¶
func (r ReportWorkV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ReportWorkV1ResponseBody) StatusCode ¶
func (r ReportWorkV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReportWorkV1ResponseResult ¶
type ReportWorkV1ResponseResult string
ReportWorkV1ResponseResult Indicator of the result of the operation.
const (
Ok ReportWorkV1ResponseResult = "ok"
)
Defines values for ReportWorkV1ResponseResult.
func (ReportWorkV1ResponseResult) Valid ¶ added in v0.50.1
func (e ReportWorkV1ResponseResult) Valid() bool
Valid indicates whether the value is a known member of the ReportWorkV1ResponseResult enum.
type ReportWorkV1TaskResult ¶
type ReportWorkV1TaskResult struct {
// Error Error encountered during the run, if any.
Error *string `json:"error,omitempty"`
// PullRequestUrl URL of the pull request for humans to view.
PullRequestUrl *string `json:"pullRequestUrl,omitempty"`
// RepositoryName Name of the repository.
RepositoryName string `json:"repositoryName"`
// Result Identifier of the result.
Result int `json:"result"`
// State State of the result.
// `archived` indicates that the repository of a pull request has been archived.
// `closed` indicates that a pull request existed and has been closed.
// `error` indicates that an error occurred while applying the task to the repository.
// `merged` indicates that a pull request has been merged.
// `open` indicates that a pull request is open and has not been merged yet.
// `pushed` indicates that changes were pushed to the default branch.
// `unknown` is a fallback value for any unexpected status.
State TaskResultStateV1 `json:"state"`
}
ReportWorkV1TaskResult Result of the run of a task.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RunStatusV1 ¶
type RunStatusV1 string
RunStatusV1 defines model for RunStatusV1.
const ( Failed RunStatusV1 = "failed" Finished RunStatusV1 = "finished" Pending RunStatusV1 = "pending" Running RunStatusV1 = "running" Timeout RunStatusV1 = "timeout" )
Defines values for RunStatusV1.
func (RunStatusV1) Valid ¶ added in v0.50.1
func (e RunStatusV1) Valid() bool
Valid indicates whether the value is a known member of the RunStatusV1 enum.
type RunV1 ¶
type RunV1 struct {
Error *string `json:"error,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
Id uint `json:"id"`
// Reason The reason why a run has been scheduled.
// The following reasons are deprecated: changed, new, next
Reason RunV1Reason `json:"reason"`
Repositories *[]string `json:"repositories,omitempty"`
RunData *map[string]string `json:"runData,omitempty"`
ScheduleAfter time.Time `json:"scheduleAfter"`
StartedAt *time.Time `json:"startedAt,omitempty"`
Status RunStatusV1 `json:"status"`
Task string `json:"task"`
}
RunV1 defines model for RunV1.
type RunV1Reason ¶
type RunV1Reason string
RunV1Reason The reason why a run has been scheduled. The following reasons are deprecated: changed, new, next
const ( Changed RunV1Reason = "changed" Cron RunV1Reason = "cron" Manual RunV1Reason = "manual" New RunV1Reason = "new" Next RunV1Reason = "next" Webhook RunV1Reason = "webhook" )
Defines values for RunV1Reason.
func (RunV1Reason) Valid ¶ added in v0.50.1
func (e RunV1Reason) Valid() bool
Valid indicates whether the value is a known member of the RunV1Reason enum.
type ScheduleRunV1JSONRequestBody ¶
type ScheduleRunV1JSONRequestBody = ScheduleRunV1Request
ScheduleRunV1JSONRequestBody defines body for ScheduleRunV1 for application/json ContentType.
type ScheduleRunV1Request ¶
type ScheduleRunV1Request struct {
// Assignees List of usernames to set as assignees of pull requests. Optional.
Assignees *[]string `json:"assignees,omitempty"`
// RepositoryNames Names of the repositories for which to add a run.
// Leave empty to schedule a run for all repositories the task matches.
RepositoryNames *[]string `json:"repositoryNames,omitempty"`
// Reviewers List of usernames to set as reviewers of pull requests. Optional.
Reviewers *[]string `json:"reviewers,omitempty"`
RunData *map[string]string `json:"runData,omitempty"`
// ScheduleAfter Schedule the run after the given time.
// Uses the current time if empty.
ScheduleAfter *time.Time `json:"scheduleAfter,omitempty"`
// TaskName Name of the task for which to add a run.
TaskName string `json:"taskName"`
}
ScheduleRunV1Request defines model for ScheduleRunV1Request.
type ScheduleRunV1Response ¶
type ScheduleRunV1Response struct {
// RunID Identifier of the newly scheduled run.
RunID int `json:"runID"`
}
ScheduleRunV1Response defines model for ScheduleRunV1Response.
type ScheduleRunV1ResponseBody ¶
type ScheduleRunV1ResponseBody struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ScheduleRunV1Response
JSON400 *Error
JSON401 *Unauthorized
}
func ParseScheduleRunV1ResponseBody ¶
func ParseScheduleRunV1ResponseBody(rsp *http.Response) (*ScheduleRunV1ResponseBody, error)
ParseScheduleRunV1ResponseBody parses an HTTP response from a ScheduleRunV1WithResponse call
func (ScheduleRunV1ResponseBody) Status ¶
func (r ScheduleRunV1ResponseBody) Status() string
Status returns HTTPResponse.Status
func (ScheduleRunV1ResponseBody) StatusCode ¶
func (r ScheduleRunV1ResponseBody) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TaskResultStateV1 ¶
type TaskResultStateV1 string
TaskResultStateV1 State of the result. `archived` indicates that the repository of a pull request has been archived. `closed` indicates that a pull request existed and has been closed. `error` indicates that an error occurred while applying the task to the repository. `merged` indicates that a pull request has been merged. `open` indicates that a pull request is open and has not been merged yet. `pushed` indicates that changes were pushed to the default branch. `unknown` is a fallback value for any unexpected status.
const ( TaskResultStateV1Archived TaskResultStateV1 = "archived" TaskResultStateV1Closed TaskResultStateV1 = "closed" TaskResultStateV1Error TaskResultStateV1 = "error" TaskResultStateV1Merged TaskResultStateV1 = "merged" TaskResultStateV1Open TaskResultStateV1 = "open" TaskResultStateV1Pushed TaskResultStateV1 = "pushed" TaskResultStateV1Unknown TaskResultStateV1 = "unknown" )
Defines values for TaskResultStateV1.
func (TaskResultStateV1) Valid ¶ added in v0.50.1
func (e TaskResultStateV1) Valid() bool
Valid indicates whether the value is a known member of the TaskResultStateV1 enum.
type TaskResultV1 ¶
type TaskResultV1 struct {
// Error Error that occurred while creating the pull request, if any.
Error *string `json:"error,omitempty"`
// PullRequestUrl URL of the pull request opened by Saturn.
PullRequestUrl *string `json:"pullRequestUrl,omitempty"`
// RepositoryName Name of the repository.
RepositoryName string `json:"repositoryName"`
// RunId Numeric identifier of the run this result is a part of.
RunId int `json:"runId"`
// Status State of the result.
// `archived` indicates that the repository of a pull request has been archived.
// `closed` indicates that a pull request existed and has been closed.
// `error` indicates that an error occurred while applying the task to the repository.
// `merged` indicates that a pull request has been merged.
// `open` indicates that a pull request is open and has not been merged yet.
// `pushed` indicates that changes were pushed to the default branch.
// `unknown` is a fallback value for any unexpected status.
Status TaskResultStateV1 `json:"status"`
}
TaskResultV1 defines model for TaskResultV1.
type TaskV1Input ¶
type TaskV1Input struct {
// Default Default value to use if no input has been set via the command-line.
Default *string `json:"default,omitempty"`
// Description Text that describes the input value.
Description *string `json:"description,omitempty"`
// Name Key that identifies the input. Set via the command-line to set the input value.
Name string `json:"name"`
// Options If not empty, a list of possible values for the input.
Options *[]string `json:"options,omitempty"`
// Validation If not empty, a regular expression that validates the value of the input.
Validation *string `json:"validation,omitempty"`
}
TaskV1Input defines model for TaskV1Input.
type WorkTaskV1 ¶
type WorkTaskV1 struct {
// Hash Hash of the task. Used to detect if server and worker are out of sync.
Hash string `json:"hash"`
// Name Name of the task to execute.
Name string `json:"name"`
}
WorkTaskV1 The task to execute.