storage

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropboxUploader

type DropboxUploader struct {
	// contains filtered or unexported fields
}

DropboxUploader uploads files to Dropbox.

func NewDropboxUploader

func NewDropboxUploader(cfg config.DropboxConfig) (*DropboxUploader, error)

NewDropboxUploader loads tokens from disk and returns a ready uploader.

func (*DropboxUploader) Upload

func (d *DropboxUploader) Upload(ctx context.Context, localPath string, remoteName string) error

Upload uploads a local file to Dropbox, retrying once on 401 after refreshing the token.

type Uploader

type Uploader interface {
	Upload(ctx context.Context, localPath string, remoteName string) error
}

Uploader uploads a local file to remote storage.

func NewUploader

func NewUploader(cfg config.StorageConfig) (Uploader, error)

NewUploader creates an Uploader from the given storage config.

Jump to

Keyboard shortcuts

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