Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeLocal = "local" ModeRemote = "remote" )
Variables ¶
This section is empty.
Functions ¶
func ClearCredentials ¶
func ClearCredentials() error
func CredentialsPath ¶
func Home ¶
Home returns the ticket home directory used for config and (in local mode) the database. Resolution order:
- $TICKET_HOME if set
- Walk up from CWD looking for an existing .ticket directory
- ${CWD}/.ticket (default, may not yet exist)
func SaveCredentials ¶
func SaveCredentials(creds Credentials) error
Types ¶
type Config ¶
type Config struct {
ServerURL string `json:"server_url"`
Token string `json:"token"`
Username string `json:"username"`
CurrentProject string `json:"current_project"`
CurrentEpicID string `json:"current_epic_id"`
// TUI state — persisted between sessions by default.
// Set TUIDisablePersist=true to skip save/restore.
TUIDisablePersist bool `json:"tui_disable_persist,omitempty"`
TUITheme string `json:"tui_theme,omitempty"`
TUIMode string `json:"tui_mode,omitempty"` // "summary" | "projects" | "ideas" | "list" | "settings"
TUICursor int `json:"tui_cursor,omitempty"`
TUIExpandedEpics []string `json:"tui_expanded_epics,omitempty"`
// Temporary delete confirmation state
DeleteConfirmToken string `json:"delete_confirm_token,omitempty"`
DeleteConfirmProject string `json:"delete_confirm_project,omitempty"`
}
type Credentials ¶
type Credentials struct {
Token string `json:"token"`
}
func LoadCredentials ¶
func LoadCredentials() (Credentials, error)
type Resolved ¶
type Resolved struct {
Mode string // "local" or "remote"
DBPath string // populated when Mode == "local"
ServerURL string // populated when Mode == "remote"
}
Resolved holds the parsed result of TICKET_URL.
func ResolveURL ¶
ResolveURL determines mode and target from environment.
TICKET_URL=http(s)://host → remote mode (unset) → local mode, DBPath = <Home()>/ticket.db
Click to show internal directories.
Click to hide internal directories.