task

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: GPL-3.0 Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Index    int        // The unique index of the item in the task-list
	Assignee id.ActorID // The name of the user that this item belongs to
	Author   id.ActorID // The "Name" of the user that created this task-item

	ProjectID    id.ProjectID // The project in which the task-item was created
	ProjectImage string

	Type      Type
	Reference itemReference // Unique reference to the item that is linked to this task-item

	Version      string
	Variant      string
	Deadline     time.Time
	CreationDate time.Time

	Done bool
}

Item is a single task-item in the task-list belonging to a single user

func (*Item) SetDone

func (item *Item) SetDone()

SetDone sets an item to done

type List

type List struct {
	Username string // The "Name" of the user this task-list belongs to
	Tasks    []Item
}

List is a collection of task-assignments

func NewList

func NewList(username string) *List

New List creates a new task-list for the user with the given name. The list contains no task-items.

Returns the created list.

func (*List) AddItem

func (l *List) AddItem(assignee, author id.ActorID, projectID id.ProjectID, taskType Type, refType ReferenceType, refID string, version, variant string, deadline time.Time) *List

AddItem creates a new -.task item and adds it to the list. The amount of task-items is the id of the newly created item.

Returns the list

func (*List) GetTaskDone

func (l *List) GetTaskDone() []Item

GetTaskDone returns all items which are already done.

func (*List) GetTaskUndone

func (l *List) GetTaskUndone() []Item

GetTaskUndone returns all items which are not already done.

func (*List) SetTasksToDone

func (l *List) SetTasksToDone(taskType Type, refType ReferenceType, refID string, version string, variant string) *List

SetTasksToDone sets all tasks that match the parameters to done (e.g. when unassigning from an assignment)

type ReferenceType

type ReferenceType int

ReferenceType is the type of the entity that is referenced by the task-item

const (
	Case ReferenceType = iota
	Sequence
	SUTVersion
)

These are the possible reference-types

type Type

type Type int

Type defines what kind of task the item is.

It defines for example what kind of text is displayed on the GUI.

const (
	Assignment           Type = iota
	SUTVersionAssignment      // Task to assign an sut-version to the test-cases
)

The types of a task-item

Jump to

Keyboard shortcuts

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