oras

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound          = errors.New("not_found")
	ErrResolverUndefined = errors.New("resolver_undefined")
	ErrEmptyContents     = errors.New("empty_contents")
)

Common errors

Functions

func Pull

func Pull(ctx context.Context, resolver remotes.Resolver, ref string) (map[string][]byte, error)

Pull pull files from the remote

func Push

func Push(ctx context.Context, resolver remotes.Resolver, ref string, contents map[string][]byte) error

Push pushes files to the remote

Types

type MemoryStore

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

MemoryStore stores contents in the memory

func NewMemoryStore

func NewMemoryStore() *MemoryStore

NewMemoryStore creates a new memory store

func (*MemoryStore) FetchHandler

func (s *MemoryStore) FetchHandler(fetcher remotes.Fetcher) images.HandlerFunc

FetchHandler returnes a handler that will fetch all content into the memory store discovered in a call to Dispath. Use with ChildrenHandler to do a full recurisive fetch.

func (*MemoryStore) Get

func (s *MemoryStore) Get(desc ocispec.Descriptor) ([]byte, bool)

Get finds the content from the store

func (*MemoryStore) ReaderAt

func (s *MemoryStore) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error)

ReaderAt provides contents

func (*MemoryStore) Set

func (s *MemoryStore) Set(desc ocispec.Descriptor, content []byte)

Set adds the content to the store

Jump to

Keyboard shortcuts

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