Documentation ¶
Index ¶
- Constants
- func Deserialize(payload []byte) (task.ScheduledTask, error)
- func Serialize(task task.ScheduledTask) ([]byte, error)
- type BoltDB
- func (s BoltDB) Close()
- func (s BoltDB) Delete(id string) (bool, error)
- func (s BoltDB) Exists(id string) bool
- func (s BoltDB) ListAll() ([]task.ScheduledTask, error)
- func (s BoltDB) ListByType(types string) ([]task.ScheduledTask, error)
- func (s BoltDB) Status(id string) (task.ScheduledTask, error)
- func (s BoltDB) Store(task task.ScheduledTask) error
- func (s BoltDB) Update(task task.ScheduledTask, status task.Status) error
- type Memory
- func (m Memory) Close()
- func (m Memory) Delete(id string) (bool, error)
- func (m Memory) Exists(id string) bool
- func (m Memory) ListAll() ([]task.ScheduledTask, error)
- func (m Memory) ListByType(types string) ([]task.ScheduledTask, error)
- func (m Memory) Status(id string) (task.ScheduledTask, error)
- func (m Memory) Store(task task.ScheduledTask) error
- func (m Memory) Update(task task.ScheduledTask, status task.Status) error
- type Storage
Constants ¶
View Source
const Bucket = "duty-tasks"
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(payload []byte) (task.ScheduledTask, error)
Types ¶
type BoltDB ¶
func NewBoltDBStorage ¶
func (BoltDB) ListByType ¶
func (s BoltDB) ListByType(types string) ([]task.ScheduledTask, error)
type Memory ¶
type Memory struct {
Tasks map[string]task.ScheduledTask
}
func NewMemoryStorage ¶
func NewMemoryStorage() Memory
func (Memory) ListByType ¶
func (m Memory) ListByType(types string) ([]task.ScheduledTask, error)
type Storage ¶
type Storage interface { Store(task task.ScheduledTask) error Update(task.ScheduledTask, task.Status) error Status(id string) (task.ScheduledTask, error) Exists(id string) bool ListByType(types string) ([]task.ScheduledTask, error) ListAll() ([]task.ScheduledTask, error) Delete(id string) (bool, error) Close() }
Click to show internal directories.
Click to hide internal directories.