Documentation
¶
Overview ¶
Package v1 provides API v1 endpoints for managing sources, registries, and entries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Router ¶
func Router(svc service.RegistryService, authCfg *config.AuthConfig) http.Handler
Router creates and configures the HTTP router for API v1 endpoints. authCfg is the full authentication configuration; its Authz subtree drives role checks and its Mode determines whether publish-time claim requirements are enforced. A nil authCfg means no auth is configured (development).
Types ¶
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
Routes handles HTTP requests for API v1 endpoints.
func NewRoutes ¶
func NewRoutes(svc service.RegistryService, authEnabled bool) *Routes
NewRoutes creates a new Routes instance with the given service. authEnabled reflects whether the server is configured to require authentication (i.e. Auth.Mode != anonymous); handlers use it to gate policies that only make sense when publishers are authenticated users.