Documentation
¶
Overview ¶
Package privacy is the official privacy redaction module: the SAM 3.1 scan that blurs faces, plates, and nudity before media and profile pictures are stored. It owns no routes: the media and users domains call it through narrow seams the composition root adapts.
Index ¶
- Constants
- type Module
- func (m *Module) AdminManifest() kernel.AdminExtensionManifest
- func (m *Module) Init(_ kernel.Kernel) error
- func (m *Module) Name() string
- func (m *Module) Optional() []string
- func (m *Module) Requires() []string
- func (m *Module) Service() *privacydomain.Service
- func (m *Module) Shutdown() error
- func (m *Module) Version() string
- type Option
Constants ¶
const ( // Name is the registry key for this module. Name = "privacy" // Version is the module version reported via Module.Version. Version = "0.1.0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the privacy kernel module.
func (*Module) AdminManifest ¶
func (m *Module) AdminManifest() kernel.AdminExtensionManifest
AdminManifest declares this module's admin-shell extensions. Redaction is env-driven with no UI toggle, so the module declares nothing.
func (*Module) Init ¶
Init wires the module. The service is already adopted by New; Init only validates presence.
func (*Module) Optional ¶
Optional lists soft dependencies. None: the SAM client is built by the composition root, not discovered from another module.
func (*Module) Requires ¶
Requires lists hard dependencies. Redaction degrades to inert without a segmenter, so nothing is required.
func (*Module) Service ¶
func (m *Module) Service() *privacydomain.Service
Service exposes the adopted redaction service for composition-root wiring (media and profile-picture adapters). It stays valid for the module's lifetime.
type Option ¶
type Option func(*Module)
Option configures a Module. The composition root supplies every option; direct construction without options yields a standalone module with an inert service (nil Segmenter returns its input unchanged).
func WithLogger ¶
WithLogger attaches the module logger. Without one there is nothing to log: the service reports failures to its caller, which fails closed.
func WithService ¶
func WithService(service *privacydomain.Service) Option
WithService adopts the redaction service (composition root, built over the SAM client when AI_SAM_API_KEY is set).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package privacy owns the redaction domain: the Segmenter port that the SAM client implements and the Redactor service that blurs detections.
|
Package privacy owns the redaction domain: the Segmenter port that the SAM client implements and the Redactor service that blurs detections. |
|
Package infrastructure adapts the privacy Segmenter port onto Meta's Model API (SAM 3.1): one Responses-API call per concept, boxes extracted.
|
Package infrastructure adapts the privacy Segmenter port onto Meta's Model API (SAM 3.1): one Responses-API call per concept, boxes extracted. |