Versions in this module Expand all Collapse all v0 v0.0.1 Jun 16, 2022 Changes in this version + const KeyExcelFolder + var ErrorShouldRetry = errors.New("process failed but should retry") + var FileWatcheSettingKey = "files" + func FileExisted(file string) bool + func NewWatchExcelFolder(p FileWatcherParams) ginshared.DiController + type FileAction interface + HandleFile func(file string) error + type FileIdempotent struct + FileKey string + FileName string + type FileIdempotentService struct + DB *gorm.DB + Key string + Logger *zap.Logger + func (fs *FileIdempotentService) Idempotent(file string) (bool, error) + type FileWatcherParams struct + Action FileAction + Ctx context.Context + Idempotent *FileIdempotentService + Logger *zap.Logger + type FilelWatcher struct + Action FileAction + Delete bool + DoneFolder string + ErrorFolder string + Excluded []string + Idempotent *FileIdempotentService + Included []string + Interval time.Duration + Logger *zap.Logger + Path string + Recursive bool + RetryAttempts uint + RetryDelay time.Duration + ShouldRetry retry.RetryIfFunc + func (e *FilelWatcher) Filter(file string) bool + func (e *FilelWatcher) ScheduleWalk(ctx context.Context) + func (e *FilelWatcher) StartService(ctx context.Context) + func (e *FilelWatcher) StartWatcher(ctx context.Context) error + func (e *FilelWatcher) Walk()