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 publish-time claim requirements. 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, authzEnabled bool) *Routes
NewRoutes creates a new Routes instance with the given service. authzEnabled reflects whether the server has authorization configured (i.e. AuthConfig.Authz != nil); handlers use it to gate policies that only make sense when publishers are subject to authorization checks.