Documentation
¶
Index ¶
- Constants
- type Download
- type RedisClient
- func (r *RedisClient) DownloadExists(ctx context.Context, id int64) (bool, error)
- func (r *RedisClient) GetDownloadName(ctx context.Context, id int64) (string, error)
- func (r *RedisClient) GetDownloadState(ctx context.Context, state string) ([]int64, error)
- func (r *RedisClient) RegisterDownloadState(ctx context.Context, d Download) error
Constants ¶
View Source
const ( Downloaded = "downloaded" Compressing = "compressing" Compressed = "compressed" Uploading = "uploading" Uploaded = "uploaded" Removing = "removing" Removed = "removed" Failed = "failed" NameKey = "name" StateKey = "state" CompletedDownloadsPath = "/downloads/complete" UploadsReadyPath = "/downloads/uploads" DownloadsHash = "downloads" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient struct {
Client *redis.Client
}
func NewAuthenticatedRedisClient ¶
func NewAuthenticatedRedisClient(ctx context.Context) (*RedisClient, error)
func (*RedisClient) DownloadExists ¶
func (*RedisClient) GetDownloadName ¶
func (*RedisClient) GetDownloadState ¶
func (*RedisClient) RegisterDownloadState ¶
func (r *RedisClient) RegisterDownloadState(ctx context.Context, d Download) error
Click to show internal directories.
Click to hide internal directories.