Versions in this module Expand all Collapse all v0 v0.3.0 Oct 12, 2024 Changes in this version type Collection + func (c *Collection[T]) IDValid(id int) bool + func (c *Collection[T]) ItemExists(id int) bool + func (c *Collection[T]) ScheduleAdd(name string, lg *log.Logger, tl, tn string, fn func(i *Item[T])) int + func (c *Collection[T]) SchedulePipe(id1, id2 int, tk1, tk2 *Task[T]) <-chan struct{} + type StyleItem struct + Style *lipgloss.Style v0.2.0 Aug 9, 2024 Changes in this version + const TASK_QUEUE_SIZE + var CollectionList = []CollectionType + type Collection struct + Errs []error + func NewCollection[T ItemSelf](lg *log.Logger) *Collection[T] + 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]) Item(id int) *Item[T] + 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]) ScheduleAll(tk *Task[T]) <-chan struct{} + func (c *Collection[T]) TaskCount() (int, bool) + type CollectionType int + const TYPE_CONTEXT + const TYPE_FILE + const TYPE_IMAGE + const TYPE_QR + const TYPE_TASK + type Crate struct + Items []*CrateItem[T] + func NewCrate[T any, C CrateItem[T]]() *Crate[T] + func (c *Crate[T]) Add(i *T) int + func (c *Crate[T]) Clean(index int) + func (c *Crate[T]) CleanAll() + func (c *Crate[T]) Item(id int) (*T, error) + func (c *Crate[T]) ItemFull(id int) (*CrateItem[T], error) + func (c *Crate[T]) OnClean(clean func(i *CrateItem[T])) *Crate[T] + type CrateItem struct + Self *T + type Item struct + Err error + Lg *log.Logger + Self *T + TaskQueue chan *Task[T] + func NewItem[T ItemSelf](lg *log.Logger, fn func(i *Item[T])) *Item[T] + type ItemContext struct + Context *gg.Context + func (context ItemContext) Identifier() CollectionType + type ItemFile struct + File *os.File + Name string + func (file ItemFile) Identifier() CollectionType + type ItemImage struct + Encoding imageutil.ImageEncoding + Image image.Image + Model imageutil.ColorModel + Name string + func (img ItemImage) Identifier() CollectionType + type ItemQR struct + QR *qrcode.QRCode + func (qr ItemQR) Identifier() CollectionType + type ItemSelf interface + Identifier func() CollectionType + type ItemTask struct + Name string + func (qr ItemTask) Identifier() CollectionType + type RefItem struct + Value T + type Task struct + Fail func(i *Item[T]) + Fn func(i *Item[T]) + Lib string + Name string