memory

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new in-memory storage backend

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend is an in-memory implementation of the simplecontent.BlobStore interface

func (*Backend) Delete

func (b *Backend) Delete(ctx context.Context, objectKey string) error

Delete deletes content

func (*Backend) Download

func (b *Backend) Download(ctx context.Context, objectKey string) (io.ReadCloser, error)

Download downloads content directly

func (*Backend) GetDownloadURL

func (b *Backend) 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 (*Backend) GetObjectMeta

func (b *Backend) GetObjectMeta(ctx context.Context, objectKey string) (*simplecontent.ObjectMeta, error)

GetObjectMeta retrieves metadata for an object in memory

func (*Backend) GetPreviewURL

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

GetPreviewURL returns a URL for previewing content

func (*Backend) GetUploadURL

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

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

func (*Backend) Upload

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

Upload uploads content directly

func (*Backend) UploadWithParams

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

UploadWithParams uploads content with parameters

Jump to

Keyboard shortcuts

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