blobstore

package module
v0.0.0-...-d6d187c Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DumbGarbageCollector

type DumbGarbageCollector struct{}

func (DumbGarbageCollector) Find

func (d DumbGarbageCollector) Find(s Store) ([]Object, error)

type GarbageCollector

type GarbageCollector interface {
	Find(s Store) ([]Object, error)
}

type Object

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

func (Object) Id

func (o Object) Id() string

type Store

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

func Load

func Load(path string) (*Store, error)

func (Store) Commit

func (s Store) Commit(w Writer) (*Object, error)

func (Store) Copy

func (s Store) Copy(o Object, w io.Writer) (int64, error)

func (Store) Create

func (s Store) Create() (*Writer, error)

func (Store) Exists

func (s Store) Exists(o Object) bool

func (Store) GC

func (s Store) GC(gc GarbageCollector) error
func (s Store) Link(o Object, targetPath string) error

func (Store) Linked

func (s Store) Linked() (map[Object][]string, error)

func (Store) LinkedVisitor

func (s Store) LinkedVisitor(progn func(Object, string, os.FileInfo) error) error

func (Store) List

func (s Store) List() ([]Object, error)

func (Store) Load

func (s Store) Load(hash string) (*Object, error)

func (Store) Open

func (s Store) Open(o Object) (io.ReadCloser, error)

func (Store) OpenPath

func (s Store) OpenPath(p string) (io.ReadCloser, error)

func (Store) Paths

func (s Store) Paths() (map[string]Object, error)

func (Store) Remove

func (s Store) Remove(o Object) error

type Writer

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

func (Writer) Close

func (n Writer) Close() error

func (Writer) Write

func (n Writer) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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