Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEtcdStorage ¶
func NewEtcdStorage(opts EtcdOptions) (*etcdStorage, error)
Types ¶
type AWSStorage ¶
type AWSStorage struct { Bucket string Client *s3.S3 Downloader *s3manager.Downloader Prefix string Uploader *s3manager.Uploader SSE string }
func NewAWSStorage ¶
func (*AWSStorage) DeleteObject ¶
func (s *AWSStorage) DeleteObject(key string) error
func (*AWSStorage) ListObjects ¶
func (s *AWSStorage) ListObjects(prefix string) ([]Object, error)
type Backend ¶
type Backend interface { ListObjects(prefix string) ([]Object, error) GetObject(key string) (Object, error) PutObject(key string, data []byte) error DeleteObject(key string) error }
Backend is a generic interface for storage backends
type DirStorage ¶
type DirStorage struct {
// contains filtered or unexported fields
}
func NewDirStorage ¶
func NewDirStorage(rootDir string) (*DirStorage, error)
func (*DirStorage) DeleteObject ¶
func (s *DirStorage) DeleteObject(key string) error
func (*DirStorage) ListObjects ¶
func (s *DirStorage) ListObjects(prefix string) ([]Object, error)
type EtcdOptions ¶
type EtcdOptions struct { Logger *zap.SugaredLogger Config *clientv3.Config }
type GCPStorage ¶
type GCPStorage struct {
// contains filtered or unexported fields
}
func NewGCPStorage ¶
func NewGCPStorage(bucket string, prefix string) (*GCPStorage, error)
func (*GCPStorage) DeleteObject ¶
func (s *GCPStorage) DeleteObject(key string) error
DeleteObject removes an object from Google Cloud Storage bucket, at prefix
func (*GCPStorage) ListObjects ¶
func (s *GCPStorage) ListObjects(prefix string) ([]Object, error)
type Metadata ¶
Metadata represents the meta information of the object includes object name , object version , etc...
type Object ¶
Object is a generic representation of a storage object
func (Object) HasExtension ¶
HasExtension determines whether or not an object contains a file extension
type ObjectSliceDiff ¶
ObjectSliceDiff provides information on what has changed since last calling ListObjects
func GetObjectSliceDiff ¶
func GetObjectSliceDiff(prev []Object, curr []Object, timestampTolerance time.Duration) ObjectSliceDiff
GetObjectSliceDiff takes two objects slices and returns an ObjectSliceDiff
Click to show internal directories.
Click to hide internal directories.