Documentation
¶
Overview ¶
Package fixture declares types used to test the TypeScript generator.
Index ¶
- type Channel
- type Page
- type Priority
- type Promise
- type Record
- type Status
- type Task
- type Tasks
- func (*Tasks) Add(tasks ...Task) error
- func (Tasks) Count() int
- func (Tasks) Delete(int64)
- func (Tasks) Dispatch(call, call_ string)
- func (Tasks) DispatchMany(call ...string)
- func (Tasks) List(ctx context.Context, status Status, limit int) (Page[Task], error)
- func (Tasks) Watch(status Status, updates Task)
- type Timestamps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶ added in v0.1.17
type Channel struct {
Name string `json:"name"`
}
Channel groups tasks, and shares its name with the runtime's stream type.
type Promise ¶ added in v0.1.17
type Promise struct {
Done bool `json:"done"`
}
Promise shares its name with the return type of generated methods.
type Task ¶
type Task struct {
ID int64 `json:"id"`
// Title of the task.
Title string `json:"title"`
Status Status `json:"status"`
Priority Priority `json:"priority"`
Tags []string `json:"tags"`
Due *time.Time `json:"due"`
Meta map[string]any `json:"meta,omitempty"`
Parent *Task `json:"parent,omitzero"`
Channel *Channel `json:"channel,omitzero"`
Record *Record `json:"record,omitzero"`
Promise *Promise `json:"promise,omitzero"`
Secret string `json:"-"`
Count int64 `json:"count,string"`
CountPtr *int64 `json:"countPtr,string"`
Raw json.RawMessage `json:"raw"`
Data []byte `json:"data"`
Scores map[int]float64 `json:"scores"`
Matrix [][]int `json:"matrix"`
Children []*Task `json:"children"`
Extra struct{ A bool } `json:"extra"`
NoTag string
Timestamps
// contains filtered or unexported fields
}
Task is a unit of work.
type Tasks ¶
type Tasks struct{}
Tasks manages tasks.
func (Tasks) Dispatch ¶ added in v0.1.17
Dispatch deliberately names parameters after the runtime's call function.
func (Tasks) DispatchMany ¶ added in v0.1.17
DispatchMany uses the runtime's call name for a variadic parameter.
type Timestamps ¶
Timestamps is embedded in records.