Documentation ¶
Overview ¶
This package provides a ligth client for syncthing, for when you need to upload/download but don't want a full sync.
Index ¶
- func Handshake(conn *tls.Conn, hello *protocol.Hello, exptectedID protocol.DeviceID) error
- func MakeRequst(ID int32, rootFolder string, name string, offset int64, size int32, ...) ([]byte, error)
- func MakeResponse(id int32, data []byte) ([]byte, error)
- type Callback
- type Client
- func (c *Client) AddRemote(deviceID string) error
- func (c *Client) Download(from, to string) error
- func (c *Client) GetFileList(folder string) ([]FileInfo, error)
- func (c *Client) GetSharedFolders() ([]string, error)
- func (c *Client) LoadCertificate(certFile, keyFile string) error
- func (c *Client) Upload(from, to string) error
- type FileInfo
- type Message
- type Remote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRequst ¶
Types ¶
type Callback ¶
type Callback struct { CCrecived chan bool IndexRecived chan bool ResponseRecived chan *protocol.Response }
TODO: Upload Complete
type Client ¶
type Client struct { Remote Remote // The remote syncthing instance Cert tls.Certificate // Your certificate DeviceID protocol.DeviceID // Your device ID }
func (*Client) GetFileList ¶
GetFileList retrieves a file list for the folder.
func (*Client) GetSharedFolders ¶
GetSharedFolders retrieves the folders that are shared with this client
func (*Client) LoadCertificate ¶
LoadCertificate loads the syncthing certificate from file
Click to show internal directories.
Click to hide internal directories.