Documentation
¶
Overview ¶
Deprecated: This service is deprecated and will be removed in a future version. Please use the new module instead.
Index ¶
- func NewMemoryBackend() storage.Backend
- type MemoryBackend
- func (b *MemoryBackend) Delete(ctx context.Context, objectKey string) error
- func (b *MemoryBackend) Download(ctx context.Context, objectKey string) (io.ReadCloser, error)
- func (b *MemoryBackend) GetDownloadURL(ctx context.Context, objectKey string, downloadFilename string) (string, error)
- func (b *MemoryBackend) GetObjectMeta(ctx context.Context, objectKey string) (*storage.ObjectMeta, error)
- func (b *MemoryBackend) GetPreviewURL(ctx context.Context, objectKey string) (string, error)
- func (b *MemoryBackend) GetUploadURL(ctx context.Context, objectKey string) (string, error)
- func (b *MemoryBackend) Upload(ctx context.Context, objectKey string, reader io.Reader) error
- func (b *MemoryBackend) UploadWithParams(ctx context.Context, reader io.Reader, params storage.UploadParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMemoryBackend ¶
NewMemoryBackend creates a new in-memory storage backend
Types ¶
type MemoryBackend ¶
type MemoryBackend struct {
// contains filtered or unexported fields
}
MemoryBackend is an in-memory implementation of the storage.Backend interface
func (*MemoryBackend) Delete ¶
func (b *MemoryBackend) Delete(ctx context.Context, objectKey string) error
Delete deletes content
func (*MemoryBackend) Download ¶
func (b *MemoryBackend) Download(ctx context.Context, objectKey string) (io.ReadCloser, error)
Download downloads content directly
func (*MemoryBackend) GetDownloadURL ¶
func (b *MemoryBackend) GetDownloadURL(ctx context.Context, objectKey string, downloadFilename string) (string, error)
GetDownloadURL returns a URL for downloading content In-memory implementation doesn't use URLs
func (*MemoryBackend) GetObjectMeta ¶
func (b *MemoryBackend) GetObjectMeta(ctx context.Context, objectKey string) (*storage.ObjectMeta, error)
GetObjectMeta retrieves metadata for an object in memory
func (*MemoryBackend) GetPreviewURL ¶
GetPreviewURL returns a URL for previewing content
func (*MemoryBackend) GetUploadURL ¶
GetUploadURL returns a URL for uploading content In-memory implementation doesn't use URLs
func (*MemoryBackend) UploadWithParams ¶ added in v0.0.11
func (b *MemoryBackend) UploadWithParams(ctx context.Context, reader io.Reader, params storage.UploadParams) error
Click to show internal directories.
Click to hide internal directories.