Documentation ¶
Overview ¶
Package manifest implements support for managing JSON-based manifests in repository.
Index ¶
- Variables
- type EntryMetadata
- type ID
- type Manager
- func (m *Manager) Compact(ctx context.Context) error
- func (m *Manager) Delete(ctx context.Context, id ID) error
- func (m *Manager) Find(ctx context.Context, labels map[string]string) ([]*EntryMetadata, error)
- func (m *Manager) Flush(ctx context.Context) error
- func (m *Manager) Get(ctx context.Context, id ID, data interface{}) error
- func (m *Manager) GetMetadata(ctx context.Context, id ID) (*EntryMetadata, error)
- func (m *Manager) GetRaw(ctx context.Context, id ID) ([]byte, error)
- func (m *Manager) Put(ctx context.Context, labels map[string]string, payload interface{}) (ID, error)
- func (m *Manager) Refresh(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when the metadata item is not found.
Functions ¶
This section is empty.
Types ¶
type EntryMetadata ¶
EntryMetadata contains metadata about manifest item. Each manifest item has one or more labels Including required "type" label.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager organizes JSON manifests of various kinds, including snapshot manifests
func NewManager ¶
NewManager returns new manifest manager for the provided content manager.
func (*Manager) Find ¶
Find returns the list of EntryMetadata for manifest entries matching all provided labels.
func (*Manager) Get ¶
Get retrieves the contents of the provided manifest item by deserializing it as JSON to provided object. If the manifest is not found, returns ErrNotFound.
func (*Manager) GetMetadata ¶
GetMetadata returns metadata about provided manifest item or ErrNotFound if the item can't be found.
func (*Manager) GetRaw ¶
GetRaw returns raw contents of the provided manifest (JSON bytes) or ErrNotFound if not found.