package storage import ( "atcr.io/pkg/atproto" "atcr.io/pkg/auth" "atcr.io/pkg/auth/oauth" ) // DatabaseMetrics interface for tracking pull/push counts type DatabaseMetrics interface { IncrementPullCount(did, repository string) error IncrementPushCount(did, repository string) error } // RegistryContext bundles all the context needed for registry operations // This includes both per-request data (DID, hold) and shared services type RegistryContext struct { // Per-request identity and routing information DID string // User's DID (e.g., "did:plc:abc123") HoldDID string // Hold service DID (e.g., "did:web:hold01.atcr.io") PDSEndpoint string // User's PDS endpoint URL Repository string // Image repository name (e.g., "debian") ATProtoClient *atproto.Client // Authenticated ATProto client for this user // Shared services (same for all requests) Database DatabaseMetrics // Metrics tracking database Authorizer auth.HoldAuthorizer // Hold access authorization Refresher *oauth.Refresher // OAuth session manager }