blobstorage

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package blobstorage provides an in-memory mock implementation of Azure Blob Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is an in-memory mock implementation of Azure Blob Storage.

func New

func New(opts *config.Options) *Mock

New creates a new Azure Blob Storage mock.

func (*Mock) CopyObject

func (m *Mock) CopyObject(_ context.Context, dstBucket, dstKey string, src driver.CopySource) error

CopyObject copies a blob from one location to another.

func (*Mock) CreateBucket

func (m *Mock) CreateBucket(_ context.Context, name string) error

CreateBucket creates a new blob container.

func (*Mock) DeleteBucket

func (m *Mock) DeleteBucket(_ context.Context, name string) error

DeleteBucket deletes a blob container.

func (*Mock) DeleteObject

func (m *Mock) DeleteObject(_ context.Context, bucket, key string) error

DeleteObject deletes a blob from a container.

func (*Mock) GetObject

func (m *Mock) GetObject(_ context.Context, bucket, key string) (*driver.Object, error)

GetObject retrieves a blob from a container.

func (*Mock) HeadObject

func (m *Mock) HeadObject(_ context.Context, bucket, key string) (*driver.ObjectInfo, error)

HeadObject returns metadata for a blob without its data.

func (*Mock) ListBuckets

func (m *Mock) ListBuckets(_ context.Context) ([]driver.BucketInfo, error)

ListBuckets lists all blob containers.

func (*Mock) ListObjects

func (m *Mock) ListObjects(_ context.Context, bucket string, opts driver.ListOptions) (*driver.ListResult, error)

ListObjects lists blobs in a container with optional prefix/delimiter filtering.

func (*Mock) PutObject

func (m *Mock) PutObject(_ context.Context, bucket, key string, data []byte, contentType string, metadata map[string]string) error

PutObject stores a blob in a container.

Jump to

Keyboard shortcuts

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