azure

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package azure implements the create-only Destination for Azure Blob Storage. WORM is a container immutability policy (version-level immutability); writes are create-only via If-None-Match. Auth uses DefaultAzureCredential. There is no delete path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend is a create-only Azure Blob Destination.

func New

func New(_ context.Context, opts Options, logger *slog.Logger) (*Backend, error)

New builds an Azure Blob backend.

func (*Backend) Get

func (b *Backend) Get(ctx context.Context, key string) (io.ReadCloser, error)

Get opens key for reading (read-only). Caller closes the reader.

func (*Backend) List

func (b *Backend) List(ctx context.Context, prefix string) ([]dest.Object, error)

List returns blobs under prefix (read-only).

func (*Backend) PutImmutable

func (b *Backend) PutImmutable(ctx context.Context, key string, r io.Reader, _ int64, _ dest.Retention) (dest.PutResult, error)

PutImmutable uploads key create-only (If-None-Match: *); immutability is enforced by the container's immutability policy. Never overwrites, never deletes.

func (*Backend) VerifyWorm

func (b *Backend) VerifyWorm(ctx context.Context) (dest.WormStatus, error)

VerifyWorm checks the container has version-level immutability enabled. (Full policy-lock state needs the management plane; this is the data-plane signal.)

type Options

type Options struct {
	Account          string // storage account (real Azure)
	Container        string
	Endpoint         string // override service URL; default https://<account>.blob.core.windows.net/
	ConnectionString string // for Azurite or shared-key auth
}

Options configures the Azure Blob backend. Credentials come from DefaultAzureCredential (real Azure) or a connection string (emulator / shared key).

Jump to

Keyboard shortcuts

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