Help us shape the future of Go! Take the 2026 Go Developer Survey

http

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package http connects typed HTTP file inputs and responses to storage disks. Authorization and file validation remain the consuming endpoint's policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(disk *storage.Disk, key storage.ObjectKey, options storage.ReadOptions) foundryhttp.Download

Download defers opening until the typed HTTP handler and authorization succeed. It reuses Foundry's download response, including HEAD, conditional requests, byte ranges, presentation validation and automatic reader cleanup. Seeking streams provider ranges; no complete-object buffer or temporary download file is needed. Signed HTTP endpoints can protect local downloads with the existing URL signer. Never serve a managed local store with a filesystem file server.

func StoreUpload

StoreUpload persists a captured request-owned upload before the request ends. It uses the supplied key, never the client's filename. Existing HTTP upload limits, validation, bounded spooling and request cleanup remain in force. Detected media type is a default only; it is not proof of a valid file format. A successful StoredObject can be retained; UploadedFile cannot outlive requests.

func Stream

func Stream(disk *storage.Disk, key storage.ObjectKey, options storage.ReadOptions) foundryhttp.Stream

Stream works with any storage backend and defers opening to the response phase. It describes a finite stream with a known length; HTTP byte-range and validator negotiation require Download. WithName controls presentation, not object keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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