A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go
72
fork

Configure Feed

Select the types of activity you want to include in your feed.

interface{} -> any

+32 -32
+1 -1
cmd/appview/serve.go
··· 397 397 return 398 398 } 399 399 400 - var metadataMap map[string]interface{} 400 + var metadataMap map[string]any 401 401 if err := json.Unmarshal(metadataBytes, &metadataMap); err != nil { 402 402 http.Error(w, "Failed to unmarshal metadata", http.StatusInternalServerError) 403 403 return
+1 -1
docs/INTEGRATION_STRATEGY.md
··· 251 251 return 252 252 } 253 253 254 - json.NewEncoder(w).Encode(map[string]interface{}{ 254 + json.NewEncoder(w).Encode(map[string]any{ 255 255 "verified": result.Verified, 256 256 "did": result.Signature.DID, 257 257 "signedAt": result.Signature.SignedAt,
+4 -4
docs/SIGNATURE_INTEGRATION.md
··· 545 545 Name: v.name, 546 546 Type: v.Type(), 547 547 Message: fmt.Sprintf("Verified for DID %s", sigData.ATProto.DID), 548 - Extensions: map[string]interface{}{ 548 + Extensions: map[string]any{ 549 549 "did": sigData.ATProto.DID, 550 550 "handle": sigData.ATProto.Handle, 551 551 "signedAt": sigData.ATProto.SignedAt, ··· 673 673 674 674 type ProviderResponse struct { 675 675 SystemError string `json:"system_error,omitempty"` 676 - Responses []map[string]interface{} `json:"responses"` 676 + Responses []map[string]any `json:"responses"` 677 677 } 678 678 679 679 func handleProvide(w http.ResponseWriter, r *http.Request) { ··· 684 684 } 685 685 686 686 // Verify each image 687 - responses := make([]map[string]interface{}, 0, len(req.Values)) 687 + responses := make([]map[string]any, 0, len(req.Values)) 688 688 for _, image := range req.Values { 689 689 result, err := verifier.Verify(context.Background(), image) 690 690 691 - response := map[string]interface{}{ 691 + response := map[string]any{ 692 692 "image": image, 693 693 "verified": false, 694 694 }
+4 -4
examples/plugins/gatekeeper-provider/main.go.temp
··· 35 35 // ProviderResponse is the response format to Gatekeeper. 36 36 type ProviderResponse struct { 37 37 SystemError string `json:"system_error,omitempty"` 38 - Responses []map[string]interface{} `json:"responses"` 38 + Responses []map[string]any `json:"responses"` 39 39 } 40 40 41 41 // VerificationResult holds the result of verifying a single image. ··· 110 110 log.Printf("INFO: received verification request for %d images", len(req.Values)) 111 111 112 112 // Verify each image 113 - responses := make([]map[string]interface{}, 0, len(req.Values)) 113 + responses := make([]map[string]any, 0, len(req.Values)) 114 114 for _, image := range req.Values { 115 115 result := s.verifyImage(r.Context(), image) 116 116 responses = append(responses, structToMap(result)) ··· 186 186 } 187 187 188 188 // structToMap converts a struct to a map for JSON encoding. 189 - func structToMap(v interface{}) map[string]interface{} { 189 + func structToMap(v any) map[string]any { 190 190 data, _ := json.Marshal(v) 191 - var m map[string]interface{} 191 + var m map[string]any 192 192 json.Unmarshal(data, &m) 193 193 return m 194 194 }
+1 -1
examples/plugins/ratify-verifier/README.md
··· 196 196 Name string 197 197 Type string 198 198 Message string 199 - Extensions map[string]interface{} 199 + Extensions map[string]any 200 200 } 201 201 ``` 202 202
+2 -2
examples/plugins/ratify-verifier/verifier.go.temp
··· 166 166 Name: v.name, 167 167 Type: v.Type(), 168 168 Message: fmt.Sprintf("Successfully verified ATProto signature for DID %s", sigData.ATProto.DID), 169 - Extensions: map[string]interface{}{ 169 + Extensions: map[string]any{ 170 170 "did": sigData.ATProto.DID, 171 171 "handle": sigData.ATProto.Handle, 172 172 "signedAt": sigData.ATProto.SignedAt, ··· 203 203 Name: v.name, 204 204 Type: v.Type(), 205 205 Message: message, 206 - Extensions: map[string]interface{}{ 206 + Extensions: map[string]any{ 207 207 "error": message, 208 208 }, 209 209 }
+5 -5
pkg/appview/db/oauth_store.go
··· 339 339 340 340 // GetSessionStats returns statistics about stored OAuth sessions 341 341 // Useful for monitoring and debugging session health 342 - func (s *OAuthStore) GetSessionStats(ctx context.Context) (map[string]interface{}, error) { 343 - stats := make(map[string]interface{}) 342 + func (s *OAuthStore) GetSessionStats(ctx context.Context) (map[string]any, error) { 343 + stats := make(map[string]any) 344 344 345 345 // Total sessions 346 346 var totalSessions int ··· 392 392 393 393 // ListSessionsForMonitoring returns a list of all sessions with basic info for monitoring 394 394 // Returns: DID, session age (minutes), last update time 395 - func (s *OAuthStore) ListSessionsForMonitoring(ctx context.Context) ([]map[string]interface{}, error) { 395 + func (s *OAuthStore) ListSessionsForMonitoring(ctx context.Context) ([]map[string]any, error) { 396 396 rows, err := s.db.QueryContext(ctx, ` 397 397 SELECT 398 398 account_did, ··· 408 408 } 409 409 defer rows.Close() 410 410 411 - var sessions []map[string]interface{} 411 + var sessions []map[string]any 412 412 for rows.Next() { 413 413 var did, sessionID, createdAt, updatedAt string 414 414 var idleMinutes int ··· 418 418 continue 419 419 } 420 420 421 - sessions = append(sessions, map[string]interface{}{ 421 + sessions = append(sessions, map[string]any{ 422 422 "did": did, 423 423 "session_id": sessionID, 424 424 "created_at": createdAt,
+1 -1
pkg/appview/handlers/images.go
··· 95 95 96 96 w.Header().Set("Content-Type", "application/json") 97 97 w.WriteHeader(http.StatusConflict) 98 - json.NewEncoder(w).Encode(map[string]interface{}{ 98 + json.NewEncoder(w).Encode(map[string]any{ 99 99 "error": "confirmation_required", 100 100 "message": "This manifest has associated tags that will also be deleted", 101 101 "tags": tags,
+4 -4
pkg/atproto/directory_test.go
··· 32 32 wg.Add(numGoroutines) 33 33 34 34 // Channel to collect all directory instances 35 - instances := make(chan interface{}, numGoroutines) 35 + instances := make(chan any, numGoroutines) 36 36 37 37 // Launch many goroutines concurrently accessing GetDirectory 38 38 for i := 0; i < numGoroutines; i++ { ··· 48 48 close(instances) 49 49 50 50 // Collect all instances 51 - var dirs []interface{} 51 + var dirs []any 52 52 for dir := range instances { 53 53 dirs = append(dirs, dir) 54 54 } ··· 72 72 func TestGetDirectorySequential(t *testing.T) { 73 73 t.Run("multiple calls in sequence", func(t *testing.T) { 74 74 // Get directory multiple times in sequence 75 - dirs := make([]interface{}, 10) 75 + dirs := make([]any, 10) 76 76 for i := 0; i < 10; i++ { 77 77 dirs[i] = GetDirectory() 78 78 } ··· 122 122 var wg sync.WaitGroup 123 123 wg.Add(numGoroutines) 124 124 125 - instances := make([]interface{}, numGoroutines) 125 + instances := make([]any, numGoroutines) 126 126 var mu sync.Mutex 127 127 128 128 // Simulate many goroutines trying to get the directory simultaneously
+4 -4
pkg/auth/hold_remote_test.go
··· 78 78 } 79 79 80 80 // Return mock response 81 - response := map[string]interface{}{ 81 + response := map[string]any{ 82 82 "uri": "at://did:web:test-hold/io.atcr.hold.captain/self", 83 83 "cid": "bafytest123", 84 - "value": map[string]interface{}{ 84 + "value": map[string]any{ 85 85 "$type": atproto.CaptainCollection, 86 86 "owner": "did:plc:owner123", 87 87 "public": true, ··· 281 281 func TestCheckReadAccess_PublicHold(t *testing.T) { 282 282 // Create mock server that returns public captain record 283 283 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 284 - response := map[string]interface{}{ 284 + response := map[string]any{ 285 285 "uri": "at://did:web:test-hold/io.atcr.hold.captain/self", 286 286 "cid": "bafytest123", 287 - "value": map[string]interface{}{ 287 + "value": map[string]any{ 288 288 "$type": atproto.CaptainCollection, 289 289 "owner": "did:plc:owner123", 290 290 "public": true, // Public hold
+1 -1
pkg/auth/token/handler_test.go
··· 513 513 } 514 514 515 515 // Verify JSON structure 516 - var decoded map[string]interface{} 516 + var decoded map[string]any 517 517 if err := json.Unmarshal(data, &decoded); err != nil { 518 518 t.Fatalf("Failed to unmarshal JSON: %v", err) 519 519 }
+3 -3
pkg/auth/token/issuer_test.go
··· 207 207 } 208 208 209 209 // Parse and validate the token 210 - token, err := jwt.ParseWithClaims(tokenString, &Claims{}, func(token *jwt.Token) (interface{}, error) { 210 + token, err := jwt.ParseWithClaims(tokenString, &Claims{}, func(token *jwt.Token) (any, error) { 211 211 return issuer.publicKey, nil 212 212 }) 213 213 if err != nil { ··· 289 289 } 290 290 291 291 // x5c should be a slice of base64-encoded certificates 292 - x5cSlice, ok := x5c.([]interface{}) 292 + x5cSlice, ok := x5c.([]any) 293 293 if !ok { 294 294 t.Fatal("Expected x5c to be a slice") 295 295 } ··· 575 575 } 576 576 577 577 // Parse token and verify expiration 578 - token, err := jwt.ParseWithClaims(tokenString, &Claims{}, func(token *jwt.Token) (interface{}, error) { 578 + token, err := jwt.ParseWithClaims(tokenString, &Claims{}, func(token *jwt.Token) (any, error) { 579 579 return issuer.publicKey, nil 580 580 }) 581 581 if err != nil {
+1 -1
pkg/hold/pds/records_test.go
··· 614 614 records map[string]string // key -> cid 615 615 } 616 616 617 - func (m *mockRepo) ForEach(ctx context.Context, prefix string, fn func(string, interface{}) error) error { 617 + func (m *mockRepo) ForEach(ctx context.Context, prefix string, fn func(string, any) error) error { 618 618 for k, v := range m.records { 619 619 if err := fn(k, v); err != nil { 620 620 if err == repo.ErrDoneIterating {