Documentation
¶
Overview ¶
Package bsubio provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCancelJobRequest(server string, jobId JobId) (*http.Request, error)
- func NewCreateJobRequest(server string, body CreateJobJSONRequestBody) (*http.Request, error)
- func NewCreateJobRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteJobRequest(server string, jobId JobId) (*http.Request, error)
- func NewGetJobLogsRequest(server string, jobId JobId) (*http.Request, error)
- func NewGetJobOutputRequest(server string, jobId JobId) (*http.Request, error)
- func NewGetJobRequest(server string, jobId JobId) (*http.Request, error)
- func NewGetTypesRequest(server string) (*http.Request, error)
- func NewGetVersionRequest(server string) (*http.Request, error)
- func NewListJobsRequest(server string, params *ListJobsParams) (*http.Request, error)
- func NewSubmitJobRequest(server string, jobId JobId) (*http.Request, error)
- func NewUploadJobDataRequestWithBody(server string, jobId openapi_types.UUID, params *UploadJobDataParams, ...) (*http.Request, error)
- type BadRequest
- type BsubClient
- func (c *BsubClient) CreateAndSubmitJob(ctx context.Context, jobType string, data io.Reader) (*Job, error)
- func (c *BsubClient) CreateAndSubmitJobFromFile(ctx context.Context, jobType string, filePath string) (*Job, error)
- func (c *BsubClient) GetJobResult(ctx context.Context, jobID JobId) (*JobResult, error)
- func (c *BsubClient) Process(ctx context.Context, jobType string, data io.Reader) (*JobResult, error)
- func (c *BsubClient) ProcessFile(ctx context.Context, jobType string, filePath string) (*JobResult, error)
- func (c *BsubClient) WaitForJob(ctx context.Context, jobID JobId) (*Job, error)
- type CancelJobResponse
- type Client
- func (c *Client) CancelJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateJob(ctx context.Context, body CreateJobJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateJobWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetJobLogs(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetJobOutput(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListJobs(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SubmitJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UploadJobDataWithBody(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*CancelJobResponse, error)
- func (c *ClientWithResponses) CreateJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateJobResponse, error)
- func (c *ClientWithResponses) CreateJobWithResponse(ctx context.Context, body CreateJobJSONRequestBody, ...) (*CreateJobResponse, error)
- func (c *ClientWithResponses) DeleteJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*DeleteJobResponse, error)
- func (c *ClientWithResponses) GetJobLogsWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobLogsResponse, error)
- func (c *ClientWithResponses) GetJobOutputWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobOutputResponse, error)
- func (c *ClientWithResponses) GetJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
- func (c *ClientWithResponses) GetTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTypesResponse, error)
- func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
- func (c *ClientWithResponses) ListJobsWithResponse(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*ListJobsResponse, error)
- func (c *ClientWithResponses) SubmitJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*SubmitJobResponse, error)
- func (c *ClientWithResponses) UploadJobDataWithBodyWithResponse(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, ...) (*UploadJobDataResponse, error)
- type ClientWithResponsesInterface
- type Config
- type CreateJobJSONBody
- type CreateJobJSONRequestBody
- type CreateJobResponse
- type DeleteJobResponse
- type Error
- type GetJobLogsResponse
- type GetJobOutputResponse
- type GetJobResponse
- type GetTypesResponse
- type GetVersionResponse
- type HttpRequestDoer
- type Job
- type JobId
- type JobResult
- type JobStatus
- type ListJobsParams
- type ListJobsParamsStatus
- type ListJobsResponse
- type NotFound
- type ProcessingType
- type RequestEditorFn
- type SubmitJobResponse
- type Unauthorized
- type UploadJobDataMultipartBody
- type UploadJobDataMultipartRequestBody
- type UploadJobDataParams
- type UploadJobDataResponse
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCancelJobRequest ¶
NewCancelJobRequest generates requests for CancelJob
func NewCreateJobRequest ¶
func NewCreateJobRequest(server string, body CreateJobJSONRequestBody) (*http.Request, error)
NewCreateJobRequest calls the generic CreateJob builder with application/json body
func NewCreateJobRequestWithBody ¶
func NewCreateJobRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateJobRequestWithBody generates requests for CreateJob with any type of body
func NewDeleteJobRequest ¶
NewDeleteJobRequest generates requests for DeleteJob
func NewGetJobLogsRequest ¶
NewGetJobLogsRequest generates requests for GetJobLogs
func NewGetJobOutputRequest ¶
NewGetJobOutputRequest generates requests for GetJobOutput
func NewGetJobRequest ¶
NewGetJobRequest generates requests for GetJob
func NewGetTypesRequest ¶
NewGetTypesRequest generates requests for GetTypes
func NewGetVersionRequest ¶
NewGetVersionRequest generates requests for GetVersion
func NewListJobsRequest ¶
func NewListJobsRequest(server string, params *ListJobsParams) (*http.Request, error)
NewListJobsRequest generates requests for ListJobs
func NewSubmitJobRequest ¶
NewSubmitJobRequest generates requests for SubmitJob
func NewUploadJobDataRequestWithBody ¶
func NewUploadJobDataRequestWithBody(server string, jobId openapi_types.UUID, params *UploadJobDataParams, contentType string, body io.Reader) (*http.Request, error)
NewUploadJobDataRequestWithBody generates requests for UploadJobData with any type of body
Types ¶
type BsubClient ¶
type BsubClient struct {
*ClientWithResponses
// contains filtered or unexported fields
}
BsubClient wraps the generated API client with helper methods
func NewBsubClient ¶
func NewBsubClient(config Config) (*BsubClient, error)
NewBsubClient creates a new BSUB.IO API client
func (*BsubClient) CreateAndSubmitJob ¶
func (c *BsubClient) CreateAndSubmitJob(ctx context.Context, jobType string, data io.Reader) (*Job, error)
CreateAndSubmitJob is a helper that creates a job, uploads data, and submits it for processing
func (*BsubClient) CreateAndSubmitJobFromFile ¶
func (c *BsubClient) CreateAndSubmitJobFromFile(ctx context.Context, jobType string, filePath string) (*Job, error)
CreateAndSubmitJobFromFile is a helper that creates a job, uploads a file, and submits it for processing
func (*BsubClient) GetJobResult ¶
GetJobResult retrieves the complete result of a finished job including output and logs
func (*BsubClient) Process ¶
func (c *BsubClient) Process(ctx context.Context, jobType string, data io.Reader) (*JobResult, error)
Process is a complete helper that creates, uploads, submits, waits, and retrieves results from a reader
func (*BsubClient) ProcessFile ¶
func (c *BsubClient) ProcessFile(ctx context.Context, jobType string, filePath string) (*JobResult, error)
ProcessFile is a complete helper that creates, uploads, submits, waits, and retrieves results
func (*BsubClient) WaitForJob ¶
WaitForJob polls the job status until it's finished or failed
type CancelJobResponse ¶
type CancelJobResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Message *string `json:"message,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON400 *Error
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseCancelJobResponse ¶
func ParseCancelJobResponse(rsp *http.Response) (*CancelJobResponse, error)
ParseCancelJobResponse parses an HTTP response from a CancelJobWithResponse call
func (CancelJobResponse) Status ¶
func (r CancelJobResponse) Status() string
Status returns HTTPResponse.Status
func (CancelJobResponse) StatusCode ¶
func (r CancelJobResponse) 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) CreateJob ¶
func (c *Client) CreateJob(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateJobWithBody ¶
func (*Client) GetJobLogs ¶
func (*Client) GetJobOutput ¶
func (*Client) GetVersion ¶
func (*Client) ListJobs ¶
func (c *Client) ListJobs(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UploadJobDataWithBody ¶
func (c *Client) UploadJobDataWithBody(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListJobs request
ListJobs(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateJobWithBody request with any body
CreateJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateJob(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteJob request
DeleteJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJob request
GetJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelJob request
CancelJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJobLogs request
GetJobLogs(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJobOutput request
GetJobOutput(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// SubmitJob request
SubmitJob(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTypes request
GetTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// UploadJobDataWithBody request with any body
UploadJobDataWithBody(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetVersion request
GetVersion(ctx context.Context, 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) CancelJobWithResponse ¶
func (c *ClientWithResponses) CancelJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*CancelJobResponse, error)
CancelJobWithResponse request returning *CancelJobResponse
func (*ClientWithResponses) CreateJobWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
CreateJobWithBodyWithResponse request with arbitrary body returning *CreateJobResponse
func (*ClientWithResponses) CreateJobWithResponse ¶
func (c *ClientWithResponses) CreateJobWithResponse(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
func (*ClientWithResponses) DeleteJobWithResponse ¶
func (c *ClientWithResponses) DeleteJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*DeleteJobResponse, error)
DeleteJobWithResponse request returning *DeleteJobResponse
func (*ClientWithResponses) GetJobLogsWithResponse ¶
func (c *ClientWithResponses) GetJobLogsWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobLogsResponse, error)
GetJobLogsWithResponse request returning *GetJobLogsResponse
func (*ClientWithResponses) GetJobOutputWithResponse ¶
func (c *ClientWithResponses) GetJobOutputWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobOutputResponse, error)
GetJobOutputWithResponse request returning *GetJobOutputResponse
func (*ClientWithResponses) GetJobWithResponse ¶
func (c *ClientWithResponses) GetJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
GetJobWithResponse request returning *GetJobResponse
func (*ClientWithResponses) GetTypesWithResponse ¶
func (c *ClientWithResponses) GetTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTypesResponse, error)
GetTypesWithResponse request returning *GetTypesResponse
func (*ClientWithResponses) GetVersionWithResponse ¶
func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
GetVersionWithResponse request returning *GetVersionResponse
func (*ClientWithResponses) ListJobsWithResponse ¶
func (c *ClientWithResponses) ListJobsWithResponse(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*ListJobsResponse, error)
ListJobsWithResponse request returning *ListJobsResponse
func (*ClientWithResponses) SubmitJobWithResponse ¶
func (c *ClientWithResponses) SubmitJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*SubmitJobResponse, error)
SubmitJobWithResponse request returning *SubmitJobResponse
func (*ClientWithResponses) UploadJobDataWithBodyWithResponse ¶
func (c *ClientWithResponses) UploadJobDataWithBodyWithResponse(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadJobDataResponse, error)
UploadJobDataWithBodyWithResponse request with arbitrary body returning *UploadJobDataResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListJobsWithResponse request
ListJobsWithResponse(ctx context.Context, params *ListJobsParams, reqEditors ...RequestEditorFn) (*ListJobsResponse, error)
// CreateJobWithBodyWithResponse request with any body
CreateJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
CreateJobWithResponse(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
// DeleteJobWithResponse request
DeleteJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*DeleteJobResponse, error)
// GetJobWithResponse request
GetJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
// CancelJobWithResponse request
CancelJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*CancelJobResponse, error)
// GetJobLogsWithResponse request
GetJobLogsWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobLogsResponse, error)
// GetJobOutputWithResponse request
GetJobOutputWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*GetJobOutputResponse, error)
// SubmitJobWithResponse request
SubmitJobWithResponse(ctx context.Context, jobId JobId, reqEditors ...RequestEditorFn) (*SubmitJobResponse, error)
// GetTypesWithResponse request
GetTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTypesResponse, error)
// UploadJobDataWithBodyWithResponse request with any body
UploadJobDataWithBodyWithResponse(ctx context.Context, jobId openapi_types.UUID, params *UploadJobDataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadJobDataResponse, error)
// GetVersionWithResponse request
GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Config ¶
type Config struct {
// APIKey is your BSUB.IO API key
APIKey string
// BaseURL is the API server URL (defaults to production)
BaseURL string
// HTTPClient is optional custom HTTP client
HTTPClient *http.Client
}
Config holds configuration for the BSUB.IO client
func LoadConfig ¶
func LoadConfig() Config
LoadConfig loads configuration from ~/.config/bsubio/config.json or BSUBIO_API_KEY env var Returns an empty Config{} if neither is found (no error)
type CreateJobJSONBody ¶
type CreateJobJSONBody struct {
// Type Processing type (see /v1/types for available types)
Type string `json:"type"`
}
CreateJobJSONBody defines parameters for CreateJob.
type CreateJobJSONRequestBody ¶
type CreateJobJSONRequestBody CreateJobJSONBody
CreateJobJSONRequestBody defines body for CreateJob for application/json ContentType.
type CreateJobResponse ¶
type CreateJobResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *struct {
Data *Job `json:"data,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON400 *BadRequest
JSON401 *Unauthorized
}
func ParseCreateJobResponse ¶
func ParseCreateJobResponse(rsp *http.Response) (*CreateJobResponse, error)
ParseCreateJobResponse parses an HTTP response from a CreateJobWithResponse call
func (CreateJobResponse) Status ¶
func (r CreateJobResponse) Status() string
Status returns HTTPResponse.Status
func (CreateJobResponse) StatusCode ¶
func (r CreateJobResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteJobResponse ¶
type DeleteJobResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON404 *NotFound
JSON409 *Error
}
func ParseDeleteJobResponse ¶
func ParseDeleteJobResponse(rsp *http.Response) (*DeleteJobResponse, error)
ParseDeleteJobResponse parses an HTTP response from a DeleteJobWithResponse call
func (DeleteJobResponse) Status ¶
func (r DeleteJobResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteJobResponse) StatusCode ¶
func (r DeleteJobResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct {
// Error Error message
Error *string `json:"error,omitempty"`
Success *bool `json:"success,omitempty"`
}
Error defines model for Error.
type GetJobLogsResponse ¶
type GetJobLogsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseGetJobLogsResponse ¶
func ParseGetJobLogsResponse(rsp *http.Response) (*GetJobLogsResponse, error)
ParseGetJobLogsResponse parses an HTTP response from a GetJobLogsWithResponse call
func (GetJobLogsResponse) Status ¶
func (r GetJobLogsResponse) Status() string
Status returns HTTPResponse.Status
func (GetJobLogsResponse) StatusCode ¶
func (r GetJobLogsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetJobOutputResponse ¶
type GetJobOutputResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON404 *NotFound
JSON409 *Error
}
func ParseGetJobOutputResponse ¶
func ParseGetJobOutputResponse(rsp *http.Response) (*GetJobOutputResponse, error)
ParseGetJobOutputResponse parses an HTTP response from a GetJobOutputWithResponse call
func (GetJobOutputResponse) Status ¶
func (r GetJobOutputResponse) Status() string
Status returns HTTPResponse.Status
func (GetJobOutputResponse) StatusCode ¶
func (r GetJobOutputResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetJobResponse ¶
type GetJobResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Data *Job `json:"data,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseGetJobResponse ¶
func ParseGetJobResponse(rsp *http.Response) (*GetJobResponse, error)
ParseGetJobResponse parses an HTTP response from a GetJobWithResponse call
func (GetJobResponse) Status ¶
func (r GetJobResponse) Status() string
Status returns HTTPResponse.Status
func (GetJobResponse) StatusCode ¶
func (r GetJobResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTypesResponse ¶
type GetTypesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Types *[]ProcessingType `json:"types,omitempty"`
}
}
func ParseGetTypesResponse ¶
func ParseGetTypesResponse(rsp *http.Response) (*GetTypesResponse, error)
ParseGetTypesResponse parses an HTTP response from a GetTypesWithResponse call
func (GetTypesResponse) Status ¶
func (r GetTypesResponse) Status() string
Status returns HTTPResponse.Status
func (GetTypesResponse) StatusCode ¶
func (r GetTypesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVersionResponse ¶
type GetVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Build *string `json:"build,omitempty"`
Server *string `json:"server,omitempty"`
Version *string `json:"version,omitempty"`
}
}
func ParseGetVersionResponse ¶
func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error)
ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call
func (GetVersionResponse) Status ¶
func (r GetVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetVersionResponse) StatusCode ¶
func (r GetVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Job ¶
type Job struct {
// ClaimedAt When job was claimed by worker
ClaimedAt *time.Time `json:"claimed_at"`
// ClaimedBy Worker ID that claimed the job
ClaimedBy *string `json:"claimed_by"`
// CreatedAt Job creation timestamp
CreatedAt *time.Time `json:"created_at,omitempty"`
// DataSize Size of uploaded data in bytes
DataSize *int64 `json:"data_size,omitempty"`
// ErrorCode Error code if job failed
ErrorCode *string `json:"error_code"`
// ErrorMessage Error message if job failed
ErrorMessage *string `json:"error_message"`
// FinishedAt When job finished (success or failure)
FinishedAt *time.Time `json:"finished_at"`
// Id Unique job identifier
Id *openapi_types.UUID `json:"id,omitempty"`
// Status Current job status
Status *JobStatus `json:"status,omitempty"`
// Type Processing type
Type *string `json:"type,omitempty"`
// UpdatedAt Last update timestamp
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// UploadToken Token for uploading data (only present in `created` state)
UploadToken *string `json:"upload_token,omitempty"`
// UserId User who created the job
UserId *string `json:"user_id,omitempty"`
}
Job defines model for Job.
type JobStatus ¶
type JobStatus string
JobStatus Current job status
const ( JobStatusClaimed JobStatus = "claimed" JobStatusCreated JobStatus = "created" JobStatusFailed JobStatus = "failed" JobStatusFinished JobStatus = "finished" JobStatusLoaded JobStatus = "loaded" JobStatusPending JobStatus = "pending" JobStatusPreparing JobStatus = "preparing" JobStatusProcessing JobStatus = "processing" )
Defines values for JobStatus.
type ListJobsParams ¶
type ListJobsParams struct {
// Status Filter by job status
Status *ListJobsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// Limit Maximum number of jobs to return
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListJobsParams defines parameters for ListJobs.
type ListJobsParamsStatus ¶
type ListJobsParamsStatus string
ListJobsParamsStatus defines parameters for ListJobs.
const ( ListJobsParamsStatusClaimed ListJobsParamsStatus = "claimed" ListJobsParamsStatusCreated ListJobsParamsStatus = "created" ListJobsParamsStatusFailed ListJobsParamsStatus = "failed" ListJobsParamsStatusFinished ListJobsParamsStatus = "finished" ListJobsParamsStatusLoaded ListJobsParamsStatus = "loaded" ListJobsParamsStatusPending ListJobsParamsStatus = "pending" ListJobsParamsStatusPreparing ListJobsParamsStatus = "preparing" ListJobsParamsStatusProcessing ListJobsParamsStatus = "processing" )
Defines values for ListJobsParamsStatus.
type ListJobsResponse ¶
type ListJobsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Data *struct {
Jobs *[]Job `json:"jobs,omitempty"`
// Total Total number of jobs (before pagination)
Total *int `json:"total,omitempty"`
} `json:"data,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON401 *Unauthorized
}
func ParseListJobsResponse ¶
func ParseListJobsResponse(rsp *http.Response) (*ListJobsResponse, error)
ParseListJobsResponse parses an HTTP response from a ListJobsWithResponse call
func (ListJobsResponse) Status ¶
func (r ListJobsResponse) Status() string
Status returns HTTPResponse.Status
func (ListJobsResponse) StatusCode ¶
func (r ListJobsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProcessingType ¶
type ProcessingType struct {
// Description Human-readable description
Description *string `json:"description,omitempty"`
// Example Example usage information
Example *struct {
// Cmd Example command
Cmd *string `json:"cmd,omitempty"`
// Desc Example description
Desc *string `json:"desc,omitempty"`
} `json:"example,omitempty"`
// Input Input format information
Input *struct {
// MimeIn Accepted input MIME types
MimeIn *[]string `json:"mime_in,omitempty"`
} `json:"input,omitempty"`
// Name Human-readable name
Name *string `json:"name,omitempty"`
// Output Output format information
Output *struct {
// Display Display format hint
Display *string `json:"display,omitempty"`
// Ext Output file extension
Ext *string `json:"ext,omitempty"`
// MimeOut Output MIME types
MimeOut *[]string `json:"mime_out,omitempty"`
} `json:"output,omitempty"`
// Type Type identifier used when creating jobs
Type *string `json:"type,omitempty"`
}
ProcessingType defines model for ProcessingType.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SubmitJobResponse ¶
type SubmitJobResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Message *string `json:"message,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON400 *BadRequest
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseSubmitJobResponse ¶
func ParseSubmitJobResponse(rsp *http.Response) (*SubmitJobResponse, error)
ParseSubmitJobResponse parses an HTTP response from a SubmitJobWithResponse call
func (SubmitJobResponse) Status ¶
func (r SubmitJobResponse) Status() string
Status returns HTTPResponse.Status
func (SubmitJobResponse) StatusCode ¶
func (r SubmitJobResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UploadJobDataMultipartBody ¶
type UploadJobDataMultipartBody struct {
// File File to process
File openapi_types.File `json:"file"`
}
UploadJobDataMultipartBody defines parameters for UploadJobData.
type UploadJobDataMultipartRequestBody ¶
type UploadJobDataMultipartRequestBody UploadJobDataMultipartBody
UploadJobDataMultipartRequestBody defines body for UploadJobData for multipart/form-data ContentType.
type UploadJobDataParams ¶
type UploadJobDataParams struct {
// Token Upload token from job creation
Token string `form:"token" json:"token"`
}
UploadJobDataParams defines parameters for UploadJobData.
type UploadJobDataResponse ¶
type UploadJobDataResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// DataSize Size of uploaded file in bytes
DataSize *int `json:"data_size,omitempty"`
Message *string `json:"message,omitempty"`
Success *bool `json:"success,omitempty"`
}
JSON400 *BadRequest
JSON401 *Error
JSON404 *NotFound
JSON413 *Error
}
func ParseUploadJobDataResponse ¶
func ParseUploadJobDataResponse(rsp *http.Response) (*UploadJobDataResponse, error)
ParseUploadJobDataResponse parses an HTTP response from a UploadJobDataWithResponse call
func (UploadJobDataResponse) Status ¶
func (r UploadJobDataResponse) Status() string
Status returns HTTPResponse.Status
func (UploadJobDataResponse) StatusCode ¶
func (r UploadJobDataResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
batch
command
|
|
|
comprehensive
command
|
|
|
custom-workflow
command
|