cmd

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath added in v0.4.0

func ConfigPath() (string, error)

ConfigPath returns the config file to use: the first existing candidate, or the preferred XDG path for new installs.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type EditService added in v0.18.0

type EditService interface {
	GetHistory(from, to *time.Time) ([]data.TimeEntryItem, error)
	GetProjectIdByName(workspaceId int, projectName string) (int, error)
	UpdateTimeEntry(workspaceId int, entryId int, entry data.TimeEntry) (*data.TimeEntryItem, error)
	GetProjectsLookupMap(workspaceId int) (map[int]string, error)
}

EditService is the subset of api.Client used by the edit command.

type HistoryEntry added in v0.6.0

type HistoryEntry struct {
	Description string
	Duration    int
	Project     string
}

type ProjectConfig added in v0.8.0

type ProjectConfig struct {
	Paths []string `mapstructure:"paths"`
}

ProjectConfig holds project path mappings from config.

type StartService added in v0.17.0

type StartService interface {
	GetProjectIdByName(workspaceId int, projectName string) (int, error)
	CreateTimeEntry(workspaceId int, entry data.TimeEntry) (*data.TimeEntry, error)
	GetProjectsLookupMap(workspaceId int) (map[int]string, error)
}

StartService is the subset of api.Client used by the start command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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