incident

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: 7 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, incidentID int64) error

Delete a incident based on its id.

Types

type Incident

type Incident struct {
	ID           int64  `json:"id"`
	TaskID       int64  `json:"taskId"`
	Name         string `json:"name" binding:"required"`
	Description  string `json:"description" binding:"required" datastore:",noindex"`
	Active       bool   `json:"active"`
	Status       int    `json:"status"`
	CreationTime int64  `json:"creationTime"`
	UpdateTime   int64  `json:"updateTime"`
}

Incident defines incident attributes

func Create

func Create(ctx *authcontext.Context, taskID int64, incident *Incident) (*Incident, error)

Create an incident

func GetByID

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

GetByID a incident based on its numeric ID

func GetIncidents

func GetIncidents(ctx *authcontext.Context, taskID int64) ([]Incident, error)

GetIncidents Fetches all incidents for the authenticated user

func Update

func Update(ctx *authcontext.Context, taskID int64, incident *Incident) (*Incident, error)

Update incident data

Jump to

Keyboard shortcuts

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