Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("NoSuchKey: The specified key does not exist.")
Functions ¶
This section is empty.
Types ¶
type LocalStorage ¶
type LocalStorage interface { Prefix() string Read(key string) (*os.File, error) Stat(key string) (os.FileInfo, error) Delete(key string) error Write(key string, body io.Reader) (int64, error) ListFiles(prefix string) ([]os.FileInfo, error) CheckAccess(prefix string) error DiskStats() (*DiskStats, error) }
LocalStorage provides access to the local filesystem.
func NewLocalStorage ¶
func NewLocalStorage(prefix string) LocalStorage
type RemoteStorage ¶
type RemoteStorage interface { PutObject(key string, r io.ReadSeeker, meta map[string]string) (*Spec, error) GetObject(key string, version ...string) (*Spec, error) HeadObject(key string, version ...string) (*Spec, error) ListObjects(prefix string, startAfter ...string) ([]*Spec, error) CheckAccess(prefix string) error Bucket() string }
RemoteStorage provides object access backend, it's usually an AWS S3 client pointed to a specific bucket.
func NewS3Storage ¶
func NewS3Storage(region, bucket string) RemoteStorage
Click to show internal directories.
Click to hide internal directories.