tasks

package
v0.0.0-...-849145b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxTaskCapacity int64 = 20

Variables

This section is empty.

Functions

func CachedTaskCount

func CachedTaskCount() int

func Capacity

func Capacity() int64

func DecrementCapacity

func DecrementCapacity()

func IncrementCapacity

func IncrementCapacity()

func TaskAlreadyExists

func TaskAlreadyExists(currentTasks []*Task, newTaskTitle string) bool

func TaskCacheDir

func TaskCacheDir() string

Types

type Task

type Task struct {
	Kind        string `json:"kind"`
	Id          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

func NewTask

func NewTask(kind, id, title, description string) *Task

func RandomTask

func RandomTask() (*Task, error)

func (*Task) Cache

func (t *Task) Cache() (string, error)

func (*Task) CacheKey

func (t *Task) CacheKey() string

func (*Task) CachePath

func (t *Task) CachePath() string

func (*Task) ClearCache

func (t *Task) ClearCache() error

func (*Task) IsCached

func (t *Task) IsCached() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL