Documentation
¶
Overview ¶
Package found implements the wherehouse found command, which records that a previously missing or lost item has been found.
The found command fires an item.found event, setting the item's current location and establishing (or preserving) its home location for future return tracking.
With --return, a second item.moved event is fired to return the item to its home location (TempOriginLocationID) if known.
Supported selector types:
- ID: aB3xK9mPqR (exact ID)
- LOCATION:ITEM: garage:socket (both canonical names, filters by location)
- Canonical name: "10mm socket" (must match exactly 1 item)
Examples:
wherehouse found "10mm socket" --in garage wherehouse found "10mm socket" --in garage --return wherehouse found garage:screwdriver --in shed --note "behind workbench"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFoundCmd
deprecated
func NewDefaultFoundCmd ¶
NewDefaultFoundCmd returns a found command that opens the database from context configuration at runtime. This is the production entry point registered with the root command.
func NewFoundCmd ¶
NewFoundCmd returns a found command that uses the provided db for all database operations. The caller retains no reference to db after this call; the returned command's RunE closes it via defer before returning.
Types ¶
type Result ¶
type Result struct {
ItemID string `json:"item_id"`
DisplayName string `json:"display_name"`
FoundAt string `json:"found_at"`
HomeLocation string `json:"home_location"`
Returned bool `json:"returned"`
FoundEventID int64 `json:"found_event_id"`
ReturnEventID *int64 `json:"return_event_id,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
Result represents the result of a single item found operation.