summary

package
v1.81.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderToday

func RenderToday(summary *Summary, hideCategories bool, out output.Output) (string, error)

RenderToday generates a text representation from summary of the current day. If out is set to output.RawJSONOutput or output.JSONOutput, the summary will be marshaled to JSON. Expects exactly one summary for the current day. Will return an error otherwise.

Types

type Category

type Category struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Category represents the tracked category for a single day activity.

type Counter added in v1.64.1

type Counter struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Counter represents the time counters.

type Data added in v1.64.1

type Data struct {
	Categories       []Category        `json:"categories"`
	Dependencies     []Dependency      `json:"dependencies"`
	Editors          []Editor          `json:"editors"`
	GrandTotal       GrandTotal        `json:"grand_total"`
	Languages        []Language        `json:"languages"`
	Machines         []Machine         `json:"machines"`
	OperatingSystems []OperatingSystem `json:"operating_systems"`
	Projects         []Project         `json:"projects"`
	Range            Range             `json:"range"`
}

Data aggregates all activities for a single day.

type Dependency added in v1.64.1

type Dependency struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Dependency represents the discovered dependency for a single day activity.

type Editor added in v1.64.1

type Editor struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Editor represents the used editor for a single day activity.

type GrandTotal added in v1.64.1

type GrandTotal struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

GrandTotal represents the total working time for a single day.

type Language added in v1.64.1

type Language struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Language represents the used programming language for a single day activity.

type Machine added in v1.64.1

type Machine struct {
	Decimal       string  `json:"decimal"`
	Digital       string  `json:"digital"`
	Hours         int     `json:"hours"`
	MachineNameID string  `json:"machine_name_id"`
	Minutes       int     `json:"minutes"`
	Name          string  `json:"name"`
	Percent       float64 `json:"percent"`
	Seconds       int     `json:"seconds"`
	Text          string  `json:"text"`
	TotalSeconds  float64 `json:"total_seconds"`
}

Machine represents the used machine for a single day activity.

type OperatingSystem added in v1.64.1

type OperatingSystem struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

OperatingSystem represents the used operating system for a single day activity.

type Project added in v1.64.1

type Project struct {
	Decimal      string  `json:"decimal"`
	Digital      string  `json:"digital"`
	Hours        int     `json:"hours"`
	Minutes      int     `json:"minutes"`
	Name         string  `json:"name"`
	Percent      float64 `json:"percent"`
	Seconds      int     `json:"seconds"`
	Text         string  `json:"text"`
	TotalSeconds float64 `json:"total_seconds"`
}

Project represents the discovered project for a single day activity.

type Range added in v1.64.1

type Range struct {
	Date     string `json:"date"`
	End      string `json:"end"`
	Start    string `json:"start"`
	Text     string `json:"text"`
	Timezone string `json:"timezone"`
}

Range represents the the time range of a summary.

type Summary

type Summary struct {
	CachedAt        string `json:"cached_at"`
	Data            Data   `json:"data"`
	HasTeamFeatures bool   `json:"has_team_features"`
}

Summary represents the tracked working time for a single day.

Jump to

Keyboard shortcuts

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