Versions in this module Expand all Collapse all v0 v0.51.8 Oct 4, 2026 v0.51.6 Oct 4, 2026 Changes in this version + const DefaultImmichKeyFile + const DefaultImmichURL + const DefaultListen + const EnvCacheTTL + const EnvHomelabID + const EnvImmichKeyFile + const EnvImmichURL + const EnvListen + const HealthPath + const ImmichKeyName + const ImmichKeySlot + const MaxCacheTTL + const SummaryPath + const Version + const WorkloadRef + var ErrAppUnreachable = errors.New("content bridge: app unreachable") + var ErrCredentialInvalid = errors.New("content bridge: app credential invalid") + var ErrNotConfigured = errors.New("content bridge: app not configured") + var ErrRequestRefused = errors.New("content bridge: request refused by the read-only allowlist") + func ImmichKeySecretRef() string + func ImmichPermissions() []string + func NewHandler(service *Service, authority TierAuthority) http.Handler + func NewReadOnlyTransport(next http.RoundTripper, origin *url.URL, endpoints []Endpoint) http.RoundTripper + type Adapter interface + Ceiling func() Tier + Counts func(ctx context.Context) (any, error) + UseCase func() UseCase + type Config struct + CacheTTL time.Duration + HomelabID string + ImmichKeyFile string + ImmichURL string + Listen string + func ConfigFromEnv(getenv func(string) string) (Config, error) + type Document struct + AsOf string + HomelabID string + UseCases []UseCaseResult + Version string + type Endpoint struct + Path string + Query []string + func ImmichEndpoints() []Endpoint + type ImmichAdapter struct + func NewImmichAdapter(client *ReadOnlyClient, now func() time.Time) *ImmichAdapter + func (*ImmichAdapter) Ceiling() Tier + func (*ImmichAdapter) UseCase() UseCase + func (a *ImmichAdapter) Counts(ctx context.Context) (any, error) + type KeyFunc func() (string, error) + func FileKey(path string) KeyFunc + type LoopbackQueryTier struct + func (LoopbackQueryTier) GrantedTier(r *http.Request) (Tier, error) + type PhotosCounts struct + Albums *int64 + Assets *int64 + Images *int64 + OnThisDay *int64 + Videos *int64 + type ReadOnlyClient struct + func NewReadOnlyClient(origin string, endpoints []Endpoint, key KeyFunc, base http.RoundTripper) (*ReadOnlyClient, error) + func (c *ReadOnlyClient) GetJSON(ctx context.Context, path string, query url.Values, out any) error + type Service struct + func NewService(cfg ServiceConfig) *Service + func NewServiceFromConfig(cfg Config, logger *slog.Logger) (*Service, error) + func (s *Service) HomelabID() string + func (s *Service) Summarize(ctx context.Context, useCases []UseCase, granted Tier, homelabID string) Document + type ServiceConfig struct + Adapters []Adapter + CacheTTL time.Duration + HomelabID string + Logger *slog.Logger + Now func() time.Time + type Status string + const StatusAppUnreachable + const StatusConsentRequired + const StatusCredentialInvalid + const StatusNotConfigured + const StatusOK + type Tier string + const TierOff + const TierPreviews + const TierSummary + func MinTier(a, b Tier) Tier + func ParseTier(value string) (Tier, bool) + type TierAuthority interface + GrantedTier func(r *http.Request) (Tier, error) + type TierError struct + Code string + HTTPStatus int + func (e *TierError) Error() string + type UseCase string + const UseCaseDocuments + const UseCaseFiles + const UseCaseMedia + const UseCasePhotos + const UseCaseSmartHome + func ParseUseCase(value string) (UseCase, bool) + type UseCaseResult struct + App string + AsOf string + Counts any + Status Status + Tier Tier + UseCase UseCase