Documentation
¶
Index ¶
- type BaseJob
- type BaseJobPatch
- type DeleteJobsResponse
- type EventExtraField
- type Execution
- type ExecutionConflictError
- type ExecutionPatch
- type ExecutionPatchStatus
- type ExecutionStatus
- type Job
- type JobPatch
- type JobsPatch
- type ListJobsQueryParams
- type ListJobsResponse
- type Metadata
- type ModelError
- type PatchJobResult
- type PatchJobsQueryParams
- type PatchJobsResponse
- type ScalePolicy
- type Service
- func (s *Service) CreateExecution(jobId string, resp ...*http.Response) (*SingleExecutionResponse, error)
- func (s *Service) CreateJob(job Job, resp ...*http.Response) (*SingleJobResponse, error)
- func (s *Service) DeleteJob(jobId string, resp ...*http.Response) error
- func (s *Service) DeleteJobs(resp ...*http.Response) (*DeleteJobsResponse, error)
- func (s *Service) GetExecution(jobId string, executionUid string, resp ...*http.Response) (*SingleExecutionResponse, error)
- func (s *Service) GetJob(jobId string, resp ...*http.Response) (*SingleJobResponse, error)
- func (s *Service) ListJobs(query *ListJobsQueryParams, resp ...*http.Response) (*ListJobsResponse, error)
- func (s *Service) PatchExecution(jobId string, executionUid string, executionPatch ExecutionPatch, ...) error
- func (s *Service) PatchJob(jobId string, jobPatch JobPatch, resp ...*http.Response) (*SingleJobResponse, error)
- func (s *Service) PatchJobs(jobsPatch JobsPatch, query *PatchJobsQueryParams, resp ...*http.Response) (*PatchJobsResponse, error)
- type Servicer
- type ServicerGenerated
- type SingleExecutionResponse
- type SingleJobResponse
- type StaticScale
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseJob ¶
type BaseJob struct {
// The ID of the connector used in the job.
ConnectorID string `json:"connectorID"`
Name string `json:"name"`
// The cron schedule, in UTC time format.
Schedule string `json:"schedule"`
CreateUserID *string `json:"createUserID,omitempty"`
CreatedAt *string `json:"createdAt,omitempty"`
Id *string `json:"id,omitempty"`
LastModifiedAt *string `json:"lastModifiedAt,omitempty"`
LastUpdateUserID *string `json:"lastUpdateUserID,omitempty"`
// Defines whether a job is scheduled or not
Scheduled *bool `json:"scheduled,omitempty"`
Tenant *string `json:"tenant,omitempty"`
}
type BaseJobPatch ¶
type BaseJobPatch struct {
// The ID of the connector used in the job.
ConnectorID *string `json:"connectorID,omitempty"`
// The job name
Name *string `json:"name,omitempty"`
// The configuration of the connector used in the job.
Parameters map[string]interface{} `json:"parameters,omitempty"`
ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty"`
// The cron schedule, in UTC time format.
Schedule *string `json:"schedule,omitempty"`
}
type DeleteJobsResponse ¶
type DeleteJobsResponse struct {
Count int32 `json:"count"`
}
number of jobs deleted.
type EventExtraField ¶
type Execution ¶ added in v1.2.1
type Execution struct {
ExecutionUid *string `json:"executionUid,omitempty"`
JobId *string `json:"jobId,omitempty"`
// The given status of the execution
Status *ExecutionStatus `json:"status,omitempty"`
Tenant *string `json:"tenant,omitempty"`
}
type ExecutionConflictError ¶ added in v1.2.1
type ExecutionConflictError struct {
Code string `json:"code"`
Data Execution `json:"data"`
Message string `json:"message"`
// The optional details of the error.
Details map[string]interface{} `json:"details,omitempty"`
// An optional link to a web page with more information on the error.
MoreInfo *string `json:"moreInfo,omitempty"`
}
type ExecutionPatch ¶ added in v1.2.1
type ExecutionPatch struct {
// The given status of the execution
Status ExecutionPatchStatus `json:"status"`
}
type ExecutionPatchStatus ¶ added in v1.2.1
type ExecutionPatchStatus string
ExecutionPatchStatus : The given status of the execution
const (
ExecutionPatchStatusCanceled ExecutionPatchStatus = "canceled"
)
List of ExecutionPatchStatus
type ExecutionStatus ¶ added in v1.2.1
type ExecutionStatus string
ExecutionStatus : The given status of the execution
const ( ExecutionStatusPending ExecutionStatus = "pending" ExecutionStatusRunning ExecutionStatus = "running" ExecutionStatusCompleted ExecutionStatus = "completed" ExecutionStatusAborted ExecutionStatus = "aborted" ExecutionStatusCanceled ExecutionStatus = "canceled" )
List of ExecutionStatus
type Job ¶
type Job struct {
// The ID of the connector used in the job.
ConnectorID string `json:"connectorID"`
Name string `json:"name"`
// The configuration of the connector used in the job.
Parameters map[string]interface{} `json:"parameters"`
ScalePolicy ScalePolicy `json:"scalePolicy"`
// The cron schedule, in UTC time format.
Schedule string `json:"schedule"`
CreateUserID *string `json:"createUserID,omitempty"`
CreatedAt *string `json:"createdAt,omitempty"`
EventExtraFields []EventExtraField `json:"eventExtraFields,omitempty"`
Id *string `json:"id,omitempty"`
LastModifiedAt *string `json:"lastModifiedAt,omitempty"`
LastUpdateUserID *string `json:"lastUpdateUserID,omitempty"`
// Defines whether a job is scheduled or not
Scheduled *bool `json:"scheduled,omitempty"`
Tenant *string `json:"tenant,omitempty"`
}
type JobPatch ¶
type JobPatch struct {
// The ID of the connector used in the job.
ConnectorID *string `json:"connectorID,omitempty"`
EventExtraFields []EventExtraField `json:"eventExtraFields,omitempty"`
// The job name
Name *string `json:"name,omitempty"`
// The configuration of the connector used in the job.
Parameters map[string]interface{} `json:"parameters,omitempty"`
ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty"`
// The cron schedule, in UTC time format.
Schedule *string `json:"schedule,omitempty"`
// Defines wheather a job is scheduled or not
Scheduled *bool `json:"scheduled,omitempty"`
}
type JobsPatch ¶
type JobsPatch struct {
// The ID of the connector used in the job.
ConnectorID *string `json:"connectorID,omitempty"`
EventExtraFields []EventExtraField `json:"eventExtraFields,omitempty"`
ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty"`
}
type ListJobsQueryParams ¶
type ListJobsQueryParams struct {
// ConnectorId : Specifies the connector ID used to filter jobs. A tailing wildcard is supported for the connector ID tag. If no wildcard is used then an exact match is used. Examples: * `my-connector:v1.0.0` selects `my-connector` connector with an exact match with tag \"v1.0.0\" * `my-connector` selects `my-connector` connector with an exact match. Note as no tag is specified it actually refers to \"latest\". * `my-connector:v1.*` selects all `my-connector` connectors with tags starting with \"v1.\", e.g. \"v1.0\", \"v1.1.1\", \"v1.2-alpha\", etc. * `my-connector:*` selects all `my-connector` connectors with any tag.
ConnectorId string `key:"connectorID"`
}
ListJobsQueryParams represents valid query parameters for the ListJobs operation For convenience ListJobsQueryParams can be formed in a single statement, for example:
`v := ListJobsQueryParams{}.SetConnectorId(...)`
func (ListJobsQueryParams) SetConnectorId ¶
func (q ListJobsQueryParams) SetConnectorId(v string) ListJobsQueryParams
type ListJobsResponse ¶
type ListJobsResponse struct {
Data []BaseJob `json:"data,omitempty"`
}
List of job summaries i.e. scheduling informations, owner, updates, connector.
type Metadata ¶
type Metadata struct {
// The number of jobs that failed to update.
Failures int64 `json:"failures"`
// The number of jobs which match the query criteria.
TotalMatchJobs int64 `json:"totalMatchJobs"`
}
The metadata for the patch jobs operation.
type ModelError ¶
type PatchJobResult ¶
type PatchJobResult struct {
// The Job ID.
Id string `json:"id"`
// Successfully updated or not.
Updated bool `json:"updated"`
Error *ModelError `json:"error,omitempty"`
}
type PatchJobsQueryParams ¶
type PatchJobsQueryParams struct {
// ConnectorId : Specifies the connector ID used to filter jobs. A tailing wildcard is supported for the connector ID tag. If no wildcard is used then an exact match is used. Examples: * `my-connector:v1.0.0` selects `my-connector` connector with an exact match with tag \"v1.0.0\" * `my-connector` selects `my-connector` connector with an exact match. Note as no tag is specified it actually refers to \"latest\". * `my-connector:v1.*` selects all `my-connector` connectors with tags starting with \"v1.\", e.g. \"v1.0\", \"v1.1.1\", \"v1.2-alpha\", etc. * `my-connector:*` selects all `my-connector` connectors with any tag.
ConnectorId string `key:"connectorID"`
// JobIDs : The job ID list.
JobIDs []string `key:"jobIDs" explode:"false"`
}
PatchJobsQueryParams represents valid query parameters for the PatchJobs operation For convenience PatchJobsQueryParams can be formed in a single statement, for example:
`v := PatchJobsQueryParams{}.SetConnectorId(...).SetJobIDs(...)`
func (PatchJobsQueryParams) SetConnectorId ¶
func (q PatchJobsQueryParams) SetConnectorId(v string) PatchJobsQueryParams
func (PatchJobsQueryParams) SetJobIDs ¶
func (q PatchJobsQueryParams) SetJobIDs(v []string) PatchJobsQueryParams
type PatchJobsResponse ¶
type PatchJobsResponse struct {
Data []PatchJobResult `json:"data"`
Metadata Metadata `json:"metadata"`
}
type ScalePolicy ¶
type ScalePolicy struct {
Static StaticScale `json:"static"`
}
type Service ¶
type Service services.BaseService
func NewService ¶
NewService creates a new collect service client from the given Config
func (*Service) CreateExecution ¶ added in v1.2.1
func (s *Service) CreateExecution(jobId string, resp ...*http.Response) (*SingleExecutionResponse, error)
CreateExecution - Creates an execution for a scheduled job based on the job ID. Parameters:
jobId: The job ID. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) CreateJob ¶
CreateJob - Creates a job. This API returns `403` if the number of collect workers is over a certain limit. Parameters:
job: The API request schema for the job. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) DeleteJob ¶
DeleteJob - Removes a job based on the job ID. Parameters:
jobId: The job ID. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) DeleteJobs ¶
func (s *Service) DeleteJobs(resp ...*http.Response) (*DeleteJobsResponse, error)
DeleteJobs - Removes all jobs on a tenant. Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetExecution ¶ added in v1.2.1
func (s *Service) GetExecution(jobId string, executionUid string, resp ...*http.Response) (*SingleExecutionResponse, error)
GetExecution - Returns the execution details based on the execution ID and job ID. Parameters:
jobId: The job ID. executionUid: The execution UID. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetJob ¶
GetJob - Returns a job based on the job ID. Parameters:
jobId: The job ID. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) ListJobs ¶
func (s *Service) ListJobs(query *ListJobsQueryParams, resp ...*http.Response) (*ListJobsResponse, error)
ListJobs - Returns a list of all jobs that belong to a tenant. Parameters:
query: a struct pointer of valid query parameters for the endpoint, nil to send no query parameters resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) PatchExecution ¶ added in v1.2.1
func (s *Service) PatchExecution(jobId string, executionUid string, executionPatch ExecutionPatch, resp ...*http.Response) error
PatchExecution - Modifies an execution based on the job ID. Parameters:
jobId: The job ID. executionUid: The execution UID. executionPatch: The API request schema for patching an execution. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) PatchJob ¶
func (s *Service) PatchJob(jobId string, jobPatch JobPatch, resp ...*http.Response) (*SingleJobResponse, error)
PatchJob - Modifies a job based on the job ID. This API returns `403` if the number of collect workers is over a certain limit. Parameters:
jobId: The job ID. jobPatch: The API request schema for patching a job. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) PatchJobs ¶
func (s *Service) PatchJobs(jobsPatch JobsPatch, query *PatchJobsQueryParams, resp ...*http.Response) (*PatchJobsResponse, error)
PatchJobs - Finds all jobs that match the query and modifies the with the changes specified in the request. This is a non-atomic operation and the results are returned as a list with each job patch result as its element. This API returns `200 OK` regardless of how many jobs were successfully patched. You must read the response body to find out if all jobs are patched. When the API is called, the `jobIDs` or `connectorID` must be specified. Do not specify more than one of them at the same time. This API returns `403` if the number of collect workers is over a certain limit. Parameters:
jobsPatch: The API request schema for patching jobs. query: a struct pointer of valid query parameters for the endpoint, nil to send no query parameters resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
type Servicer ¶
type Servicer interface {
//interfaces that are auto-generated in interface_generated.go
ServicerGenerated
}
Servicer represents the interface for implementing all endpoints for this service
type ServicerGenerated ¶ added in v1.10.0
type ServicerGenerated interface {
/*
CreateExecution - Creates an execution for a scheduled job based on the job ID.
Parameters:
jobId: The job ID.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
CreateExecution(jobId string, resp ...*http.Response) (*SingleExecutionResponse, error)
/*
CreateJob - Creates a job.
This API returns `403` if the number of collect workers is over a certain limit.
Parameters:
job: The API request schema for the job.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
CreateJob(job Job, resp ...*http.Response) (*SingleJobResponse, error)
/*
DeleteJob - Removes a job based on the job ID.
Parameters:
jobId: The job ID.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
DeleteJob(jobId string, resp ...*http.Response) error
/*
DeleteJobs - Removes all jobs on a tenant.
Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
DeleteJobs(resp ...*http.Response) (*DeleteJobsResponse, error)
/*
GetExecution - Returns the execution details based on the execution ID and job ID.
Parameters:
jobId: The job ID.
executionUid: The execution UID.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetExecution(jobId string, executionUid string, resp ...*http.Response) (*SingleExecutionResponse, error)
/*
GetJob - Returns a job based on the job ID.
Parameters:
jobId: The job ID.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetJob(jobId string, resp ...*http.Response) (*SingleJobResponse, error)
/*
ListJobs - Returns a list of all jobs that belong to a tenant.
Parameters:
query: a struct pointer of valid query parameters for the endpoint, nil to send no query parameters
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
ListJobs(query *ListJobsQueryParams, resp ...*http.Response) (*ListJobsResponse, error)
/*
PatchExecution - Modifies an execution based on the job ID.
Parameters:
jobId: The job ID.
executionUid: The execution UID.
executionPatch: The API request schema for patching an execution.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
PatchExecution(jobId string, executionUid string, executionPatch ExecutionPatch, resp ...*http.Response) error
/*
PatchJob - Modifies a job based on the job ID.
This API returns `403` if the number of collect workers is over a certain limit.
Parameters:
jobId: The job ID.
jobPatch: The API request schema for patching a job.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
PatchJob(jobId string, jobPatch JobPatch, resp ...*http.Response) (*SingleJobResponse, error)
/*
PatchJobs - Finds all jobs that match the query and modifies the with the changes specified in the request.
This is a non-atomic operation and the results are returned as a list with each job patch result as its element. This API returns `200 OK` regardless of how many jobs were successfully patched. You must read the response body to find out if all jobs are patched. When the API is called, the `jobIDs` or `connectorID` must be specified. Do not specify more than one of them at the same time. This API returns `403` if the number of collect workers is over a certain limit.
Parameters:
jobsPatch: The API request schema for patching jobs.
query: a struct pointer of valid query parameters for the endpoint, nil to send no query parameters
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
PatchJobs(jobsPatch JobsPatch, query *PatchJobsQueryParams, resp ...*http.Response) (*PatchJobsResponse, error)
}
ServicerGenerated represents the interface for implementing all endpoints for this service
type SingleExecutionResponse ¶ added in v1.2.1
type SingleExecutionResponse struct {
Data Execution `json:"data"`
}
type SingleJobResponse ¶
type SingleJobResponse struct {
Data Job `json:"data"`
}
type StaticScale ¶
type StaticScale struct {
// The number of collect workers.
Workers int32 `json:"workers"`
}