roadmap

package
v2.18.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Overview

roadmap provides data for generating roadmaps

roadmap provides data for generating roadmaps

roadmap provides data for generating roadmaps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuarterInt32sBeginEnd

func QuarterInt32sBeginEnd(begin, end int32) (int32, int32)

QuarterInt32sBeginEnd converts relative and default quarter times to absolute int32 quarter numbers.

Types

type Canvas

type Canvas struct {
	MinTime time.Time
	MaxTime time.Time
	MinX    int64 // time
	MaxX    int64 // time
	MaxY    int64
	MinY    int64
	MinCell int32
	MaxCell int32
	Range   mathutil.RangeInt64
	Items   []Item
	Rows    [][]Item
}

func GetCanvasQuarter

func GetCanvasQuarter(start, end int32) (Canvas, error)

func (*Canvas) AddItem

func (can *Canvas) AddItem(item Item)

func (*Canvas) BuildRows

func (can *Canvas) BuildRows()

func (*Canvas) InflateItem

func (can *Canvas) InflateItem(item Item) (Item, error)

func (*Canvas) InflateItems

func (can *Canvas) InflateItems() error

func (*Canvas) SetMaxQuarter

func (can *Canvas) SetMaxQuarter(qtr int32) error

func (*Canvas) SetMinMaxQuarter

func (can *Canvas) SetMinMaxQuarter(qtrMin, qtrMax int32) error

func (*Canvas) SetMinQuarter

func (can *Canvas) SetMinQuarter(qtr int32) error

func (*Canvas) SetRangeCells

func (can *Canvas) SetRangeCells(cells int32)

type Feature

type Feature struct {
	Name      string
	URL       string
	StartTime time.Time
	EndTime   time.Time
	StartIdx  int32
	EndIdx    int32
}

func (*Feature) AddIndexes

func (f *Feature) AddIndexes(range64 mathutil.RangeInt64) error

func (*Feature) SortTimes

func (f *Feature) SortTimes()

type Initiative

type Initiative struct {
	Name     string
	Features []Feature
	Rows     [][]Feature // Array of array of non-overlapping features
}

func (*Initiative) BuildRows

func (init *Initiative) BuildRows(start, end time.Time, range64 mathutil.RangeInt64) ([][]Feature, error)

type Item

type Item struct {
	MinTime            time.Time
	MaxTime            time.Time
	MinCell            int32 // Inflated by Canvas
	MaxCell            int32 // Inflated by Canvas
	Min                int64 // Inflated by Canvas
	Max                int64 // Inflated by Canvas
	Name               string
	NameShort          string
	URL                string
	ForegroundColorHex string
	BackgroundColorHex string
}

func (*Item) SetMaxQuarter

func (i *Item) SetMaxQuarter(qtr int32) error

func (*Item) SetMinMaxQuarter

func (i *Item) SetMinMaxQuarter(qtrMin, qtrMax int32) error

func (*Item) SetMinQuarter

func (i *Item) SetMinQuarter(qtr int32) error

type Roadmap

type Roadmap struct {
	Initiatives     []Initiative
	ReportStartTime time.Time
	ReportEndTime   time.Time
	Cells           int32
	Range64         mathutil.RangeInt64
}

func NewRoadmap

func NewRoadmap(reportStartTime, reportEndTime time.Time, numCells int32) Roadmap

func (*Roadmap) Build

func (rm *Roadmap) Build() error

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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