func WithDescriptor(desc ocispec.Descriptor) WriterOpt {
	return func(opts *WriterOpts) error {
		opts.Desc = desc
		return nil
	}
}
WithDescriptor specifies an OCI descriptor.
Writer may optionally use the descriptor internally for resolving
the location of the actual data.
Write does not require any field of desc to be set.
If the data size is unknown, desc.Size should be set to 0.
Some implementations may also accept negative values as "unknown".
package content
import (
	"context"
	"io"
	"time"
	"github.com/opencontainers/go-digest"
	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
type ReaderAt interface {
	io.ReaderAt
	io.Closer
	Size() int64
}
type Provider interface {
	ReaderAt(ctx context.Context, desc ocispec.Descriptor) (ReaderAt, error)
}
type Ingester interface {
	Writer(ctx context.Context, opts ...WriterOpt) (Writer, error)
}
type Info struct {
	Digest    digest.Digest
	Size      int64
	CreatedAt time.Time
	UpdatedAt time.Time
	Labels    map[string]string
}
type Status struct {
	Ref       string
	Offset    int64
	Total     int64
	Expected  digest.Digest
	StartedAt time.Time
	UpdatedAt time.Time
}
type WalkFunc func(Info) error
type Manager interface {
	Info(ctx context.Context, dgst digest.Digest) (Info, error)
	Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error)
	Walk(ctx context.Context, fn WalkFunc, filters ...string) error
	Delete(ctx context.Context, dgst digest.Digest) error
}
type IngestManager interface {
	Status(ctx context.Context, ref string) (Status, error)
	ListStatuses(ctx context.Context, filters ...string) ([]Status, error)
	Abort(ctx context.Context, ref string) error
}
type Writer interface {
	io.WriteCloser
	Digest() digest.Digest
	Commit(ctx context.Context, size int64, expected digest.Digest, opts ...Opt) error
	Status() (Status, error)
	Truncate(size int64) error
}
type Store interface {
	Manager
	Provider
	IngestManager
	Ingester
}
type Opt func(*Info) error
func WithLabels(labels map[string]string) Opt {
	return func(info *Info) error {
		info.Labels = labels
		return nil
	}
}
type WriterOpts struct {
	Ref  string
	Desc ocispec.Descriptor
}
type WriterOpt func(*WriterOpts) error