Documentation
¶
Overview ¶
Package syncthing owns loopback access to the pinned Syncthing daemon.
Index ¶
- Constants
- func WithMutationLock(action func() error) error
- type BackupFolder
- type Client
- func (c *Client) AddDevice(ctx context.Context, id string) error
- func (c *Client) BackupFolder(ctx context.Context, localID string) (BackupFolder, error)
- func (c *Client) CanonicalID(ctx context.Context, input string) (string, error)
- func (c *Client) ConfirmPrivacy(ctx context.Context) error
- func (c *Client) ListDevices(ctx context.Context) ([]Device, error)
- func (c *Client) LocalID(ctx context.Context) (string, error)
- func (c *Client) RemoveDevice(ctx context.Context, id string) error
- func (c *Client) Request(ctx context.Context, method, endpoint, body string) (string, error)
- func (c *Client) ShareBackup(ctx context.Context, f BackupFolder, id string) error
- type Device
Constants ¶
const GUIBase = "http://127.0.0.1:8384"
Variables ¶
This section is empty.
Functions ¶
func WithMutationLock ¶
WithMutationLock coordinates VPN processes using the stable root-owned board directory. No credential file is locked or written. Contention refuses promptly. External Web UI/API writers do not participate in this advisory lock.
Types ¶
type BackupFolder ¶
type BackupFolder struct {
ID string `json:"id"`
Path string `json:"path"`
Type string `json:"type"`
Marker string `json:"markerName"`
Devices []json.RawMessage `json:"devices"`
}
BackupFolder keeps unmodeled per-device fields intact when PATCH replaces the devices array. In particular, encryption passwords and introduction metadata must survive pairing another receiver.
func (BackupFolder) HasDevice ¶
func (f BackupFolder) HasDevice(id string) bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is immutable after construction and may serve concurrent reads. Credentials are supplied by the caller's existing privilege boundary.
func (*Client) BackupFolder ¶
func (*Client) CanonicalID ¶
CanonicalID delegates checksum and protocol parsing to the pinned daemon.
func (*Client) ConfirmPrivacy ¶
ConfirmPrivacy requires explicit fields; missing values are not evidence of disabled discovery or reporting. It observes configuration without repairing it.
func (*Client) Request ¶
Request never follows redirects or consults proxy environment variables. Error bodies are discarded because they may contain configuration secrets.