Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultPrefix is the fixed remote namespace produced by media archival.
DefaultPrefix = "media/"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InventoryObject ¶ added in v0.7.0
type InventoryPage ¶ added in v0.7.0
type InventoryPage struct {
Objects []InventoryObject
NextToken string
Complete bool
}
type ObjectMetadata ¶ added in v0.7.0
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
ConnectTimeout time.Duration
TLSHandshakeTimeout time.Duration
ResponseHeaderTimeout time.Duration
Uploader Uploader
Logger *slog.Logger
}
type S3Inspector ¶ added in v0.7.0
type S3Inspector struct {
// contains filtered or unexported fields
}
func NewS3Inspector ¶ added in v0.7.0
func NewS3Inspector(opts Options) (*S3Inspector, error)
func (*S3Inspector) HeadObject ¶ added in v0.7.0
func (i *S3Inspector) HeadObject(ctx context.Context, key string) (ObjectMetadata, error)
type S3Inventory ¶ added in v0.7.0
type S3Inventory struct {
// contains filtered or unexported fields
}
S3Inventory is a list-only deep-audit capability. It cannot get, put, or delete object data.
func NewS3Inventory ¶ added in v0.7.0
func NewS3Inventory(opts Options) (*S3Inventory, error)
func (*S3Inventory) ListPage ¶ added in v0.7.0
func (i *S3Inventory) ListPage(ctx context.Context, prefix, token string, maxKeys int) (InventoryPage, error)
type S3Uploader ¶
type S3Uploader struct {
// contains filtered or unexported fields
}
func NewS3Uploader ¶
func NewS3Uploader(opts Options) (*S3Uploader, error)
func (*S3Uploader) Upload ¶
func (u *S3Uploader) Upload(ctx context.Context, cfg config.Config, asset model.MediaAsset, opts Options) (model.MediaArchiveResult, bool, error)
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"`
}
Click to show internal directories.
Click to hide internal directories.