Documentation ¶
Index ¶
- type BaseStorageBackend
- type FileSystemBackend
- func (s *FileSystemBackend) CopyFile(fromKey, toKey string) error
- func (s *FileSystemBackend) DeleteFile(key string) error
- func (s *FileSystemBackend) GetFile(key string) (io.ReadCloser, error)
- func (s *FileSystemBackend) GetMetadata(key string, value interface{}) error
- func (s *FileSystemBackend) WriteFile(key string, fileMeta interface{}, r io.Reader) error
- type InMemoryBackend
- func (s *InMemoryBackend) CopyFile(fromKey, toKey string) error
- func (s *InMemoryBackend) DeleteFile(key string) error
- func (s *InMemoryBackend) GetFile(key string) (io.ReadCloser, error)
- func (s *InMemoryBackend) GetMetadata(key string, value interface{}) error
- func (s *InMemoryBackend) WriteFile(key string, fileMeta interface{}, r io.Reader) error
- type InMemoryFile
- type S3Backend
- func (s *S3Backend) CopyFile(fromKey, toKey string) error
- func (s *S3Backend) DeleteFile(key string) error
- func (s *S3Backend) GetFile(key string) (io.ReadCloser, error)
- func (s *S3Backend) GetMetadata(key string, value interface{}) error
- func (s *S3Backend) WriteFile(key string, fileMeta interface{}, r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStorageBackend ¶
type BaseStorageBackend interface { // GetFile Get the package from the storage backend GetFile(key string) (io.ReadCloser, error) // GetMetadata Get the package JSON metadata from the storage backend GetMetadata(key string, value interface{}) error // WriteFile Write the package to the storage backend WriteFile(key string, metadata interface{}, r io.Reader) error // CopyFile Copy the package from the storage backend CopyFile(fromKey, toKey string) error // DeleteFile Delete the package from the storage backend DeleteFile(key string) error }
type FileSystemBackend ¶
type FileSystemBackend struct { BaseStorageBackend // contains filtered or unexported fields }
func NewFileSystemBackend ¶
func NewFileSystemBackend(basDir string) *FileSystemBackend
func (*FileSystemBackend) CopyFile ¶
func (s *FileSystemBackend) CopyFile(fromKey, toKey string) error
func (*FileSystemBackend) DeleteFile ¶
func (s *FileSystemBackend) DeleteFile(key string) error
func (*FileSystemBackend) GetFile ¶
func (s *FileSystemBackend) GetFile(key string) (io.ReadCloser, error)
func (*FileSystemBackend) GetMetadata ¶
func (s *FileSystemBackend) GetMetadata(key string, value interface{}) error
type InMemoryBackend ¶
type InMemoryBackend struct { BaseStorageBackend // contains filtered or unexported fields }
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
func (*InMemoryBackend) CopyFile ¶
func (s *InMemoryBackend) CopyFile(fromKey, toKey string) error
func (*InMemoryBackend) DeleteFile ¶
func (s *InMemoryBackend) DeleteFile(key string) error
func (*InMemoryBackend) GetFile ¶
func (s *InMemoryBackend) GetFile(key string) (io.ReadCloser, error)
func (*InMemoryBackend) GetMetadata ¶
func (s *InMemoryBackend) GetMetadata(key string, value interface{}) error
type InMemoryFile ¶
type InMemoryFile struct {
// contains filtered or unexported fields
}
type S3Backend ¶
type S3Backend struct { BaseStorageBackend Bucket string // contains filtered or unexported fields }
func NewS3Backend ¶
func NewS3Backend() *S3Backend
func (*S3Backend) DeleteFile ¶
func (*S3Backend) GetMetadata ¶
Click to show internal directories.
Click to hide internal directories.