timeline

package
v0.1.2-beta Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssueStatuNameInProgress = "In Progress"
)

Variables

View Source
var ErrTimelineEmpty = errors.New("timeline is empty")

Functions

This section is empty.

Types

type Component

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

func NewComponent

func NewComponent(db *file.DB, jiraFactory *jiraf.Factory, cfg *config.Component) *Component

func (*Component) BuildModel

func (c *Component) BuildModel(taskID string, opts *StartOpts) (*Model, error)

func (*Component) Edit

func (c *Component) Edit(num int, opts EditOpts) error

func (*Component) Get

func (c *Component) Get() (*Timeline, error)

func (*Component) GetCurrent

func (c *Component) GetCurrent() (*Model, error)

func (*Component) GetJiraFactory

func (c *Component) GetJiraFactory() *jiraf.Factory

func (*Component) Init

func (c *Component) Init() error

func (*Component) Publish

func (c *Component) Publish() error

func (*Component) Start

func (c *Component) Start(newModel *Model) (*Model, error)

func (*Component) Stop

func (c *Component) Stop() (*Model, error)

type DurationDescription

type DurationDescription struct {
	Duration time.Duration
	Summary  string
}

type EditOpts

type EditOpts struct {
	Description *string
	StartTime   *time.Time
	FinishTime  *time.Time
	Task        *string
}

type Model

type Model struct {
	Finished    bool
	StartTime   time.Time
	FinishTime  time.Time
	Description string
	Issue       *jira.Issue
	Tag         string
}

func NewModel

func NewModel(issue *jira.Issue) *Model

func (*Model) ActivityDuration

func (m *Model) ActivityDuration() time.Duration

func (*Model) Duration

func (m *Model) Duration() time.Duration

func (*Model) Finish

func (m *Model) Finish()

func (*Model) IsFinished

func (m *Model) IsFinished() bool

type StartOpts

type StartOpts struct {
	UsePrevDescription bool
	Description        string
}

func (*StartOpts) Validate

func (o *StartOpts) Validate() error

type Timeline

type Timeline struct {
	List []*Model
}

func (*Timeline) Add

func (t *Timeline) Add(m *Model)

func (*Timeline) GetCurrent

func (t *Timeline) GetCurrent() (*Model, error)

func (*Timeline) GetDurationsByTasks

func (t *Timeline) GetDurationsByTasks() map[string]DurationDescription

Jump to

Keyboard shortcuts

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