archive

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//EventCompleted indicates that an archive has been completed. Data is a CompletedEvent
	EventCompleted  = "archive.completed"
	StatePending    = "pending"
	StateProcessing = "processing"
	StateComplete   = "complete"
	StateFailed     = "failed"
	TypeZip         = "zip"
)

Functions

func Abort

func Abort(ctx context.Context, a *Archive) error

func AddEntries

func AddEntries(ctx context.Context, a *Archive, entries []Entry) error

func Complete

func Complete(ctx context.Context, a *Archive) error

func Configure

func Configure()

func Create

func Create(ctx context.Context, cmd CreateCommand) (string, error)

func Exists

func Exists(ctx context.Context, bucket, key, id string) (bool, error)

Types

type Archive

type Archive struct {
	ID     string
	Bucket string
	Key    string
	Type   string
	State  string
}

func FindOne

func FindOne(ctx context.Context, bucket, key, id string) (*Archive, error)

type CompleteResult

type CompleteResult struct {
	Bucket string
	Key    string
	ETag   string
}

type CompletedEvent

type CompletedEvent struct {
	Bucket    string
	Key       string
	ArchiveId string
}

type CreateCommand

type CreateCommand struct {
	Bucket string
	Key    string
	Type   string
}

type Entry

type Entry struct {
	Key  string `json:"key"`
	Name string `json:"name"`
}

type Stats

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

func NewStats

func NewStats() *Stats

func (*Stats) AddBytes

func (s *Stats) AddBytes(n int64)

func (*Stats) AddFiles

func (s *Stats) AddFiles(n int64)

func (*Stats) Summary

func (s *Stats) Summary() string

Jump to

Keyboard shortcuts

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