Versions in this module Expand all Collapse all v1 v1.6.1 Jul 9, 2019 Changes in this version + func DirWithInternalSeparator(filePath string) string + func IsIgnoredFile(path string) (ignored bool) + func NodeRequiresChecksum(node *tree.Node) bool + func PerformTests(basePath string, externalPath string, testInfo chan string, ...) + type DataSyncSource interface + GetReaderOn func(path string) (out io.ReadCloser, err error) + func AsDataSyncSource(endpoint Endpoint) (DataSyncSource, bool) + type DataSyncTarget interface + GetWriterOn func(path string, targetSize int64) (out io.WriteCloser, err error) + func AsDataSyncTarget(endpoint Endpoint) (DataSyncTarget, bool) + type Endpoint interface + GetEndpointInfo func() EndpointInfo + LoadNode func(ctx context.Context, path string, leaf ...bool) (node *tree.Node, err error) + type EndpointInfo struct + RequiresFoldersRescan bool + RequiresNormalization bool + type EventInfo struct + Etag string + Folder bool + Host string + Metadata map[string]string + OperationId string + Path string + PathSyncSource PathSyncSource + Port string + ScanEvent bool + ScanSourceNode *tree.Node + Size int64 + Time string + Type EventType + UserAgent string + func NodeToEventInfo(ctx context.Context, path string, node *tree.Node, eventType EventType) (eventInfo EventInfo) + func (e EventInfo) CreateContext(ctx context.Context) context.Context + type EventType string + const DefaultEtag + const EventAccessed + const EventAccessedRead + const EventAccessedStat + const EventCreate + const EventOther + const EventRemove + const EventRename + const InternalPathSeparator + type PathSyncSource interface + ComputeChecksum func(node *tree.Node) error + Walk func(walknFc WalkNodesFunc, pathes ...string) (err error) + Watch func(recursivePath string) (*WatchObject, error) + func AsPathSyncSource(endpoint Endpoint) (PathSyncSource, bool) + type PathSyncTarget interface + CreateNode func(ctx context.Context, node *tree.Node, updateIfExists bool) (err error) + DeleteNode func(ctx context.Context, path string) (err error) + MoveNode func(ctx context.Context, oldPath string, newPath string) (err error) + UpdateNode func(ctx context.Context, node *tree.Node) (err error) + func AsPathSyncTarget(endpoint Endpoint) (PathSyncTarget, bool) + type ProcessorEvent struct + Data interface{} + Type string + type SessionProvider interface + FinishSession func(ctx context.Context, sessionUuid string) error + FlushSession func(ctx context.Context, sessionUuid string) error + StartSession func(ctx context.Context, rootNode *tree.Node) (*tree.IndexationSession, error) + func AsSessionProvider(endpoint Endpoint) (SessionProvider, bool) + type UuidProvider interface + LoadNodeByUuid func(ctx context.Context, uuid string) (node *tree.Node, err error) + type UuidReceiver interface + UpdateNodeUuid func(ctx context.Context, node *tree.Node) (*tree.Node, error) + type Versioner interface + Commit func(node *tree.Node) + ListVersions func(node *tree.Node) (versions map[int]string, lastVersion int) + func AsVersioner(endpoint Endpoint) (Versioner, bool) + type WalkNodesFunc func(path string, node *tree.Node, err error) + type WatchObject struct + DoneChan chan bool + ErrorChan chan error + EventInfoChan chan EventInfo + func (w *WatchObject) Close() + func (w *WatchObject) Errors() chan error + func (w *WatchObject) Events() chan EventInfo + func (w WatchObject) Done() <-chan bool + func (w WatchObject) NextError() error + func (w WatchObject) NextEvent() EventInfo