Documentation
¶
Index ¶
- func New() simplecontent.BlobStore
- type Backend
- func (b *Backend) Delete(ctx context.Context, objectKey string) error
- func (b *Backend) Download(ctx context.Context, objectKey string) (io.ReadCloser, error)
- func (b *Backend) GetDownloadURL(ctx context.Context, objectKey string, downloadFilename string) (string, error)
- func (b *Backend) GetObjectMeta(ctx context.Context, objectKey string) (*simplecontent.ObjectMeta, error)
- func (b *Backend) GetPreviewURL(ctx context.Context, objectKey string) (string, error)
- func (b *Backend) GetUploadURL(ctx context.Context, objectKey string) (string, error)
- func (b *Backend) Upload(ctx context.Context, objectKey string, reader io.Reader) error
- func (b *Backend) UploadWithParams(ctx context.Context, reader io.Reader, params simplecontent.UploadParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is an in-memory implementation of the simplecontent.BlobStore interface
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 ¶
GetPreviewURL returns a URL for previewing content
func (*Backend) GetUploadURL ¶
GetUploadURL returns a URL for uploading content In-memory implementation doesn't use URLs
func (*Backend) UploadWithParams ¶
func (b *Backend) UploadWithParams(ctx context.Context, reader io.Reader, params simplecontent.UploadParams) error
UploadWithParams uploads content with parameters
Click to show internal directories.
Click to hide internal directories.