v1.5.0-gamma
This commit is contained in:
@@ -18,7 +18,7 @@ type ListRequest struct {
|
||||
}
|
||||
|
||||
// List gets list user API tasks with status PROCESSING
|
||||
func (t Tasks) List(ctx context.Context, req ListRequest) (ListTasks, error) {
|
||||
func (t Tasks) List(ctx context.Context, req ListRequest) (*ListTasks, error) {
|
||||
url := "/cloudapi/tasks/list"
|
||||
|
||||
res, err := t.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
@@ -33,6 +33,5 @@ func (t Tasks) List(ctx context.Context, req ListRequest) (ListTasks, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return list, nil
|
||||
|
||||
return &list, nil
|
||||
}
|
||||
|
||||
@@ -69,9 +69,46 @@ type RecordAsyncTask struct {
|
||||
// Update time
|
||||
UpdateTime uint64 `json:"updateTime"`
|
||||
|
||||
// Updated by
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
|
||||
// Updated time
|
||||
UpdatedTime uint64 `json:"updatedTime"`
|
||||
}
|
||||
|
||||
// Detailed information about task
|
||||
type ItemAsyncTask struct {
|
||||
// Audit ID
|
||||
AuditID string `json:"auditId"`
|
||||
|
||||
// Completed
|
||||
Completed bool `json:"completed"`
|
||||
|
||||
// Error
|
||||
Error string `json:"error"`
|
||||
|
||||
// List of logs
|
||||
Log []string `json:"log"`
|
||||
|
||||
// Final result
|
||||
Result TaskResult `json:"result"`
|
||||
|
||||
// Stage
|
||||
Stage string `json:"stage"`
|
||||
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
|
||||
// Update time
|
||||
UpdateTime uint64 `json:"updateTime"`
|
||||
|
||||
// Updated time
|
||||
UpdatedTime uint64 `json:"updatedTime"`
|
||||
}
|
||||
|
||||
// List of tasks
|
||||
type ListTasks []RecordAsyncTask
|
||||
type ListTasks struct {
|
||||
Data []ItemAsyncTask `json:"data"`
|
||||
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user