cas

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2014 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index interface {
	Hash() string
	Marshal() []byte
	Unmarshal([]byte)
	Type() int64
}

type Remote

type Remote struct {
	Name    string
	Mirrors []string
	ETag    string
	Blob    string
}

func NewRemote

func NewRemote(name string, mirrors []string) *Remote

func (Remote) Download

func (r Remote) Download(ds Store) (*Remote, error)

TODO: add locking

func (Remote) Hash

func (r Remote) Hash() string

func (Remote) Marshal

func (r Remote) Marshal() []byte

func (Remote) Type

func (r Remote) Type() int64

func (*Remote) Unmarshal

func (r *Remote) Unmarshal(data []byte)

type Store

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

func NewStore

func NewStore(base string) *Store

func (Store) Dump

func (ds Store) Dump(hex bool)

func (Store) ReadIndex

func (ds Store) ReadIndex(i Index) error

func (Store) ReadStream

func (ds Store) ReadStream(key string) (io.ReadCloser, error)

func (Store) WriteACI

func (ds Store) WriteACI(tmpKey string, orig io.Reader) (string, error)

func (Store) WriteIndex

func (ds Store) WriteIndex(i Index)

func (Store) WriteStream

func (ds Store) WriteStream(key string, r io.Reader) error

Jump to

Keyboard shortcuts

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