Documentation
¶
Overview ¶
Package cli wires the cobra command tree for the readur binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigProfileRow ¶
type ConfigProfileRow struct {
Name string `json:"name"`
ServerURL string `json:"server_url"`
Username string `json:"username"`
ObtainedAt string `json:"obtained_at"`
TokenExpiry string `json:"token_expiry,omitempty"`
InsecureSkipVerify bool `json:"insecure_skip_verify"`
HasToken bool `json:"has_token"`
HasPassword bool `json:"has_password"`
}
ConfigProfileRow is a redacted view of a profile for display. Neither the token nor the optional saved password value is ever included — presence is exposed as a boolean.
type ConfigShowJSON ¶
type ConfigShowJSON struct {
ConfigPath string `json:"config_path"`
StateDir string `json:"state_dir"`
Exists bool `json:"exists"`
DefaultIs string `json:"default_profile,omitempty"`
Profiles []ConfigProfileRow `json:"profiles"`
Example string `json:"example_config"`
ExitCode int `json:"exit_code"`
}
ConfigShowJSON is the JSON shape emitted by `readur config show --json`.
type Globals ¶
type Globals struct {
ConfigPath string
ProfileFlag string
JSON bool
Quiet bool
Verbose bool
NoColor bool
InsecureSkipVerify bool
Writer *output.Writer
}
Globals carries the resolved persistent-flag state after Cobra parses the root command. Commands read from this.
type LabelRow ¶
type LabelRow struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color,omitempty"`
Description string `json:"description,omitempty"`
DocumentCount int `json:"document_count"`
CreatedBy string `json:"created_by,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
}
LabelRow is the per-label record in JSON output. It mirrors the client.Label struct but trims zero-value timestamps to keep the output compact for the common case.
type LabelsListJSON ¶
type LabelsListJSON struct {
Labels []LabelRow `json:"labels"`
Total int `json:"total"`
ExitCode int `json:"exit_code"`
}
LabelsListJSON is the JSON shape emitted by `readur labels list --json`.
type LoginJSON ¶
type LoginJSON struct {
Profile string `json:"profile"`
ServerURL string `json:"server_url"`
Username string `json:"username"`
TokenExpiresAt string `json:"token_expires_at,omitempty"`
PasswordSaved bool `json:"password_saved"`
ExitCode int `json:"exit_code"`
}
LoginJSON is the JSON shape emitted by `readur login --json` on success. Matches contracts/json-output.md §login.
type UploadJSON ¶
type UploadJSON struct {
LocalPath string `json:"local_path"`
DocumentID string `json:"document_id"`
SizeBytes int64 `json:"size_bytes"`
Labels []string `json:"labels"`
Title string `json:"title,omitempty"`
OCREnabled *bool `json:"ocr_enabled,omitempty"`
Language string `json:"language,omitempty"`
DurationMs int64 `json:"duration_ms"`
ExitCode int `json:"exit_code"`
}
UploadJSON is the JSON shape emitted by `readur upload --json` on success (see contracts/json-output.md §upload).