media

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxBytes int64 = 100 << 20
)

Variables

This section is empty.

Functions

func LocalPath

func LocalPath(cacheDir, mediaPath string) (string, error)

func RepoPath

func RepoPath(repoPath, mediaPath string) (string, error)

Types

type FetchOptions

type FetchOptions struct {
	CacheDir     string
	List         store.AttachmentListOptions
	MaxBytes     int64
	Force        bool
	HTTPClient   *http.Client
	Now          func() time.Time
	StatusUpdate bool
}

type FetchStats

type FetchStats struct {
	Attachments int   `json:"attachments"`
	Fetched     int   `json:"fetched"`
	Reused      int   `json:"reused"`
	Skipped     int   `json:"skipped"`
	Failed      int   `json:"failed"`
	Bytes       int64 `json:"bytes"`
}

func Fetch

func Fetch(ctx context.Context, s *store.Store, opts FetchOptions) (FetchStats, error)

Jump to

Keyboard shortcuts

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