Documentation
¶
Index ¶
- Constants
- func RepositoryToResponse(r *models.Repository) responses.RepositoryResponse
- type AIHandler
- type AdminAIHandler
- type AdminAuditHandler
- type AdminGPGHandler
- type AdminGroupsHandler
- type AdminPermissionsHandler
- type AdminSSOHandler
- type AdminStorageHandler
- type AdminTokensHandler
- type AdminUsersHandler
- type AuthHandler
- type BackupHandler
- type BundlesHandler
- type CleanupHandler
- type CleanupRunner
- type CompletePresignedUploadResponse
- type CreatePresignedUploadRequest
- type CreatePresignedUploadResponse
- type DebUploadHandler
- type DeltaHandler
- type DockerGCHandler
- type DockerGCRunner
- type ErrorResponse
- type HTTPServer
- func (s *HTTPServer) AddMiddleware(middleware func(http.Handler) http.Handler)
- func (s *HTTPServer) EnableTLS(certFile, keyFile string)
- func (s *HTTPServer) GetRouter() chi.Router
- func (s *HTTPServer) ServeErrors() <-chan error
- func (s *HTTPServer) SetTimeouts(readTimeout, writeTimeout, readHeaderTimeout time.Duration)
- func (s *HTTPServer) Start(ctx context.Context) error
- func (s *HTTPServer) Stop(ctx context.Context) error
- type LicenseHandler
- type MavenUploadHandler
- type NPMUploadHandler
- func (h *NPMUploadHandler) HandlePublish(w http.ResponseWriter, r *http.Request)
- func (h *NPMUploadHandler) Register(router chi.Router)
- func (h *NPMUploadHandler) RegisterRepoRoutes(r chi.Router)
- func (h *NPMUploadHandler) SetNPMWorker(w *worker.NPMMetadataWorker)
- func (h *NPMUploadHandler) SetPublisher(p webhook.Publisher)
- type OIDCHandler
- type OpenAPIHandler
- type OrgsHandler
- type PresignedUploadHandler
- type PropertiesHandler
- type QuotasHandler
- type RPMUploadHandler
- type RepositoriesHandler
- type Response
- type SAMLHandler
- type SBOMHandler
- type SecretsHandler
- type SelfTokensHandler
- type SystemInfoHandler
- type TrashHandler
- func (h *TrashHandler) RegisterAuthed(r chi.Router)
- func (h *TrashHandler) WaitBackground()
- func (h *TrashHandler) WithBlobStore(store storage.BlobStore) *TrashHandler
- func (h *TrashHandler) WithPublisher(p webhook.Publisher) *TrashHandler
- func (h *TrashHandler) WithRegenerator(r TrashRegenerator) *TrashHandler
- type TrashRegenerator
- type VulnHandler
- type WebhooksHandler
Constants ¶
const MaxMavenUploadBytes int64 = 1 << 30 // 1 GiB
const MaxNPMUploadBytes int64 = 200 << 20
Variables ¶
This section is empty.
Functions ¶
func RepositoryToResponse ¶ added in v0.3.0
func RepositoryToResponse(r *models.Repository) responses.RepositoryResponse
RepositoryToResponse converts a repository to its public API shape. It never includes upstream credentials; the MCP server reuses it.
Types ¶
type AIHandler ¶
type AIHandler struct {
// contains filtered or unexported fields
}
AIHandler handles AI analysis REST endpoints.
type AdminAIHandler ¶
type AdminAIHandler struct {
// contains filtered or unexported fields
}
func NewAdminAIHandler ¶
func (*AdminAIHandler) Register ¶
func (h *AdminAIHandler) Register(r chi.Router)
type AdminAuditHandler ¶
type AdminAuditHandler struct {
// contains filtered or unexported fields
}
func NewAdminAuditHandler ¶
func (*AdminAuditHandler) Register ¶
func (h *AdminAuditHandler) Register(r chi.Router)
type AdminGPGHandler ¶
type AdminGPGHandler struct {
// contains filtered or unexported fields
}
func NewAdminGPGHandler ¶
func (*AdminGPGHandler) Register ¶
func (h *AdminGPGHandler) Register(r chi.Router)
type AdminGroupsHandler ¶
type AdminGroupsHandler struct {
// contains filtered or unexported fields
}
func NewAdminGroupsHandler ¶
func (*AdminGroupsHandler) Register ¶
func (h *AdminGroupsHandler) Register(r chi.Router)
type AdminPermissionsHandler ¶
type AdminPermissionsHandler struct {
// contains filtered or unexported fields
}
func (*AdminPermissionsHandler) Register ¶
func (h *AdminPermissionsHandler) Register(r chi.Router)
type AdminSSOHandler ¶
type AdminSSOHandler struct {
// contains filtered or unexported fields
}
func NewAdminSSOHandler ¶
func (*AdminSSOHandler) RegisterAuthed ¶
func (h *AdminSSOHandler) RegisterAuthed(authed chi.Router)
func (*AdminSSOHandler) RegisterPublic ¶
func (h *AdminSSOHandler) RegisterPublic(r chi.Router)
type AdminStorageHandler ¶
type AdminStorageHandler struct {
// contains filtered or unexported fields
}
func NewAdminStorageHandler ¶
func (*AdminStorageHandler) Register ¶
func (h *AdminStorageHandler) Register(r chi.Router)
type AdminTokensHandler ¶
type AdminTokensHandler struct {
// contains filtered or unexported fields
}
func NewAdminTokensHandler ¶
func (*AdminTokensHandler) Register ¶
func (h *AdminTokensHandler) Register(r chi.Router)
type AdminUsersHandler ¶
type AdminUsersHandler struct {
// contains filtered or unexported fields
}
func NewAdminUsersHandler ¶
func (*AdminUsersHandler) Register ¶
func (h *AdminUsersHandler) Register(r chi.Router)
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(db database.Database, log *logger.Logger, evaluator *auth.Evaluator, trustedProxies *middleware.TrustedProxies) *AuthHandler
func (*AuthHandler) RegisterAuthed ¶
func (h *AuthHandler) RegisterAuthed(r chi.Router)
func (*AuthHandler) RegisterPublic ¶
func (h *AuthHandler) RegisterPublic(r chi.Router)
type BackupHandler ¶
type BackupHandler struct {
// contains filtered or unexported fields
}
func NewBackupHandler ¶
func (*BackupHandler) RegisterAuthed ¶
func (h *BackupHandler) RegisterAuthed(r chi.Router)
type BundlesHandler ¶
type BundlesHandler struct {
// contains filtered or unexported fields
}
func NewBundlesHandler ¶
func (*BundlesHandler) RegisterAuthed ¶
func (h *BundlesHandler) RegisterAuthed(r chi.Router)
type CleanupHandler ¶
type CleanupHandler struct {
// contains filtered or unexported fields
}
func NewCleanupHandler ¶
func NewCleanupHandler(db database.Database, log *logger.Logger, evaluator *auth.Evaluator, runner CleanupRunner) *CleanupHandler
func (*CleanupHandler) RegisterAuthed ¶
func (h *CleanupHandler) RegisterAuthed(r chi.Router)
type CleanupRunner ¶ added in v0.2.0
CleanupRunner starts an immediate run of a cleanup policy. It is satisfied by *worker.CleanupWorker.
type CompletePresignedUploadResponse ¶ added in v0.5.0
type CompletePresignedUploadResponse struct {
ID string `json:"id"`
Path string `json:"path"`
SHA256 string `json:"sha256"`
Size int64 `json:"size"`
}
CompletePresignedUploadResponse mirrors the response of a raw PUT.
type CreatePresignedUploadRequest ¶ added in v0.5.0
type CreatePresignedUploadRequest struct {
Path string `json:"path"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
ContentType string `json:"content_type,omitempty"`
}
CreatePresignedUploadRequest is the body of POST /repositories/{name}/uploads.
type CreatePresignedUploadResponse ¶ added in v0.5.0
type CreatePresignedUploadResponse struct {
ID string `json:"id"`
// UploadURL accepts one PUT of exactly Size bytes. Do not log it: the
// query string is the credential.
UploadURL string `json:"upload_url"`
Method string `json:"method"`
// Headers must be sent with the PUT.
Headers map[string]string `json:"headers"`
ExpiresAt time.Time `json:"expires_at"`
}
CreatePresignedUploadResponse tells the client where and how to upload.
type DebUploadHandler ¶
type DebUploadHandler struct {
// contains filtered or unexported fields
}
func NewDebUploadHandler ¶
func (*DebUploadHandler) Register ¶
func (h *DebUploadHandler) Register(router chi.Router)
func (*DebUploadHandler) SetDebWorker ¶
func (h *DebUploadHandler) SetDebWorker(w *worker.DebMetadataWorker)
func (*DebUploadHandler) SetPublisher ¶ added in v0.2.0
func (h *DebUploadHandler) SetPublisher(p webhook.Publisher)
SetPublisher wires the webhook publisher used for artifact events.
type DeltaHandler ¶
type DeltaHandler struct {
// contains filtered or unexported fields
}
DeltaHandler handles package delta requests.
func NewDeltaHandler ¶
func NewDeltaHandler(log *logger.Logger, db database.Database, blobStore storage.BlobStore) *DeltaHandler
NewDeltaHandler creates a new DeltaHandler.
func (*DeltaHandler) Register ¶
func (h *DeltaHandler) Register(router chi.Router)
Register registers the delta routes on the given router.
type DockerGCHandler ¶ added in v0.4.0
type DockerGCHandler struct {
// contains filtered or unexported fields
}
DockerGCHandler serves the admin endpoint that runs Docker registry garbage collection (untagged manifests and the blobs only they referenced) on demand.
func NewDockerGCHandler ¶ added in v0.4.0
func NewDockerGCHandler(db database.Database, log *logger.Logger, evaluator *auth.Evaluator, runner DockerGCRunner) *DockerGCHandler
func (*DockerGCHandler) RegisterAuthed ¶ added in v0.4.0
func (h *DockerGCHandler) RegisterAuthed(r chi.Router)
type DockerGCRunner ¶ added in v0.4.0
type DockerGCRunner interface {
RunRepo(ctx context.Context, repo *models.Repository, opts worker.DockerGCOptions) (*worker.DockerGCReport, error)
DefaultGrace() time.Duration
}
DockerGCRunner runs Docker registry garbage collection. It is satisfied by *worker.DockerGCWorker.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
Code string `json:"code"`
Details string `json:"details,omitempty"`
}
ErrorResponse represents an error response.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer implements the Server interface.
func NewHTTPServer ¶
func NewHTTPServer(addr string, log *logger.Logger) *HTTPServer
NewHTTPServer creates a new HTTP server. Defaults favor never truncating large artifact transfers: no read/write timeout, with only header reads bounded (slowloris mitigation) until SetTimeouts overrides them from config.
func (*HTTPServer) AddMiddleware ¶
func (s *HTTPServer) AddMiddleware(middleware func(http.Handler) http.Handler)
AddMiddleware adds a middleware to the server.
func (*HTTPServer) EnableTLS ¶ added in v0.2.0
func (s *HTTPServer) EnableTLS(certFile, keyFile string)
EnableTLS makes Start serve HTTPS using the given certificate and key files.
func (*HTTPServer) GetRouter ¶
func (s *HTTPServer) GetRouter() chi.Router
GetRouter returns the underlying chi router.
func (*HTTPServer) ServeErrors ¶ added in v0.4.0
func (s *HTTPServer) ServeErrors() <-chan error
ServeErrors delivers the error that ended the accept loop unexpectedly (anything but a graceful Stop). The caller must treat it as fatal.
func (*HTTPServer) SetTimeouts ¶
func (s *HTTPServer) SetTimeouts(readTimeout, writeTimeout, readHeaderTimeout time.Duration)
SetTimeouts configures read, write, and read-header timeouts on the HTTP server. readTimeout/writeTimeout of 0 mean "no limit" (relevant for large artifact transfers); readHeaderTimeout should stay non-zero regardless — it bounds only the header-read phase, so it never truncates a body.
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start(ctx context.Context) error
Start binds the listen address and serves in the background. Everything that can be checked up front (the TLS key pair, the bind itself) fails here, so a misconfigured server never reports a successful start. A later failure of the accept loop is delivered on ServeErrors.
type LicenseHandler ¶
type LicenseHandler struct {
// contains filtered or unexported fields
}
func NewLicenseHandler ¶
func (*LicenseHandler) RegisterRoutes ¶
func (h *LicenseHandler) RegisterRoutes(authedRouter chi.Router)
type MavenUploadHandler ¶
type MavenUploadHandler struct {
// contains filtered or unexported fields
}
func NewMavenUploadHandler ¶
func (*MavenUploadHandler) Register ¶
func (h *MavenUploadHandler) Register(router chi.Router)
Register mounts PUT/DELETE using a true chi wildcard ("/*"), not a regexp param: chi's {name:regexp} params never span "/" (the tail delimiter defaults to '/', so the regexp is only ever tested against a single path segment), so {path:.*} can never match a multi-segment GAV path and silently 404s every real upload/delete.
func (*MavenUploadHandler) SetMavenWorker ¶
func (h *MavenUploadHandler) SetMavenWorker(w *worker.MavenMetadataWorker)
SetMavenWorker wires the debounced maven-metadata.xml regeneration worker. Call NotifyStale(repoID, groupID, artifactID) after each successful upload.
func (*MavenUploadHandler) SetPublisher ¶ added in v0.2.0
func (h *MavenUploadHandler) SetPublisher(p webhook.Publisher)
SetPublisher wires the webhook publisher for artifact.* events.
type NPMUploadHandler ¶
type NPMUploadHandler struct {
// contains filtered or unexported fields
}
func NewNPMUploadHandler ¶
func (*NPMUploadHandler) HandlePublish ¶ added in v0.2.0
func (h *NPMUploadHandler) HandlePublish(w http.ResponseWriter, r *http.Request)
HandlePublish serves an npm publish (or `-rev` unpublish) PUT. It is exported for routers that share PUT "/*" with another format.
func (*NPMUploadHandler) Register ¶
func (h *NPMUploadHandler) Register(router chi.Router)
Register mounts the publish/unpublish routes under /repos/{name} on a router that has no other /repos/{name} subrouter (tests). Production code shares the /repos/{name} subrouter with the other formats and calls RegisterRepoRoutes.
func (*NPMUploadHandler) RegisterRepoRoutes ¶ added in v0.2.0
func (h *NPMUploadHandler) RegisterRepoRoutes(r chi.Router)
RegisterRepoRoutes registers the routes relative to a /repos/{name} subrouter. They must live inside that subrouter: a sibling /repos/{repo}/* route is shadowed by the mount and every PUT/DELETE 404s.
func (*NPMUploadHandler) SetNPMWorker ¶
func (h *NPMUploadHandler) SetNPMWorker(w *worker.NPMMetadataWorker)
SetNPMWorker wires the debounced npm packument regeneration worker. Call NotifyStale(packageID) after each successful publish.
func (*NPMUploadHandler) SetPublisher ¶ added in v0.2.0
func (h *NPMUploadHandler) SetPublisher(p webhook.Publisher)
SetPublisher wires the webhook publisher used for artifact.uploaded and artifact.deleted events. It must be called before the handler serves requests.
type OIDCHandler ¶
type OIDCHandler struct {
// contains filtered or unexported fields
}
func NewOIDCHandler ¶
func (*OIDCHandler) RegisterPublic ¶
func (h *OIDCHandler) RegisterPublic(public chi.Router)
func (*OIDCHandler) WithTrustedProxies ¶ added in v0.2.0
func (h *OIDCHandler) WithTrustedProxies(tp *middleware.TrustedProxies) *OIDCHandler
WithTrustedProxies sets the reverse-proxy allowlist used to resolve the client IP recorded on new sessions. Without it the TCP peer address is used.
type OpenAPIHandler ¶
type OpenAPIHandler struct{}
func NewOpenAPIHandler ¶
func NewOpenAPIHandler() *OpenAPIHandler
func (*OpenAPIHandler) RegisterRoutes ¶
func (h *OpenAPIHandler) RegisterRoutes(router chi.Router)
type OrgsHandler ¶
type OrgsHandler struct {
// contains filtered or unexported fields
}
func NewOrgsHandler ¶
func NewOrgsHandler(db database.Database, log *logger.Logger) *OrgsHandler
func (*OrgsHandler) RegisterRoutes ¶
func (h *OrgsHandler) RegisterRoutes(r chi.Router)
type PresignedUploadHandler ¶ added in v0.5.0
PresignedUploadHandler implements client-direct uploads: the client PUTs the bytes straight to the object store using a short-lived presigned URL, then calls complete so the server can verify size and sha256 and record the artifact. Only raw hosted repositories are supported.
func NewPresignedUploadHandler ¶ added in v0.5.0
func NewPresignedUploadHandler(log *logger.Logger, db database.Database, blobStore storage.BlobStore, evaluator *auth.Evaluator, urlTTL time.Duration, maxPending int, reg *metrics.Registry, ) *PresignedUploadHandler
NewPresignedUploadHandler builds the handler. blobStore may or may not support staging uploads; an unsupported backend answers 501 without recording anything. maxPending caps one user's outstanding uploads (0 = unlimited).
func (*PresignedUploadHandler) Register ¶ added in v0.5.0
func (h *PresignedUploadHandler) Register(router chi.Router)
Register mounts the routes.
type PropertiesHandler ¶
type PropertiesHandler struct {
// contains filtered or unexported fields
}
func NewPropertiesHandler ¶
func NewPropertiesHandler(log *logger.Logger, db database.Database) *PropertiesHandler
func (*PropertiesHandler) RegisterRoutes ¶
func (h *PropertiesHandler) RegisterRoutes(r chi.Router, pathPrefix string)
type QuotasHandler ¶
type QuotasHandler struct {
// contains filtered or unexported fields
}
func NewQuotasHandler ¶
func (*QuotasHandler) RegisterRoutes ¶
func (h *QuotasHandler) RegisterRoutes(r chi.Router, pathPrefix string)
type RPMUploadHandler ¶
type RPMUploadHandler struct {
// contains filtered or unexported fields
}
func NewRPMUploadHandler ¶
func (*RPMUploadHandler) Register ¶
func (h *RPMUploadHandler) Register(router chi.Router)
func (*RPMUploadHandler) SetDebWorker ¶
func (h *RPMUploadHandler) SetDebWorker(w *worker.DebMetadataWorker)
func (*RPMUploadHandler) SetPublisher ¶ added in v0.2.0
func (h *RPMUploadHandler) SetPublisher(p webhook.Publisher)
SetPublisher wires the webhook publisher used for artifact events. It also covers the embedded deb handler that serves deb repositories on the same routes.
func (*RPMUploadHandler) SetRPMWorker ¶
func (h *RPMUploadHandler) SetRPMWorker(w *worker.RPMetadataWorker)
type RepositoriesHandler ¶
type RepositoriesHandler struct {
// contains filtered or unexported fields
}
func NewRepositoriesHandler ¶
func (*RepositoriesHandler) RegisterAuthed ¶
func (h *RepositoriesHandler) RegisterAuthed(r chi.Router)
func (*RepositoriesHandler) WaitBackground ¶ added in v0.2.0
func (h *RepositoriesHandler) WaitBackground()
WaitBackground blocks until background orphan-blob collections finish.
func (*RepositoriesHandler) WithBlobStore ¶ added in v0.2.0
func (h *RepositoriesHandler) WithBlobStore(store storage.BlobStore) *RepositoriesHandler
WithBlobStore enables the package download endpoint.
func (*RepositoriesHandler) WithPublisher ¶ added in v0.2.0
func (h *RepositoriesHandler) WithPublisher(p webhook.Publisher) *RepositoriesHandler
WithPublisher enables repository.created / repository.deleted webhook events.
type Response ¶
type Response struct {
Success bool `json:"success"`
Data any `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Code string `json:"code,omitempty"`
}
Response represents a standard API response.
type SAMLHandler ¶
type SAMLHandler struct {
// contains filtered or unexported fields
}
func NewSAMLHandler ¶
func (*SAMLHandler) RegisterPublic ¶
func (h *SAMLHandler) RegisterPublic(public chi.Router)
func (*SAMLHandler) WithTrustedProxies ¶ added in v0.2.0
func (h *SAMLHandler) WithTrustedProxies(tp *middleware.TrustedProxies) *SAMLHandler
WithTrustedProxies overrides the reverse-proxy allowlist (default: the configured server.trustedProxies) used to resolve the client IP recorded on new sessions.
type SBOMHandler ¶
type SBOMHandler struct {
// contains filtered or unexported fields
}
func NewSBOMHandler ¶
func (*SBOMHandler) RegisterAuthed ¶
func (h *SBOMHandler) RegisterAuthed(r chi.Router)
type SecretsHandler ¶
type SecretsHandler struct {
// contains filtered or unexported fields
}
func NewSecretsHandler ¶
func (*SecretsHandler) RegisterRoutes ¶
func (h *SecretsHandler) RegisterRoutes(authedRouter chi.Router, pathPrefix string)
type SelfTokensHandler ¶
type SelfTokensHandler struct {
// contains filtered or unexported fields
}
func NewSelfTokensHandler ¶
func (*SelfTokensHandler) Register ¶
func (h *SelfTokensHandler) Register(r chi.Router)
type SystemInfoHandler ¶
type SystemInfoHandler struct {
// contains filtered or unexported fields
}
func NewSystemInfoHandler ¶
func (*SystemInfoHandler) RegisterAuthed ¶ added in v0.2.0
func (h *SystemInfoHandler) RegisterAuthed(r chi.Router)
RegisterAuthed registers the detailed endpoint (behind the admin RBAC check).
func (*SystemInfoHandler) RegisterPublic ¶
func (h *SystemInfoHandler) RegisterPublic(r chi.Router)
RegisterPublic registers the unauthenticated, trimmed endpoint: version and an overall status only.
func (*SystemInfoHandler) ServeHTTP ¶
func (h *SystemInfoHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request)
type TrashHandler ¶ added in v0.5.0
type TrashHandler struct {
// contains filtered or unexported fields
}
TrashHandler serves the trash API: listing, restoring and purging soft-deleted packages and repositories.
The global routes (/api/v1/trash...) are admin only. The repository routes (/api/v1/repositories/{name}/trash...) need the repository-scoped `delete` permission and only ever touch items of that repository; emptying a repository's trash needs the repository-scoped `manage` permission.
func NewTrashHandler ¶ added in v0.5.0
func (*TrashHandler) RegisterAuthed ¶ added in v0.5.0
func (h *TrashHandler) RegisterAuthed(r chi.Router)
func (*TrashHandler) WaitBackground ¶ added in v0.5.0
func (h *TrashHandler) WaitBackground()
WaitBackground blocks until background orphan-blob collections finish.
func (*TrashHandler) WithBlobStore ¶ added in v0.5.0
func (h *TrashHandler) WithBlobStore(store storage.BlobStore) *TrashHandler
WithBlobStore enables freeing blobs when an item is purged.
func (*TrashHandler) WithPublisher ¶ added in v0.5.0
func (h *TrashHandler) WithPublisher(p webhook.Publisher) *TrashHandler
WithPublisher enables the artifact.restored/purged and repository.restored/purged events.
func (*TrashHandler) WithRegenerator ¶ added in v0.5.0
func (h *TrashHandler) WithRegenerator(r TrashRegenerator) *TrashHandler
WithRegenerator enables the metadata refresh after a restore.
type TrashRegenerator ¶ added in v0.5.0
type TrashRegenerator interface {
NotifyDebStale(repoID string)
NotifyRPMStale(repoID string)
NotifyMavenStale(repoID, groupID, artifactID string)
NotifyNPMStale(packageID string)
}
TrashRegenerator schedules the metadata refresh a restored item needs: a row that left the trash changes what the format's generated metadata lists, exactly like a fresh upload. Every method only enqueues work.
func NewWorkerRegenerator ¶ added in v0.5.0
func NewWorkerRegenerator(deb, rpm repoStaleNotifier, maven mavenStaleNotifier, npm npmStaleNotifier) TrashRegenerator
NewWorkerRegenerator builds the TrashRegenerator over the metadata workers constructed in main.go. Pass nil for a worker that is not running.
type VulnHandler ¶
type VulnHandler struct {
// contains filtered or unexported fields
}
VulnHandler handles vulnerability scanning endpoints.
func NewVulnHandler ¶
func NewVulnHandler(db database.Database, log *logger.Logger, evaluator *auth.Evaluator) *VulnHandler
NewVulnHandler creates a new vulnerability handler.
func (*VulnHandler) RegisterRoutes ¶
func (h *VulnHandler) RegisterRoutes(authedRouter chi.Router, pathPrefix string)
RegisterRoutes registers vulnerability scanning routes.
type WebhooksHandler ¶
type WebhooksHandler struct {
// contains filtered or unexported fields
}
func NewWebhooksHandler ¶
func NewWebhooksHandler(db database.Database, log *logger.Logger, evaluator *auth.Evaluator, dispatcher *webhook.Dispatcher) *WebhooksHandler
func (*WebhooksHandler) RegisterAuthed ¶
func (h *WebhooksHandler) RegisterAuthed(r chi.Router)
Source Files
¶
- admin_ai.go
- admin_audit.go
- admin_audit_cursor.go
- admin_gpg.go
- admin_groups.go
- admin_permissions.go
- admin_sso.go
- admin_storage.go
- admin_tokens.go
- admin_users.go
- ai.go
- auth_handlers.go
- auth_helpers.go
- backup.go
- bundles.go
- cleanup.go
- cookie.go
- delta.go
- docker_gc.go
- interfaces.go
- license.go
- openapi.go
- orgs.go
- presigned_uploads.go
- properties.go
- quotas.go
- repositories.go
- sbom.go
- scan_helpers.go
- secrets.go
- self_tokens.go
- server.go
- sso_oidc_handlers.go
- sso_saml_handlers.go
- system_info.go
- trash.go
- trash_regen.go
- upload_deb.go
- upload_maven.go
- upload_npm.go
- upload_npm_deprecate.go
- upload_rpm.go
- vuln.go
- webhooks.go