mirror of
https://github.com/kopia/kopia.git
synced 2026-03-13 03:36:34 -04:00
* cli: added a flag to create repository with v2 index features * content: plumb through compression.ID parameter to content.Manager.WriteContent() * content: expose content.Manager.SupportsContentCompression This allows object manager to decide whether to create compressed object or let the content manager do it. * object: if compression is requested and the repo supports it, pass compression ID to the content manager * cli: show compression status in 'repository status' * cli: output compression information in 'content list' and 'content stats' * content: compression and decompression support * content: unit tests for compression * object: compression tests * testing: added integration tests against v2 index * testing: run all e2e tests with and without content-level compression * htmlui: added UI for specifying index format on creation * cli: additional tests for 'content ls' and 'content stats' * applied pr suggestions
17 lines
548 B
Go
17 lines
548 B
Go
package content
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// Reader defines content read API.
|
|
type Reader interface {
|
|
SupportsContentCompression() bool
|
|
ContentFormat() FormattingOptions
|
|
GetContent(ctx context.Context, id ID) ([]byte, error)
|
|
ContentInfo(ctx context.Context, id ID) (Info, error)
|
|
IterateContents(ctx context.Context, opts IterateOptions, callback IterateCallback) error
|
|
IteratePacks(ctx context.Context, opts IteratePackOptions, callback IteratePacksCallback) error
|
|
ListActiveSessions(ctx context.Context) (map[SessionID]*SessionInfo, error)
|
|
}
|