memory

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Deprecated: This service is deprecated and will be removed in a future version. Please use the new module instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryBackend

func NewMemoryBackend() storage.Backend

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

func (b *MemoryBackend) GetPreviewURL(ctx context.Context, objectKey string) (string, error)

GetPreviewURL returns a URL for previewing content

func (*MemoryBackend) GetUploadURL

func (b *MemoryBackend) GetUploadURL(ctx context.Context, objectKey string) (string, error)

GetUploadURL returns a URL for uploading content In-memory implementation doesn't use URLs

func (*MemoryBackend) Upload

func (b *MemoryBackend) Upload(ctx context.Context, objectKey string, reader io.Reader) error

Upload uploads content directly

func (*MemoryBackend) UploadWithParams added in v0.0.11

func (b *MemoryBackend) UploadWithParams(ctx context.Context, reader io.Reader, params storage.UploadParams) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL