Versions in this module Expand all Collapse all v0 v0.0.1 Jun 15, 2023 Changes in this version + var ErrAttBucketNotFound = errors.Errorf("bucket '%s' not found", additionalDataBucket) + var ErrInvalidAddressFormat = errors.New("invalid address format") + var ErrServerInfoNotSet = errors.New("server info not set") + type AttributesMap interface + Delete func(key string) error + Exists func(key string) bool + GetSlice func() ([]any, error) + Load func(key string) (any, bool) + StoreOrUpdate func(key string, data any) error + type FileMetadata struct + BytesTransferred int + ErrorMsg string + SourcePath string + Status TransferStatus + TargetPath string + TimeEnd time.Time + TimeStart time.Time + type FileMetadataMap interface + Delete func(sourcePath string) error + GetSlice func() ([]FileMetadata, error) + Load func(sourcePath string) (FileMetadata, bool) + Operate func(op Transfer) ([]FileMetadata, error) + SetError func(sourcePath string, err error) error + SetSuccess func(sourcePath string, bytesTransferred int) error + Start func(sourcePath string) error + StoreOrUpdate func(metadata FileMetadata) error + UpdateStatus func(sourcePath string, status TransferStatus, bytesTransferred int, err error) error + type ServerInfo struct + Address string + Port int + User string + func CreateServerInfo(address string, port int, user string) (*ServerInfo, error) + type Transfer func(sourcePath string, targetPath string) (int, error) + type TransferManager struct + Attributes AttributesMap + Files FileMetadataMap + func NewTransferManager() (*TransferManager, error) + func (tm *TransferManager) Close() error + func (tm *TransferManager) Finish() error + func (tm *TransferManager) GetServerInfo() (*ServerInfo, error) + func (tm *TransferManager) IsPreexisting() bool + func (tm *TransferManager) StoreOrUpdateServerInfo(info *ServerInfo) error + type TransferStatus uint8 + const StatusCompleted + const StatusFailed + const StatusInProgress + const StatusNotStarted + func (i TransferStatus) String() string