v1

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 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 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.

Jump to

Keyboard shortcuts

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