Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
// Name returns the name of the action
Name() string
// Init initializes the action with configuration
Init(cfg interface{}) error
// SetBasePath sets the base path for the action
SetBasePath(path string)
// Execute performs the action on a file change event
Execute(event fsnotify.Event) error
// Close performs any cleanup needed
Close() error
}
Action interface defines methods that all sync actions must implement
type FTPAction ¶
type FTPAction struct {
// contains filtered or unexported fields
}
FTPAction implements the Action interface for FTP uploads
func (*FTPAction) SetBasePath ¶
SetBasePath sets the base path for the action
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles multiple actions
func NewManager ¶
func NewManager(basePath string, filters config.FileFilters, verbose bool) *Manager
NewManager creates a new action manager
func (*Manager) HandleEvent ¶
HandleEvent processes a file event with all actions
type RsyncAction ¶
type RsyncAction struct {
// contains filtered or unexported fields
}
RsyncAction implements the Action interface for Rsync uploads
func (*RsyncAction) Close ¶
func (a *RsyncAction) Close() error
Close performs cleanup for the Rsync action
func (*RsyncAction) Execute ¶
func (a *RsyncAction) Execute(event fsnotify.Event) error
Execute performs the Rsync upload for a file change event
func (*RsyncAction) Init ¶
func (a *RsyncAction) Init(cfg interface{}) error
Init initializes the Rsync action with configuration
func (*RsyncAction) SetBasePath ¶
func (a *RsyncAction) SetBasePath(path string)
SetBasePath sets the base path for the action
type SFTPAction ¶
type SFTPAction struct {
// contains filtered or unexported fields
}
SFTPAction implements the Action interface for SFTP uploads
func (*SFTPAction) Execute ¶
func (a *SFTPAction) Execute(event fsnotify.Event) error
Execute performs the SFTP upload for a file change event
func (*SFTPAction) Init ¶
func (a *SFTPAction) Init(cfg interface{}) error
Init initializes the SFTP action with configuration
func (*SFTPAction) SetBasePath ¶
func (a *SFTPAction) SetBasePath(path string)
SetBasePath sets the base path for the action