Documentation
¶
Overview ¶
User API tasks interface
Index ¶
- type GetRequest
- type InfoResult
- type ItemTask
- type ListRequest
- type ListTasks
- type RecordTask
- type Tasks
- func (t Tasks) Get(ctx context.Context, req GetRequest) (*RecordTask, error)
- func (t Tasks) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (t Tasks) List(ctx context.Context, req ListRequest) (*ListTasks, error)
- func (t Tasks) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
type GetRequest struct { // ID of audit GUID // Required: true AuditID string `url:"auditId" json:"auditId" validate:"required"` }
GetRequest struct to get background API task status and result
type InfoResult ¶
type InfoResult int
Global variable for converting field to desired data type
func (*InfoResult) UnmarshalJSON ¶
func (r *InfoResult) UnmarshalJSON(b []byte) error
Method for convert field
type ItemTask ¶ added in v1.5.0
type ItemTask 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 InfoResult `json:"result"` // Stage Stage string `json:"stage"` // Status Status string `json:"status"` // Update time UpdateTime uint64 `json:"updateTime"` // Updated time UpdatedTime uint64 `json:"updatedTime"` }
type ListRequest ¶
type ListRequest struct { // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct to get list of audits
type ListTasks ¶
type ListTasks struct { // Data Data []ItemTask `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of tasks
type RecordTask ¶
Detailed information about task
type Tasks ¶
type Tasks struct {
// contains filtered or unexported fields
}
Structure for creating request to tasks
func (Tasks) Get ¶
func (t Tasks) Get(ctx context.Context, req GetRequest) (*RecordTask, error)
Get gets background API task status and result as a RecordTask struct
func (Tasks) GetRaw ¶ added in v1.6.6
GetRaw gets background API task status and result as an array of bytes
Click to show internal directories.
Click to hide internal directories.