task

package
v0.0.0-...-a88da2e Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	Name        string `bson:"name,omitempty" json:"name"`
	Date        string `bson:"date,omitempty" json:"date"`
	Time        string `bson:"time,omitempty" json:"time"`
	Description string `bson:"description,omitempty" json:"description"`
	// Only used to store the old category when updating a task
	OldCategory string `bson:"-" json:"oldCategory"`
	Category    string `bson:"category,omitempty" json:"category"`

	Username    string `bson:"username" json:"-"`
	Index       int64  `bson:"index,omitempty" json:"index"`
	Predecessor int64  `bson:"predecessor,omitempty" json:"predecessor"`
	Successor   int64  `bson:"successor,omitempty" json:"successor"`
}

func DecodeFromRequest

func DecodeFromRequest(r *http.Request) (*Task, error)

func (*Task) DateTime

func (t *Task) DateTime() *dateTime

func (*Task) HasPredecessor

func (t *Task) HasPredecessor() bool

func (*Task) HasSuccessor

func (t *Task) HasSuccessor() bool

func (*Task) SetPredecessor

func (t *Task) SetPredecessor(p *Task) error

func (*Task) SetSuccessor

func (t *Task) SetSuccessor(s *Task) error

Jump to

Keyboard shortcuts

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