apifiles

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apifiles snapshots API files for content-addressed delivery.

Index

Constants

View Source
const (
	// MaxBytes caps a complete API bundle, outside the manifest's KV limit.
	MaxBytes = 32 << 20
	// MaxFiles bounds the number of documents in a bundle.
	MaxFiles = 256
)

Variables

View Source
var ErrBundle = errors.New("route: invalid API file bundle")

ErrBundle is an invalid or oversized API file bundle.

Functions

This section is empty.

Types

type Files

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

Files is an immutable snapshot. Open never returns a directory listing.

func Snapshot

func Snapshot(source fs.FS, entry string) (*Files, error)

Snapshot reads only regular files, bounds total size and validates the entry.

func (*Files) Hash

func (f *Files) Hash() string

Hash addresses every file in this snapshot.

func (*Files) Open

func (f *Files) Open(name string) (fs.File, error)

Open implements fs.FS with seekable files for http.FileServerFS.

Jump to

Keyboard shortcuts

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