Documentation
¶
Index ¶
- Constants
- func NewClient(pool *pgxpool.Pool, exec Executor, cfg config.QueueConfig, ...) (*river.Client[pgx.Tx], error)
- type CleanOldEventsArgs
- type CleanPendingFilesArgs
- type CleanStaleUploadsArgs
- type Executor
- type JobItem
- type RefreshFolderSizesArgs
- type SyncFilters
- type SyncOptions
- type SyncRunJobArgs
- type SyncTransferJobArgs
Constants ¶
View Source
const ( JobKindFilesCopy = "files.copy" JobKindFilesMove = "files.move" JobKindFilesDelete = "files.delete" JobKindSyncRun = "sync.run" JobKindSyncTransfer = "sync.transfer" JobKindCleanOldEvents = "clean.old_events" JobKindCleanStaleUpload = "clean.stale_uploads" JobKindCleanPendingFile = "clean.pending_files" JobKindRefreshFolderSize = "refresh.folder_sizes" )
View Source
const QueueUploads = "uploads"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CleanOldEventsArgs ¶
func (CleanOldEventsArgs) Kind ¶
func (CleanOldEventsArgs) Kind() string
type CleanPendingFilesArgs ¶
type CleanPendingFilesArgs struct {
UserID int64 `json:"userId"`
}
func (CleanPendingFilesArgs) Kind ¶
func (CleanPendingFilesArgs) Kind() string
type CleanStaleUploadsArgs ¶
type CleanStaleUploadsArgs struct {
UserID int64 `json:"userId"`
Retention string `json:"retention"`
}
func (CleanStaleUploadsArgs) Kind ¶
func (CleanStaleUploadsArgs) Kind() string
type Executor ¶
type Executor interface {
SyncRun(ctx context.Context, args SyncRunJobArgs, jobID int64) error
SyncTransfer(ctx context.Context, args SyncTransferJobArgs, jobID int64) error
CleanOldEventsForUser(ctx context.Context, args CleanOldEventsArgs) error
CleanStaleUploadsForUser(ctx context.Context, args CleanStaleUploadsArgs) error
CleanPendingFilesForUser(ctx context.Context, userID int64) error
RefreshFolderSizesForUser(ctx context.Context, userID int64) error
}
type RefreshFolderSizesArgs ¶
type RefreshFolderSizesArgs struct {
UserID int64 `json:"userId"`
}
func (RefreshFolderSizesArgs) Kind ¶
func (RefreshFolderSizesArgs) Kind() string
type SyncFilters ¶
type SyncOptions ¶
type SyncRunJobArgs ¶
type SyncRunJobArgs struct {
UserID int64 `json:"userId" river:"unique"`
RunID string `json:"runId,omitempty"`
Source string `json:"source"`
DestinationDir string `json:"destinationDir"`
Headers map[string]string `json:"headers,omitempty"`
Proxy string `json:"proxy,omitempty"`
Filters SyncFilters `json:"filters,omitempty"`
Options SyncOptions `json:"options,omitempty"`
PollInterval int `json:"pollInterval,omitempty"`
}
func (SyncRunJobArgs) Kind ¶
func (SyncRunJobArgs) Kind() string
type SyncTransferJobArgs ¶
type SyncTransferJobArgs struct {
UserID int64 `json:"userId" river:"unique"`
RunID string `json:"runId"`
Source string `json:"source"`
SourcePath string `json:"sourcePath,omitempty"`
DestinationPath string `json:"destinationPath,omitempty"`
Name string `json:"name"`
Size int64 `json:"size,omitempty"`
MimeType string `json:"mimeType,omitempty"`
Hash string `json:"hash,omitempty"`
ModifiedAtUnixNano int64 `json:"modifiedAtUnixNano,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Proxy string `json:"proxy,omitempty"`
PartSize int64 `json:"partSize,omitempty"`
Encrypted bool `json:"encrypted,omitempty"`
}
func (SyncTransferJobArgs) Kind ¶
func (SyncTransferJobArgs) Kind() string
Click to show internal directories.
Click to hide internal directories.