Documentation
¶
Overview ¶
Package agent is the media access agent run by cmd/media-access. For the namespaces served on the request's host it streams, from a private bucket with its own read-only key:
/v1/{ns}/{kind}/{id}/public/{name} to anyone; when missing, {ns}/{kind}/_default/public/{name}
if a Default declares the name
/v1/{ns}/{kind}/{id}/private/sha256-{hex} with the item's unexpired token (?t= or an mt cookie);
?dl={name} serves it as a download under that name
A token opens every private file of its item or none. Everything else and every denial is one identical no-store 404; token denials are decided before any bucket access. It keeps no state, reads no manifests and no databases, and knows nothing of apps, presets or originals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Endpoint, Bucket, Region string // path-style S3 endpoint; Region default us-east-1
AccessKeyID, SecretAccessKey string // a key that can read only */private/* and */public/*
Ring token.Ring
Hosts map[string][]string // lower-case host name (no port) -> namespaces served on it; required
Origins []string // exact CORS origins ("scheme://host[:port]") allowed with credentials
Defaults []layout.Default // public default images
Client *http.Client // default: a tuned transport without compression
Logger *slog.Logger
}
Config configures a Handler.
Click to show internal directories.
Click to hide internal directories.