Documentation ¶
Index ¶
Constants ¶
const ( FileCreated = iota FileChanged FileDeleted TagsChanged )
event's types
const (
// Version need a comment?
Version = "1.2.5"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool bool
Bool is an alias for the standard boolean type with Unmarshal/Marshal functions
func (Bool) MarshalJSON ¶
MarshalJSON allows the conversion from bool to string
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON allows to unmarshal from string to bool
type DropboxObject ¶
DropboxObject is the object that contains the info of the file
type DropboxWatcher ¶
type DropboxWatcher struct { WatcherBase // contains filtered or unexported fields }
DropboxWatcher is the specialized watcher for Dropbox service
func (*DropboxWatcher) SetConfig ¶
func (w *DropboxWatcher) SetConfig(m map[string]string) error
SetConfig is used to configure the DropboxWatcher
func (*DropboxWatcher) Start ¶
func (w *DropboxWatcher) Start() error
Start launches the polling process
type Event ¶
type Event struct { Key string // Path of file Type Op // File operation Object interface{} // Object pointer }
Event is the struct that contains the info about the changed file
func (*Event) TypeString ¶
TypeString returns a text version of the event's type
type GDriveObject ¶
GDriveObject is the object that contains the info of the file
type GDriveWatcher ¶
type GDriveWatcher struct { WatcherBase // contains filtered or unexported fields }
GDriveWatcher is the specialized watcher for Google Drive service
func (*GDriveWatcher) SetConfig ¶
func (w *GDriveWatcher) SetConfig(m map[string]string) error
SetConfig is used to configure the GDriveWatcher
func (*GDriveWatcher) Start ¶
func (w *GDriveWatcher) Start() error
Start launches the polling process
type GitCommit ¶ added in v1.1.0
type GitCommit struct { Hash string Message string Branch string AuthorName string AuthorEmail string Time time.Time }
GitCommit is the object that contains the info about the commit
type GitObject ¶ added in v1.1.0
type GitObject struct { Key string Size int64 FileMode os.FileMode Hash string Commits []*GitCommit }
GitObject is the object that contains the info of the file
type GitWatcher ¶ added in v1.1.0
type GitWatcher struct { WatcherBase // contains filtered or unexported fields }
GitWatcher is the specialized watcher for Git service
func (*GitWatcher) Close ¶ added in v1.1.0
func (w *GitWatcher) Close()
Close stop the polling process
func (*GitWatcher) SetConfig ¶ added in v1.1.0
func (w *GitWatcher) SetConfig(m map[string]string) error
SetConfig is used to configure the GitWatcher
func (*GitWatcher) Start ¶ added in v1.1.0
func (w *GitWatcher) Start() error
Start launches the polling process
type IMinio ¶
type IMinio interface { BucketExists(ctx context.Context, bucketName string) (bool, error) GetObjectTagging(ctx context.Context, bucketName, objectName string, opts minio.GetObjectTaggingOptions) (*tags.Tags, error) ListObjects(ctx context.Context, bucketName string, opts minio.ListObjectsOptions) <-chan minio.ObjectInfo }
IMinio is an interface I used only for gomock
type LocalObject ¶
LocalObject is the object that contains the info of the file
type LocalWatcher ¶
type LocalWatcher struct { WatcherBase // contains filtered or unexported fields }
LocalWatcher is the specialized watcher for the local FS
func (*LocalWatcher) SetConfig ¶
func (w *LocalWatcher) SetConfig(m map[string]string) error
SetConfig is used to configure the LocalWatcher
func (*LocalWatcher) Start ¶
func (w *LocalWatcher) Start() error
Start launches the polling process
type S3Object ¶
type S3Object struct { Key string Etag string Size int64 Tags map[string]string LastModified time.Time }
S3Object is the object that contains the info of the file
type S3Watcher ¶
type S3Watcher struct { WatcherBase // contains filtered or unexported fields }
S3Watcher is the specialized watcher for Amazon S3 service
type Watcher ¶
type Watcher interface { Start() error SetConfig(c map[string]string) error Close() GetEvents() chan Event GetErrors() chan error }
Watcher has to be implemented by all the watchers
type WatcherBase ¶
type WatcherBase struct { Events chan Event Errors chan error // contains filtered or unexported fields }
WatcherBase is the struct included in all the specialized watchers
func (*WatcherBase) GetErrors ¶
func (w *WatcherBase) GetErrors() chan error
GetErrors returns a chan of error
func (*WatcherBase) GetEvents ¶
func (w *WatcherBase) GetEvents() chan Event
GetEvents returns a chan of Event