Documentation ¶
Index ¶
- Constants
- func TimeEntriesCSVPrint(timeEntries []dto.TimeEntry, out io.Writer) error
- func TimeEntriesJSONPrint(t []dto.TimeEntry, w io.Writer) error
- func TimeEntriesMarkdownPrint(tes []dto.TimeEntry, w io.Writer) error
- func TimeEntriesPrint(options TimeEntryOutputOptions) func([]dto.TimeEntry, io.Writer) error
- func TimeEntriesPrintQuietly(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntriesPrintWithTemplate(format string) func([]dto.TimeEntry, io.Writer) error
- func TimeEntriesTotalDurationOnlyAsFloat(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntriesTotalDurationOnlyFormatted(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntryJSONPrint(t dto.TimeEntry, w io.Writer) error
- type TimeEntryOutputOptions
- func (teo TimeEntryOutputOptions) WithShowClients() TimeEntryOutputOptions
- func (teo TimeEntryOutputOptions) WithShowTasks() TimeEntryOutputOptions
- func (teo TimeEntryOutputOptions) WithTimeFormat(format string) TimeEntryOutputOptions
- func (teo TimeEntryOutputOptions) WithTotalDuration() TimeEntryOutputOptions
Constants ¶
const ( TimeFormatFull = "2006-01-02 15:04:05" TimeFormatSimple = "15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func TimeEntriesCSVPrint ¶
TimeEntriesCSVPrint will print each time entry using the format string
func TimeEntriesJSONPrint ¶
TimeEntriesJSONPrint will print as JSON
func TimeEntriesMarkdownPrint ¶
TimeEntriesMarkdownPrint will print time entries in "markdown blocks"
func TimeEntriesPrint ¶
TimeEntriesPrint will print more details
func TimeEntriesPrintQuietly ¶
TimeEntriesPrintQuietly will only print the IDs
func TimeEntriesPrintWithTemplate ¶
TimeEntriesPrintWithTemplate will print each time entry using the format string
func TimeEntriesTotalDurationOnlyAsFloat ¶
TimeEntriesTotalDurationOnlyAsFloat will only print the total duration as float
func TimeEntriesTotalDurationOnlyFormatted ¶
TimeEntriesTotalDurationOnlyFormatted will only print the total duration as float
Types ¶
type TimeEntryOutputOptions ¶
type TimeEntryOutputOptions struct { ShowTasks bool ShowClients bool ShowTotalDuration bool TimeFormat string }
TimeEntryOutputOptions sets how the "table" format should print the time entries
func NewTimeEntryOutputOptions ¶ added in v0.51.0
func NewTimeEntryOutputOptions() TimeEntryOutputOptions
NewTimeEntryOutputOptions creates a default TimeEntryOutputOptions
func (TimeEntryOutputOptions) WithShowClients ¶ added in v0.51.0
func (teo TimeEntryOutputOptions) WithShowClients() TimeEntryOutputOptions
WithShowCliens shows a new column with the client of the time entry
func (TimeEntryOutputOptions) WithShowTasks ¶ added in v0.51.0
func (teo TimeEntryOutputOptions) WithShowTasks() TimeEntryOutputOptions
WithShowTasks shows a new column with the task of the time entry
func (TimeEntryOutputOptions) WithTimeFormat ¶ added in v0.51.0
func (teo TimeEntryOutputOptions) WithTimeFormat( format string) TimeEntryOutputOptions
WithTimeFormat sets the date-time output format
func (TimeEntryOutputOptions) WithTotalDuration ¶ added in v0.51.0
func (teo TimeEntryOutputOptions) WithTotalDuration() TimeEntryOutputOptions
WithTotalDuration shows a footer with the sum of the durations of the time entries