mediaarchive

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3Client

func NewS3Client(opts Options) (*s3.Client, error)

Types

type Options

type Options struct {
	Limit         int
	Force         bool
	Upload        bool
	PruneLocal    bool
	Provider      string
	Bucket        string
	PublicBaseURL string
	Endpoint      string
	Region        string
	AccessKeyID   string
	SecretKey     string
	SessionToken  string
	PathStyle     bool
	Uploader      Uploader
	Logger        *slog.Logger
}

type S3Uploader

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

func NewS3Uploader

func NewS3Uploader(opts Options) (*S3Uploader, error)

func (*S3Uploader) Upload

type Stats

type Stats struct {
	Candidates       int   `json:"candidates"`
	Uploaded         int   `json:"uploaded"`
	Archived         int   `json:"archived"`
	Unchanged        int   `json:"unchanged"`
	PruneSkipped     int   `json:"prune_skipped"`
	LocalFilesPruned int   `json:"local_files_pruned"`
	LocalRowsPruned  int64 `json:"local_rows_pruned"`
	Errors           int   `json:"errors"`
}

func Run

func Run(ctx context.Context, cfg config.Config, st *store.Store, opts Options) (Stats, error)

type Uploader

type Uploader interface {
	Upload(ctx context.Context, cfg config.Config, asset model.MediaAsset, opts Options) (model.MediaArchiveResult, bool, error)
}

Jump to

Keyboard shortcuts

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