Documentation
¶
Index ¶
- Variables
- func FlatMap[T any](lists ...[]T) (res []T)
- func GetExcludeList(excluded ...[]string) (tmp []string)
- func InitialiseFileTree(file_tree_path string)
- func NilError(err error) bool
- func ReadDir(ctx ftp_context.Context, dir_data initialiseclient.DirConfig) (err error)
- func UpdateFileTree(ctx ftp_context.Context, lock_file_p string, file_tree_path string)
- func WriteFileTree(ctx ftp_context.Context, lock_file_p string, file_tree_path string) (err error)
- type FileState
- type FileTreeJson
- type ReadDirResult
- type TempFileData
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientConfig = initialiseclient.ClientConfig
View Source
var FileTree = NewFileTreeJson()
View Source
var Logger = logging.Logger
Functions ¶
func GetExcludeList ¶
func InitialiseFileTree ¶ added in v1.1.2
func InitialiseFileTree(file_tree_path string)
func ReadDir ¶
func ReadDir(ctx ftp_context.Context, dir_data initialiseclient.DirConfig) (err error)
func UpdateFileTree ¶ added in v1.1.4
func UpdateFileTree(ctx ftp_context.Context, lock_file_p string, file_tree_path string)
func WriteFileTree ¶
func WriteFileTree(ctx ftp_context.Context, lock_file_p string, file_tree_path string) (err error)
Types ¶
type FileState ¶
type FileState string
const ( FileStateHashed FileState = "hashed" FileStateToHash FileState = "to-hash" FileStateUploaded FileState = "uploaded" FileStateToUpload FileState = "to-upload" FileStateDownloaded FileState = "downloaded" FileStateToDownload FileState = "to-download" FileStateDeleted FileState = "deleted" FileStateToDelete FileState = "to-delete" FileStateToPull FileState = "to-pull" FileStateToPush FileState = "to-push" )
type FileTreeJson ¶
type FileTreeJson struct { Extensions map[string]bool // uses file_path as key on client | uses file_hash as key on server FileMap ftp_base.MutexedMap[*filehandler.FileHash] `json:"files"` // uses file_path as key on client | uses file_hash as key on server FileState ftp_base.MutexedMap[FileState] `json:"file_state"` // contains filtered or unexported fields }
func NewFileTreeJson ¶
func NewFileTreeJson() *FileTreeJson
func (*FileTreeJson) AddExtension ¶ added in v1.1.7
func (ft *FileTreeJson) AddExtension(e string)
func (*FileTreeJson) Lock ¶
func (ft *FileTreeJson) Lock()
func (*FileTreeJson) RLock ¶
func (ft *FileTreeJson) RLock()
func (*FileTreeJson) RUnlock ¶
func (ft *FileTreeJson) RUnlock()
func (*FileTreeJson) Unlock ¶
func (ft *FileTreeJson) Unlock()
type ReadDirResult ¶
type ReadDirResult struct { FilesList []*filehandler.FileBasic ToRehash []string ToUpload []string }
type TempFileData ¶ added in v1.2.0
type TempFileData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.