Documentation ¶
Index ¶
- Variables
- type BlobStorage
- type Config
- type MemoryStorage
- func (ms *MemoryStorage) FileExists(fileKey string) bool
- func (ms *MemoryStorage) GetAllFiles() map[string][]byte
- func (ms *MemoryStorage) GetFile(fileKey string) ([]byte, error)
- func (ms *MemoryStorage) RemoveFile(fileKey string) error
- func (ms *MemoryStorage) SendFile(ctx context.Context, fileKey string, reader io.ReadSeeker) error
- type NoneStorage
- type S3Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileKeyNotFound = errors.New("fileKey not found")
Functions ¶
This section is empty.
Types ¶
type BlobStorage ¶
type BlobStorage struct {
// contains filtered or unexported fields
}
func NewBlobStorage ¶
func NewBlobStorage(config Config) (*BlobStorage, error)
func (*BlobStorage) SendFile ¶
func (svc *BlobStorage) SendFile(ctx context.Context, fileKey string, reader io.ReadSeeker) error
type Config ¶
type Config = config.StorageConfig
type MemoryStorage ¶
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
func (*MemoryStorage) FileExists ¶
func (ms *MemoryStorage) FileExists(fileKey string) bool
func (*MemoryStorage) GetAllFiles ¶
func (ms *MemoryStorage) GetAllFiles() map[string][]byte
func (*MemoryStorage) RemoveFile ¶
func (ms *MemoryStorage) RemoveFile(fileKey string) error
func (*MemoryStorage) SendFile ¶
func (ms *MemoryStorage) SendFile(ctx context.Context, fileKey string, reader io.ReadSeeker) error
type NoneStorage ¶
type NoneStorage struct{}
func NewNoneStorage ¶
func NewNoneStorage() *NoneStorage
func (*NoneStorage) SendFile ¶
func (ns *NoneStorage) SendFile(ctx context.Context, fileKey string, reader io.ReadSeeker) error
Click to show internal directories.
Click to hide internal directories.