Closed clowenhg closed 5 months ago
The changes introduce significant updates and new features across multiple components of the registry system. Key modifications include enhanced configuration parsing using environment variables, database initialization, OAuth setup, JWT handling, and new server registration processes. Additionally, new structs and methods have been added to manage identity operations, server registrations, and OAuth callbacks. The updates also introduce goroutine management for concurrent operations and graceful shutdowns.
File(s) | Change Summary |
---|---|
registry/cmd/main.go |
Enhanced configuration parsing, database initialization, OAuth setup, JWT handling, and goroutine management for running the registry. |
registry/internal/config/config.go |
Added OAuthConfig and Config structs for configuration management. |
registry/internal/registry/data/data.go |
Introduced DB struct and methods for MongoDB connection management. |
registry/internal/registry/identity/identity.go , jwt.go , users.go |
Added IdentityServer struct and methods for identity operations, JWT handling, and user management. |
registry/internal/registry/identity/oauth/callback.go , oauth.go |
Added OAuthServer struct and methods for handling OAuth authentication and callbacks. |
registry/internal/registry/registry.go |
Introduced Registry struct and Run method for server management and identity handling. |
registry/internal/registry/servers/registration/registration.go |
Added functions for server registration and API key generation. |
server/cmd/main.go |
Added command-line utility for parsing and validating a registry URL. |
sequenceDiagram
participant User
participant Main as main.go
participant Config as config.go
participant DB as data.go
participant Identity as identity.go
participant OAuth as oauth.go
participant Registry as registry.go
User->>Main: Start registry
Main->>Config: Parse environment variables
Config-->>Main: Return configuration
Main->>DB: Initialize database
DB-->>Main: Return DB instance
Main->>OAuth: Setup OAuth server
OAuth-->>Main: Return OAuth server instance
Main->>Identity: Setup Identity server
Identity-->>Main: Return Identity server instance
Main->>Registry: Start registry with context
Registry->>Main: Run registry
Registry->>User: Serve HTTP requests
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?