v1

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL