Documentation ¶
Index ¶
- type APIError
- type Client
- func (cl *Client) CreateTask(ctx context.Context, spec TaskInput) (*Task, error)
- func (cl *Client) DeleteTask(ctx context.Context, id string) error
- func (cl *Client) GetTask(ctx context.Context, id string) (*Task, error)
- func (cl *Client) ListTasks(ctx context.Context, id string, opts *ListOpts) (*PaginatedResponse, error)
- func (cl *Client) UpdateTask(ctx context.Context, id string, spec TaskInput) (*Task, error)
- type ClientOpts
- type Duration
- type ListOpts
- type PageInfo
- type PaginatedResponse
- type Task
- type TaskInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithOpts ¶
func NewClientWithOpts(apiKey, apiSecret string, opts *ClientOpts) (*Client, error)
func (*Client) CreateTask ¶
type ClientOpts ¶
type ClientOpts struct {
Endpoint string
}
type PaginatedResponse ¶
type Task ¶
type Task struct { ID string `json:"id"` Name string `json:"name"` MaxDuration Duration `json:"maxDuration"` URL string `json:"url"` AllowOverlap bool `json:"allowOverlap"` Interval Duration `json:"interval"` Cron *string `json:"cron"` HttpMethod string `json:"httpMethod"` HttpHeaders http.Header `json:"httpHeaders"` RegionID string `json:"regionId"` Meta map[string]string `json:"meta"` OkStatusCodes []int `json:"okStatusCodes"` }
type TaskInput ¶
type TaskInput struct { ID *string `json:"id,omitempty"` Name string `json:"name"` MaxDuration Duration `json:"maxDuration"` URL string `json:"url"` AllowOverlap bool `json:"allowOverlap"` Interval Duration `json:"interval"` Cron *string `json:"cron"` HttpMethod string `json:"httpMethod"` HttpHeaders http.Header `json:"httpHeaders"` RegionID string `json:"regionId"` Meta map[string]string `json:"meta"` OkStatusCodes []int `json:"okStatusCodes"` }
Click to show internal directories.
Click to hide internal directories.