task

package
v0.0.0-...-cfce1d4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx *authcontext.Context, taskID int64) error

Delete a task based on its id.

Types

type Task

type Task struct {
	ID                    int64  `json:"id"`
	Name                  string `json:"name" binding:"required"`
	Description           string `json:"description" binding:"required" datastore:",noindex"`
	CreationTime          int64  `json:"creationTime"`
	UpdateTime            int64  `json:"updateTime"`
	Active                bool   `json:"active"`
	IncidentsCount        int64  `json:"incidentsCount"`
	PendingIncidentsCount int    `json:"pendingIncidentsCount" datastore:"-"`
}

Task defines task attributes

func Create

func Create(ctx *authcontext.Context, task *Task) (*Task, error)

Create aa task

func GetByID

func GetByID(ctx *authcontext.Context, id int64) (*Task, error)

GetByID a task based on its numeric ID

func GetTasks

func GetTasks(ctx *authcontext.Context) ([]Task, error)

GetTasks Fetches all tasks for the authenticated user

func Update

func Update(ctx *authcontext.Context, tsk *Task) (*Task, error)

Update task data

Jump to

Keyboard shortcuts

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