syncthing-hs-0.2.0.0: Haskell bindings for the Syncthing REST API

Copyright(c) 2014 Jens Thomas
LicenseBSD-style
Maintainerjetho@gmx.de
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010
Extensions
  • OverloadedStrings
  • TupleSections

Network.Syncthing.Post

Contents

Description

Syncthing POST requests.

Synopsis

System services

config :: MonadSync m => Config -> SyncM m () Source

Update the server configuration. The configuration will be saved to disk and the configInSync flag set to false. restart Syncthing to activate.

discovery :: MonadSync m => Device -> Server -> SyncM m () Source

Add an entry to the discovery cache.

ping :: MonadSync m => SyncM m Text Source

Ping the Syncthing server. Returns the string "pong".

sendError :: MonadSync m => Text -> SyncM m () Source

Register a new error message.

clearErrors :: MonadSync m => SyncM m () Source

Remove all recent errors.

reset :: MonadSync m => SyncM m SystemMsg Source

Reset Syncthing by renaming all folder directories to temporary, unique names, wiping all indexes and restarting.

restart :: MonadSync m => SyncM m SystemMsg Source

Restart Syncthing.

shutdown :: MonadSync m => SyncM m SystemMsg Source

Shutdown Syncthing.

upgrade :: MonadSync m => SyncM m (Maybe SystemMsg) Source

Perform an upgrade to the newest release and restart. Does nothing if there is no newer version.

Database Services

ignores :: MonadSync m => FolderName -> [Text] -> SyncM m (Maybe [Text]) Source

Update the ignores list and echo it back as response.

prio :: MonadSync m => FolderName -> Path -> SyncM m Need Source

Move the given file to the top of the download queue.

scan :: MonadSync m => FolderName -> Maybe Path -> SyncM m () Source

Request rescan of a folder. Restrict the scan to a relative subpath within the folder by specifying the optional path parameter.