views

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TimelineRecordCategoryDowntime = TimelineRecordCategory("downtime")
View Source
const TimelineRecordCategoryWorktime = TimelineRecordCategory("worktime")

Variables

This section is empty.

Functions

This section is empty.

Types

type ApexchartsTimeline

type ApexchartsTimeline struct {
	Name string                  `json:"name"`
	Data []ApexchartsTimelineBar `json:"data"`
}

type ApexchartsTimelineBar

type ApexchartsTimelineBar struct {
	X string   `json:"x"`
	Y [2]int64 `json:"y"`
}

type Interval

type Interval struct {
	StartedAt  time.Time `json:"started_at"`
	FinishedAt time.Time `json:"finished_at"`
}

func (Interval) Allocation

func (i Interval) Allocation(now time.Time, other Interval) time.Duration

func (Interval) Duration

func (i Interval) Duration(now time.Time) time.Duration

func (Interval) Finish

func (i Interval) Finish(now time.Time) time.Time

func (Interval) Intersection

func (i Interval) Intersection(now time.Time, other Interval) (Interval, bool)

func (Interval) Start

func (i Interval) Start() time.Time

type Timeline

type Timeline struct {
	Workshift TimelineWorkshift `json:"workshift"`
	Equipment TimelineEquipment `json:"equipment"`
	Records   []TimelineRecord  `json:"records"`
}

func (Timeline) ApexchartsTimeline

func (t Timeline) ApexchartsTimeline(now time.Time) []openapi.ApexchartsTimeline

type TimelineEquipment

type TimelineEquipment struct {
	ID   string `json:"equipment_id"`
	Name string `json:"name"`
}

type TimelineRecord

type TimelineRecord struct {
	ID       string                 `json:"id"`
	Category TimelineRecordCategory `json:"category"`
	Interval
}

type TimelineRecordCategory

type TimelineRecordCategory string

type TimelineWorkshift

type TimelineWorkshift struct {
	ID string `json:"id"`
	Interval
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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