syncthing

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStatistics

type DeviceStatistics struct {
	LastSeen               string `json:"lastSeen"`
	LastConnectionDuration int    `json:"lastConnectionDurationS"`
}

type FolderConfig

type FolderConfig struct {
	ID                      string `json:"id"`
	Label                   string `json:"label,omitempty"`
	FilesystemType          string `json:"filesystemType,omitempty"`
	Path                    string `json:"path,omitempty"`
	Type                    string `json:"type,omitempty"`
	RescanIntervalS         int    `json:"rescanIntervalS,omitempty"`
	FsWatcherEnabled        bool   `json:"fsWatcherEnabled,omitempty"`
	FsWatcherDelayS         int    `json:"fsWatcherDelayS,omitempty"`
	IgnorePerms             bool   `json:"ignorePerms,omitempty"`
	AutoNormalize           bool   `json:"autoNormalize,omitempty"`
	Copiers                 int    `json:"copiers,omitempty"`
	PullerMaxPendingKiB     int    `json:"pullerMaxPendingKiB,omitempty"`
	Hashers                 int    `json:"hashers,omitempty"`
	Order                   string `json:"order,omitempty"`
	IgnoreDelete            bool   `json:"ignoreDelete,omitempty"`
	ScanProgressIntervalS   int    `json:"scanProgressIntervalS,omitempty"`
	PullerPauseS            int    `json:"pullerPauseS,omitempty"`
	MaxConflicts            int    `json:"maxConflicts,omitempty"`
	DisableSparseFiles      bool   `json:"disableSparseFiles,omitempty"`
	DisableTempIndexes      bool   `json:"disableTempIndexes,omitempty"`
	Paused                  bool   `json:"paused,omitempty"`
	WeakHashThresholdPct    int    `json:"weakHashThresholdPct,omitempty"`
	MarkerName              string `json:"markerName,omitempty"`
	CopyOwnershipFromParent bool   `json:"copyOwnershipFromParent,omitempty"`
	ModTimeWindowS          int    `json:"modTimeWindowS,omitempty"`
	MaxConcurrentWrites     int    `json:"maxConcurrentWrites,omitempty"`
	DisableFsync            bool   `json:"disableFsync,omitempty"`
	BlockPullOrder          string `json:"blockPullOrder,omitempty"`
	CopyRangeMethod         string `json:"copyRangeMethod,omitempty"`
	CaseSensitiveFS         bool   `json:"caseSensitiveFS,omitempty"`
	JunctionsAsDirs         bool   `json:"junctionsAsDirs,omitempty"`
	SyncOwnership           bool   `json:"syncOwnership,omitempty"`
	SendOwnership           bool   `json:"sendOwnership,omitempty"`
	SyncXattrs              bool   `json:"syncXattrs,omitempty"`
	SendXattrs              bool   `json:"sendXattrs,omitempty"`
}

type SyncthingClient

type SyncthingClient struct {
	// contains filtered or unexported fields
}

func New

func New(host string, token string) *SyncthingClient

func (*SyncthingClient) GetDeviceStats

func (c *SyncthingClient) GetDeviceStats() (map[string]DeviceStatistics, error)

func (*SyncthingClient) GetFolderConfig

func (c *SyncthingClient) GetFolderConfig(id string) ([]FolderConfig, error)

func (*SyncthingClient) GetVersion

func (c *SyncthingClient) GetVersion() (VersionInfo, error)

func (*SyncthingClient) Pause

func (c *SyncthingClient) Pause(id string) error

func (*SyncthingClient) Resume

func (c *SyncthingClient) Resume(id string) error

func (*SyncthingClient) SetFolderConfig

func (c *SyncthingClient) SetFolderConfig(id string, param string, value any) error

type VersionInfo

type VersionInfo struct {
	Arch        string `json:"arch"`
	LongVersion string `json:"longVersion"`
	OS          string `json:"os"`
	Version     string `json:"version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL