Documentation ¶
Index ¶
- Constants
- Variables
- type Collection
- func (c *Collection[T]) AddItem(lg *log.Logger) int
- func (c *Collection[T]) Collect(id int)
- func (c *Collection[T]) CollectAll()
- func (c *Collection[T]) IDValid(id int) bool
- func (c *Collection[T]) Item(id int) *Item[T]
- func (c *Collection[T]) ItemExists(id int) bool
- func (c *Collection[T]) Next() int
- func (c *Collection[T]) OnCollect(fn func(i *Item[T])) *Collection[T]
- func (c *Collection[T]) Schedule(id int, tk *Task[T]) <-chan struct{}
- func (c *Collection[T]) ScheduleAdd(name string, lg *log.Logger, tl, tn string, fn func(i *Item[T])) int
- func (c *Collection[T]) ScheduleAll(tk *Task[T]) <-chan struct{}
- func (c *Collection[T]) SchedulePipe(id1, id2 int, tk1, tk2 *Task[T]) <-chan struct{}
- type CollectionType
- type Crate
- type CrateItem
- type Item
- type ItemContext
- type ItemImage
- type ItemQR
- type ItemSelf
- type ItemTask
- type RefItem
- type StyleItem
- type Task
Constants ¶
View Source
const TASK_QUEUE_SIZE = 64
Variables ¶
View Source
var CollectionList = []CollectionType{ TYPE_TASK, TYPE_IMAGE, TYPE_CONTEXT, TYPE_QR, }
Functions ¶
This section is empty.
Types ¶
type Collection ¶
func NewCollection ¶
func (*Collection[T]) Collect ¶
func (c *Collection[T]) Collect(id int)
func (*Collection[T]) CollectAll ¶
func (c *Collection[T]) CollectAll()
func (*Collection[T]) IDValid ¶ added in v0.3.0
func (c *Collection[T]) IDValid(id int) bool
func (*Collection[T]) Item ¶
func (c *Collection[T]) Item(id int) *Item[T]
func (*Collection[T]) ItemExists ¶ added in v0.3.0
func (c *Collection[T]) ItemExists(id int) bool
func (*Collection[T]) Next ¶
func (c *Collection[T]) Next() int
func (*Collection[T]) OnCollect ¶
func (c *Collection[T]) OnCollect(fn func(i *Item[T])) *Collection[T]
func (*Collection[T]) Schedule ¶
func (c *Collection[T]) Schedule(id int, tk *Task[T]) <-chan struct{}
func (*Collection[T]) ScheduleAdd ¶ added in v0.3.0
func (*Collection[T]) ScheduleAll ¶
func (c *Collection[T]) ScheduleAll(tk *Task[T]) <-chan struct{}
func (*Collection[T]) SchedulePipe ¶ added in v0.3.0
func (c *Collection[T]) SchedulePipe(id1, id2 int, tk1, tk2 *Task[T]) <-chan struct{}
type CollectionType ¶
type CollectionType int
const ( TYPE_TASK CollectionType = iota TYPE_IMAGE TYPE_CONTEXT TYPE_QR )
type Item ¶
type ItemContext ¶
func (ItemContext) Identifier ¶
func (context ItemContext) Identifier() CollectionType
type ItemImage ¶
type ItemImage struct { Image image.Image Name string Encoding imageutil.ImageEncoding Model imageutil.ColorModel }
func (ItemImage) Identifier ¶
func (img ItemImage) Identifier() CollectionType
type ItemQR ¶
type ItemQR struct {
QR *qrcode.QRCode
}
func (ItemQR) Identifier ¶
func (qr ItemQR) Identifier() CollectionType
type ItemSelf ¶
type ItemSelf interface {
Identifier() CollectionType
}
type ItemTask ¶
type ItemTask struct {
Name string
}
func (ItemTask) Identifier ¶
func (qr ItemTask) Identifier() CollectionType
Click to show internal directories.
Click to hide internal directories.