Documentation
¶
Overview ¶
Package blob implements the content-addressed BlobStore (§31). Content is stored by SHA-256 digest under blobs/sha256/<digest>. An optional redactor is applied before digest computation so that secrets never reach the store (§47).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDigestMismatch = errors.New("blob: content does not match digest")
ErrDigestMismatch is returned when stored content does not match its digest.
Functions ¶
Types ¶
type Redactor ¶
Redactor transforms content before it is persisted. It is the security choke point for redaction (§48).
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a content-addressed blob store rooted at a directory.
func New ¶
New creates a Store rooted at dir (which is created if absent).
The store's directories are owner-only (0700) and every blob is 0600 (Put). MkdirAll only applies a mode to directories it creates, so a store directory that already existed with a wider mode -- created by hand, by an older build, or under a permissive umask -- is tightened here on every open. It matters most for raw-blobs/, which by design holds file content and image bytes unredacted (docs/security-model.md); the redacted store gets the same treatment because nothing about it needs to be readable by anyone else.