Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompareState ¶
type CompareState byte
const ( Same CompareState = iota Local Server OutOfSync NotExistLocal NotExistServer Unknown )
type SyncClient ¶
type SyncClient struct { SftpClient *sftp.Client Conn *ssh.Client Config SyncConfig }
func NewClient ¶
func NewClient(cfg SyncConfig) (SyncClient, error)
func (SyncClient) Close ¶
func (c SyncClient) Close() error
func (*SyncClient) Update ¶
func (c *SyncClient) Update(files ...string) error
type SyncConfig ¶
type SyncConfig struct { Host string `toml:"host"` User string `toml:"user"` Port int `toml:"port"` PrivateKeyPath string `toml:"private_key_path"` }
func ReadConfig ¶
func ReadConfig(configPath string) (SyncConfig, error)
Click to show internal directories.
Click to hide internal directories.