Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudStorage ¶
type CloudStorage struct { Storage // contains filtered or unexported fields }
func NewCloudStorage ¶
func NewCloudStorage(addr string) *CloudStorage
func (*CloudStorage) Delete ¶
func (s *CloudStorage) Delete(ctx context.Context, filename string) error
func (*CloudStorage) Store ¶
func (s *CloudStorage) Store(ctx context.Context, data []byte, filename string) (*StorageObject, error)
type FileStorage ¶
type FileStorage struct { Storage // contains filtered or unexported fields }
func NewFileStorage ¶
func NewFileStorage(rootDir string) (*FileStorage, error)
func (*FileStorage) Delete ¶
func (s *FileStorage) Delete(ctx context.Context, filename string) error
func (*FileStorage) Store ¶
func (s *FileStorage) Store(ctx context.Context, data []byte, filename string) (*StorageObject, error)
type Storage ¶
type Storage interface { Store(ctx context.Context, data []byte, filename string) (*StorageObject, error) Delete(ctx context.Context, filename string) error }
func StorageFromEnv ¶
func StorageFromEnv() Storage
type StorageObject ¶
Click to show internal directories.
Click to hide internal directories.