output

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_FORMAT_FULL   = "2006-01-02 15:04:05"
	TIME_FORMAT_SIMPLE = "15:04:05"
)

Variables

This section is empty.

Functions

func ProjectPrint

func ProjectPrint(ws []dto.Project, w io.Writer) error

ProjectPrint will print more details

func ProjectPrintQuietly

func ProjectPrintQuietly(ws []dto.Project, w io.Writer) error

ProjectPrintQuietly will only print the IDs

func ProjectPrintWithTemplate

func ProjectPrintWithTemplate(format string) func([]dto.Project, io.Writer) error

ProjectPrintWithTemplate will print each worspace using the format string

func ProjectsCSVPrint

func ProjectsCSVPrint(projects []dto.Project, out io.Writer) error

ProjectsCSVPrint will print each time entry using the format string

func ProjectsJSONPrint

func ProjectsJSONPrint(t []dto.Project, w io.Writer) error

ProjectsJSONPrint will print as JSON

func TagPrint

func TagPrint(ws []dto.Tag, w io.Writer) error

TagPrint will print more details

func TagPrintQuietly

func TagPrintQuietly(ws []dto.Tag, w io.Writer) error

TagPrintQuietly will only print the IDs

func TagPrintWithTemplate

func TagPrintWithTemplate(format string) func([]dto.Tag, io.Writer) error

TagPrintWithTemplate will print each worspace using the format string

func TimeEntriesCSVPrint

func TimeEntriesCSVPrint(timeEntries []dto.TimeEntry, out io.Writer) error

TimeEntriesCSVPrint will print each time entry using the format string

func TimeEntriesJSONPrint

func TimeEntriesJSONPrint(t []dto.TimeEntry, w io.Writer) error

TimeEntriesJSONPrint will print as JSON

func TimeEntriesMarkdownPrint added in v0.25.0

func TimeEntriesMarkdownPrint(tes []dto.TimeEntry, w io.Writer) error

TimeEntriesMarkdownPrint will print time entries in "markdown blocks"

func TimeEntriesPrint

func TimeEntriesPrint(opts ...TimeEntryOutputOpt) func([]dto.TimeEntry, io.Writer) error

TimeEntriesPrint will print more details

func TimeEntriesPrintQuietly

func TimeEntriesPrintQuietly(timeEntries []dto.TimeEntry, w io.Writer) error

TimeEntriesPrintQuietly will only print the IDs

func TimeEntriesPrintWithTemplate

func TimeEntriesPrintWithTemplate(
	format string,
) func([]dto.TimeEntry, io.Writer) error

TimeEntriesPrintWithTemplate will print each time entry using the format string

func TimeEntriesTotalDurationOnlyAsFloat added in v0.27.0

func TimeEntriesTotalDurationOnlyAsFloat(timeEntries []dto.TimeEntry, w io.Writer) error

TimeEntriesTotalDurationOnlyAsFloat will only print the total duration as float

func TimeEntriesTotalDurationOnlyFormatted added in v0.27.0

func TimeEntriesTotalDurationOnlyFormatted(timeEntries []dto.TimeEntry, w io.Writer) error

TimeEntryTotalDurationOnlyFormatted will only print the total duration as float

func UserJSONPrint

func UserJSONPrint(u dto.User, w io.Writer) error

func UserPrint

func UserPrint(users []dto.User, w io.Writer) error

UserPrint will print more details

func UserPrintQuietly

func UserPrintQuietly(users []dto.User, w io.Writer) error

UserPrintQuietly will only print the IDs

func UserPrintWithTemplate

func UserPrintWithTemplate(format string) func([]dto.User, io.Writer) error

UserPrintWithTemplate will print each worspace using the format string

func WorkspacePrint

func WorkspacePrint(wDefault string) func(ws []dto.Workspace, w io.Writer) error

WorkspacePrint will print more details

func WorkspacePrintQuietly

func WorkspacePrintQuietly(ws []dto.Workspace, w io.Writer) error

WorkspacePrintQuietly will only print the IDs

func WorkspacePrintWithTemplate

func WorkspacePrintWithTemplate(format string) func([]dto.Workspace, io.Writer) error

WorkspacePrintWithTemplate will print each worspace using the format string

Types

type TimeEntryOutputOpt added in v0.27.0

type TimeEntryOutputOpt func(*TimeEntryOutputOptions) error

TimeEntryOutputOpt allows the setting of TimeEntryOutputOptions values

func WithShowTasks added in v0.27.0

func WithShowTasks() TimeEntryOutputOpt

WithShowTasks shows a new column with the task of the time entry

func WithTimeFormat added in v0.27.0

func WithTimeFormat(format string) TimeEntryOutputOpt

WithTimeFormat sets the date-time output format

func WithTotalDuration added in v0.27.0

func WithTotalDuration() TimeEntryOutputOpt

WithDurationTotal shows a footer with the sum of the durations of the time entries

type TimeEntryOutputOptions added in v0.27.0

type TimeEntryOutputOptions struct {
	ShowTasks         bool
	ShowTotalDuration bool
	TimeFormat        string
}

TimeEntryOptions sets how the "table" format should print the time entries

Jump to

Keyboard shortcuts

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