Versions in this module Expand all Collapse all v1 v1.0.1 Nov 9, 2023 v1.0.0 Nov 9, 2023 Changes in this version + const Bind + const ClusterPort + const DefaultAPIKey + const DefaultFileWatcherDelay + const DefaultFolderName + const DefaultRemoteDeviceID + const DisableParseFromGitIgnore + const EnableParseFromGitIgnore + const GUIPort + const IgnoredFIle + const LogFile + const Nocalhost + const RemoteHome + const SyncSecretName + func CopyFile(from, to string) error + func FileExists(name string) bool + func GetBinaryName() string + func GetDir(path string) string + func GetDownloadURL(os, arch, version string) (string, error) + func IsSubPathFolder(path string, paths []string) (bool, error) + func NewAPIClient() *http.Client + func Stop(pid int, force bool) error + type Folder struct + LocalPath string + Name string + RemotePath string + Retries int + SentStIgnore bool + type Ignores struct + Ignore []string + type Syncthing struct + APIKey string + BinPath string + Client *http.Client + EnableParseFromGitIgnore bool + FileWatcherDelay int + Folders []*Folder + ForceSendOnly bool + GUIAddress string + GUIPassword string + GUIPasswordHash string + IgnoreDelete bool + IgnoredPattern []string + ListenAddress string + LocalGUIPort int + LocalHome string + LocalPort int + LogPath string + PortForwardBackGroundPid int + RemoteAddress string + RemoteDeviceID string + RemoteGUIAddress string + RemoteGUIPort int + RemoteHome string + RemotePort int + RescanInterval string + SyncedPattern []string + SyncthingBackGroundPid int + Type string + func (s *Syncthing) APICall(ctx context.Context, url, method string, code int, params map[string]string, ...) ([]byte, error) + func (s *Syncthing) GetLocalConfigXML() ([]byte, error) + func (s *Syncthing) GetRemoteConfigXML() ([]byte, error) + func (s *Syncthing) Run(ctx context.Context) error + func (s *Syncthing) UpdateConfig() error + type SyncthingInstaller struct + BinPath string + CommitId string + Version string + func NewInstaller(binPath string, version string, commitId string) *SyncthingInstaller + func (s *SyncthingInstaller) InstallIfNeeded() (bool, error)