s3

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled(cfg appconfig.S3Config) bool

Enabled reports whether offsite upload is configured.

Types

type Uploader

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

Uploader uploads backup archives to S3-compatible storage (MINE-138).

func NewUploader

func NewUploader(cfg appconfig.S3Config) (*Uploader, error)

NewUploader builds an uploader from config. Returns an error when the config is incomplete so callers fail fast at startup, not mid-backup.

func (*Uploader) Delete

func (u *Uploader) Delete(ctx context.Context, key string) error

Delete removes an object key from the configured S3 bucket.

func (*Uploader) Download

func (u *Uploader) Download(ctx context.Context, key, localPath string) error

Download fetches an object key to a local path.

func (*Uploader) Key

func (u *Uploader) Key(serverID, filename string) string

Key returns the object key for a backup archive.

func (*Uploader) Upload

func (u *Uploader) Upload(ctx context.Context, serverID, localPath string) (string, error)

Upload streams a local archive via multipart upload. Returns object key.

Jump to

Keyboard shortcuts

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