Documentation ¶
Index ¶
- Constants
- type CreateInput
- type Database
- func (srv *Database) Cancel(ctx context.Context, id string) (bool, error)
- func (srv *Database) Create(ctx context.Context, input CreateInput) (string, error)
- func (srv *Database) Get(ctx context.Context, id string) (*Schedule, error)
- func (srv *Database) List(ctx context.Context, input ListInput) (*List, error)
- type DateRange
- type List
- type ListInput
- type ListKey
- type Schedule
- type Storage
Constants ¶
View Source
const ( ScheduleStatusIdle = "IDLE" ScheduleStatusQueued = "QUEUED" ScheduleStatusSucceeded = "SUCCEEDED" ScheduleStatusCanceled = "CANCELED" ScheduleStatusFailed = "FAILED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateInput ¶
type CreateInput struct { DueAt time.Time `json:"dueAt" dynamodbav:"dueAt,unixtime"` URL string `json:"url" dynamodbav:"url"` Method string `json:"method" dynamodbav:"method"` Headers map[string]string `json:"headers,omitempty" dynamodbav:"headers,omitempty"` Body string `json:"body,omitempty" dynamodbav:"body,omitempty"` }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase(dynamodb dynamodbiface.DynamoDBAPI) *Database
type Schedule ¶
type Schedule struct { ID string `json:"id" dynamodbav:"id"` DueAt time.Time `json:"dueAt" dynamodbav:"dueAt,unixtime"` URL string `json:"url" dynamodbav:"url"` Method string `json:"method" dynamodbav:"method"` Headers map[string]string `json:"headers,omitempty" dynamodbav:"headers,omitempty"` Body *string `json:"body,omitempty" dynamodbav:"body,omitempty"` Status string `json:"status" dynamodbav:"status"` StartedAt *time.Time `json:"startedAt,omitempty" dynamodbav:"startedAt,unixtime,omitempty"` CompletedAt *time.Time `json:"completedAt,omitempty" dynamodbav:"completedAt,unixtime,omitempty"` CanceledAt *time.Time `json:"canceledAt,omitempty" dynamodbav:"canceledAt,unixtime,omitempty"` Result *string `json:"result,omitempty" dynamodbav:"result,omitempty"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt,unixtime"` }
Click to show internal directories.
Click to hide internal directories.