Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Describe ¶
Describe renders a one-line status suffix for a card, which cannot report the firmware, heap, and signal a live device does.
func NetworkClient ¶
NetworkClient builds a client for a configured device, discovering it when no host is set.
Exported for the paths that are network-only by nature -- doctor reads the signal strength and free heap, which a card has no answer for.
Types ¶
type Target ¶
type Target interface {
syncpkg.Transport
ListRecursive(ctx context.Context, root device.Path) (map[device.Path]device.FileEntry, error)
MkdirAll(ctx context.Context, p device.Path) error
Download(ctx context.Context, p device.Path) (io.ReadCloser, error)
}
Target is everything a command needs from a place books can go.
Both a networked device and a mounted SD card satisfy it, which is what lets the planner, the manifest, and path pinning work identically over either. The interface lives here rather than in internal/sync because sync needs only the mutating subset; listing and downloading are the CLI's business. Target is a place books can go.
func Open ¶
Open resolves a configured device to something writable, plus a label naming it for messages -- a host for a network device, a mount for a card.
wantUUID is the manifest's device UUID, used to catch a card that belongs to a different reader. Pass "" when no manifest has been loaded, which skips that check without weakening the others.