cas

package module
v0.0.0-...-64ed284 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2015 License: MIT Imports: 6 Imported by: 0

README

Build Status

cas

A file system based content-addressable storage written in Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	KeyToPath map[string]string
	PathToKey map[string]string
}

[Content-Addressed Storage](http://de.wikipedia.org/wiki/Content-Addressed_Storage)

func New

func New() *Storage

func (*Storage) DelByKey

func (c *Storage) DelByKey(key string)

func (*Storage) DelByPath

func (c *Storage) DelByPath(path string) (err error)

func (*Storage) Flush

func (c *Storage) Flush()

func (*Storage) Get

func (c *Storage) Get(key string) (f *os.File, ok bool, err error)

retrieves a file by the key returned when importing it

func (*Storage) Has

func (c *Storage) Has(key string) bool

func (*Storage) HasKey

func (c *Storage) HasKey(key string) bool

func (*Storage) HasPath

func (c *Storage) HasPath(path string) bool

func (*Storage) ImportDir

func (c *Storage) ImportDir(path string) (err error)

recursively imports a directory

func (*Storage) ImportFile

func (c *Storage) ImportFile(path string) (key string, err error)

imports a file

func (*Storage) String

func (c *Storage) String() string

func (*Storage) Update

func (c *Storage) Update()

Jump to

Keyboard shortcuts

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