scheduling

package
v0.0.0-...-6afa55f Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2020 inovex GmbH <https://www.inovex.de>

SPDX-License-Identifier: MIT

SPDX-FileCopyrightText: 2020 inovex GmbH <https://www.inovex.de>

SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	ID      string                 `dynamo:"ID" json:"id"`
	Due     time.Time              `dynamo:"Due" json:"due"`
	Action  string                 `dynamo:"Action" json:"action"`
	Payload map[string]interface{} `dynamo:"Payload" json:"payload"`
}

func (Task) Valid

func (t Task) Valid() bool

Valid checks the given task for validity. It will only accept tasks with a due date that is at least 1 Minute in the future.

type TaskRepository

type TaskRepository struct {
	// contains filtered or unexported fields
}

func NewTaskRepository

func NewTaskRepository(taskTable string) TaskRepository

func (TaskRepository) AddTask

func (r TaskRepository) AddTask(task Task) error

func (TaskRepository) DeleteTask

func (r TaskRepository) DeleteTask(id string) error

func (TaskRepository) Done

func (r TaskRepository) Done(task Task) error

func (TaskRepository) GetTasks

func (r TaskRepository) GetTasks() ([]Task, error)

Jump to

Keyboard shortcuts

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