azureblob

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package azureblob is the Azure Blob Storage adapter for the Origin interface. Block Blobs only; PageBlob and AppendBlob are rejected at Head() with UnsupportedBlobTypeError.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements origin.Origin against Azure Blob Storage.

func New

func New(cfg config.Azureblob, log *slog.Logger) (*Adapter, error)

New builds an Adapter from config. The log receives debug-level emissions for every Head / GetRange call and the error mapping decision (not-found / auth / precondition / unsupported blob type) on failure paths. Passing nil falls back to slog.Default().

func (*Adapter) GetRange

func (a *Adapter) GetRange(ctx context.Context, bucket, key, etag string, off, n int64) (io.ReadCloser, error)

GetRange fetches [off, off+n) of the blob, sending If-Match: <etag>.

func (*Adapter) Head

func (a *Adapter) Head(ctx context.Context, bucket, key string) (origin.ObjectInfo, error)

Head returns ObjectInfo for the named blob.

"bucket" maps to the configured container; the bucket arg is honored only if non-empty (allowing single-container deployments to use the configured container as the default).

Jump to

Keyboard shortcuts

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