redisutils

package
v0.0.0-...-f8e935a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 Download

type Download struct {
	ID    int64
	Name  string
	State string
}

type RedisClient

type RedisClient struct {
	Client *redis.Client
}

func NewAuthenticatedRedisClient

func NewAuthenticatedRedisClient(ctx context.Context) (*RedisClient, error)

func (*RedisClient) DownloadExists

func (r *RedisClient) DownloadExists(ctx context.Context, id int64) (bool, error)

func (*RedisClient) GetDownloadName

func (r *RedisClient) GetDownloadName(ctx context.Context, id int64) (string, error)

func (*RedisClient) GetDownloadState

func (r *RedisClient) GetDownloadState(ctx context.Context, state string) ([]int64, error)

func (*RedisClient) RegisterDownloadState

func (r *RedisClient) RegisterDownloadState(ctx context.Context, d Download) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL