Documentation ¶
Index ¶
- Variables
- func FindStringInSlice(slice []string, val string) (int, bool)
- func RemoveFTPSecret(configs ...FTPConfig)
- func RemoveMatrixSecret(configs ...MatrixConfig)
- func RemoveS3Secret(configs ...S3Config)
- func RemoveWebDAVSecret(configs ...WebDAVConfig)
- type Config
- type Exchange
- type FTPConfig
- type FTPExchange
- func (exchange *FTPExchange) Connect(remoteRoot string, _ chan Exchange) error
- func (exchange *FTPExchange) Delete(pattern string, before time.Time) error
- func (exchange *FTPExchange) Disconnect()
- func (exchange *FTPExchange) ID() string
- func (exchange *FTPExchange) List(since time.Time) ([]Item, error)
- func (exchange *FTPExchange) Name() string
- func (exchange *FTPExchange) Pull(loc, file string) (int64, error)
- func (exchange *FTPExchange) Push(file string, loc string) (int64, error)
- func (exchange *FTPExchange) String() string
- type Item
- type MatrixConfig
- type MatrixExchange
- func (exchange *MatrixExchange) Config(withPrivateKeys bool) interface{}
- func (exchange *MatrixExchange) Connect(remoteRoot string, _ chan Exchange) error
- func (exchange *MatrixExchange) Delete(pattern string, before time.Time) error
- func (exchange *MatrixExchange) Disconnect()
- func (exchange *MatrixExchange) ID() string
- func (exchange *MatrixExchange) List(since time.Time) ([]Item, error)
- func (exchange *MatrixExchange) Name() string
- func (exchange *MatrixExchange) Pull(loc string, file string) (int64, error)
- func (exchange *MatrixExchange) Push(file, loc string) (int64, error)
- func (exchange *MatrixExchange) String() string
- type S3Config
- type S3Exchange
- func (exchange *S3Exchange) Config(withPrivateKeys bool) interface{}
- func (exchange *S3Exchange) Connect(remoteRoot string, _ chan Exchange) error
- func (exchange *S3Exchange) Delete(pattern string, before time.Time) error
- func (exchange *S3Exchange) Disconnect()
- func (exchange *S3Exchange) ID() string
- func (exchange *S3Exchange) List(since time.Time) ([]Item, error)
- func (exchange *S3Exchange) Name() string
- func (exchange *S3Exchange) Pull(loc string, file string) (int64, error)
- func (exchange *S3Exchange) Push(file, loc string) (int64, error)
- func (exchange *S3Exchange) String() string
- type USBConfig
- type USBExchange
- func (exchange *USBExchange) Connect(remoteRoot string, onUpdate chan Exchange) error
- func (exchange *USBExchange) Delete(string, time.Time) error
- func (exchange *USBExchange) Disconnect()
- func (exchange *USBExchange) ID() string
- func (exchange *USBExchange) List(since time.Time) ([]Item, error)
- func (exchange *USBExchange) Name() string
- func (exchange *USBExchange) Pull(loc, file string) (int64, error)
- func (exchange *USBExchange) Push(file, loc string) (int64, error)
- func (exchange *USBExchange) String() string
- type WebDAVConfig
- type WebDAVExchange
- func (exchange *WebDAVExchange) Config(withPrivateKeys bool) interface{}
- func (exchange *WebDAVExchange) Connect(remoteRoot string, _ chan Exchange) error
- func (exchange *WebDAVExchange) Delete(pattern string, before time.Time) error
- func (exchange *WebDAVExchange) Disconnect()
- func (exchange *WebDAVExchange) ID() string
- func (exchange *WebDAVExchange) List(since time.Time) ([]Item, error)
- func (exchange *WebDAVExchange) Name() string
- func (exchange *WebDAVExchange) Pull(loc, file string) (int64, error)
- func (exchange *WebDAVExchange) Push(file, loc string) (int64, error)
- func (exchange *WebDAVExchange) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoUSBMounts = errors.New("no suitable USB devices")
Functions ¶
func RemoveFTPSecret ¶
func RemoveFTPSecret(configs ...FTPConfig)
func RemoveMatrixSecret ¶
func RemoveMatrixSecret(configs ...MatrixConfig)
func RemoveS3Secret ¶
func RemoveS3Secret(configs ...S3Config)
func RemoveWebDAVSecret ¶
func RemoveWebDAVSecret(configs ...WebDAVConfig)
Types ¶
type Config ¶
type Config struct { S3 []S3Config `json:"s3" yaml:"s3"` WebDAV []WebDAVConfig `json:"webDAV" yaml:"webdav"` Ftp []FTPConfig `json:"ftp" yaml:"ftp"` USB []USBConfig `json:"usb" yaml:"usb"` }
func RemoveSecret ¶
type Exchange ¶
type Exchange interface { ID() string /** Connect to the transport using local as folder where download/upload files are */ Connect(remoteRoot string, onUpdate chan Exchange) error Disconnect() List(since time.Time) ([]Item, error) /** Pull the requested file (full local) from the transport to the storage folder */ Push(file, loc string) (int64, error) /** Pull the requested location from the transport to the storage folder*/ Pull(loc, file string) (int64, error) /** Delete all files matching pattern and older than specified time */ Delete(pattern string, before time.Time) error Name() string String() string }
func GetExchanges ¶
type FTPExchange ¶
type FTPExchange struct {
// contains filtered or unexported fields
}
func (*FTPExchange) Connect ¶
func (exchange *FTPExchange) Connect(remoteRoot string, _ chan Exchange) error
func (*FTPExchange) Delete ¶
func (exchange *FTPExchange) Delete(pattern string, before time.Time) error
func (*FTPExchange) Disconnect ¶
func (exchange *FTPExchange) Disconnect()
func (*FTPExchange) ID ¶
func (exchange *FTPExchange) ID() string
func (*FTPExchange) Name ¶
func (exchange *FTPExchange) Name() string
func (*FTPExchange) Push ¶
func (exchange *FTPExchange) Push(file string, loc string) (int64, error)
func (*FTPExchange) String ¶
func (exchange *FTPExchange) String() string
type MatrixConfig ¶
type MatrixConfig struct { Name string `json:"name" yaml:"name"` HomeServer string `json:"homeServer"` UserId string `json:"userId"` AccessKey string `json:"accessKey"` RoomId string `json:"roomId"` Endpoint string `json:"endpoint" yaml:"endpoint"` Bucket string `json:"bucket" yaml:"bucket"` Secret string `json:"secret" yaml:"secret"` UseSSL bool `json:"useSSL" yaml:"useSSL"` Location string `json:"location" yaml:"location"` }
type MatrixExchange ¶
type MatrixExchange struct {
// contains filtered or unexported fields
}
func (*MatrixExchange) Config ¶
func (exchange *MatrixExchange) Config(withPrivateKeys bool) interface{}
func (*MatrixExchange) Connect ¶
func (exchange *MatrixExchange) Connect(remoteRoot string, _ chan Exchange) error
func (*MatrixExchange) Delete ¶
func (exchange *MatrixExchange) Delete(pattern string, before time.Time) error
func (*MatrixExchange) Disconnect ¶
func (exchange *MatrixExchange) Disconnect()
func (*MatrixExchange) ID ¶
func (exchange *MatrixExchange) ID() string
func (*MatrixExchange) Name ¶
func (exchange *MatrixExchange) Name() string
func (*MatrixExchange) Pull ¶
func (exchange *MatrixExchange) Pull(loc string, file string) (int64, error)
func (*MatrixExchange) String ¶
func (exchange *MatrixExchange) String() string
type S3Config ¶
type S3Config struct { Name string `json:"name" yaml:"name"` Endpoint string `json:"endpoint" yaml:"endpoint"` Bucket string `json:"bucket" yaml:"bucket"` AccessKey string `json:"accessKey" yaml:"accessKey"` Secret string `json:"secret" yaml:"secret"` UseSSL bool `json:"useSSL" yaml:"useSSL"` Location string `json:"location" yaml:"location"` }
type S3Exchange ¶
type S3Exchange struct {
// contains filtered or unexported fields
}
func (*S3Exchange) Config ¶
func (exchange *S3Exchange) Config(withPrivateKeys bool) interface{}
func (*S3Exchange) Connect ¶
func (exchange *S3Exchange) Connect(remoteRoot string, _ chan Exchange) error
func (*S3Exchange) Delete ¶
func (exchange *S3Exchange) Delete(pattern string, before time.Time) error
func (*S3Exchange) Disconnect ¶
func (exchange *S3Exchange) Disconnect()
func (*S3Exchange) ID ¶
func (exchange *S3Exchange) ID() string
func (*S3Exchange) Name ¶
func (exchange *S3Exchange) Name() string
func (*S3Exchange) String ¶
func (exchange *S3Exchange) String() string
type USBExchange ¶
type USBExchange struct {
// contains filtered or unexported fields
}
func (*USBExchange) Connect ¶
func (exchange *USBExchange) Connect(remoteRoot string, onUpdate chan Exchange) error
func (*USBExchange) Disconnect ¶
func (exchange *USBExchange) Disconnect()
func (*USBExchange) ID ¶
func (exchange *USBExchange) ID() string
func (*USBExchange) Name ¶
func (exchange *USBExchange) Name() string
func (*USBExchange) String ¶
func (exchange *USBExchange) String() string
type WebDAVConfig ¶
type WebDAVExchange ¶
type WebDAVExchange struct { UUID string // contains filtered or unexported fields }
func (*WebDAVExchange) Config ¶
func (exchange *WebDAVExchange) Config(withPrivateKeys bool) interface{}
func (*WebDAVExchange) Connect ¶
func (exchange *WebDAVExchange) Connect(remoteRoot string, _ chan Exchange) error
func (*WebDAVExchange) Delete ¶
func (exchange *WebDAVExchange) Delete(pattern string, before time.Time) error
func (*WebDAVExchange) Disconnect ¶
func (exchange *WebDAVExchange) Disconnect()
func (*WebDAVExchange) ID ¶
func (exchange *WebDAVExchange) ID() string
func (*WebDAVExchange) Name ¶
func (exchange *WebDAVExchange) Name() string
func (*WebDAVExchange) String ¶
func (exchange *WebDAVExchange) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.