Help us shape the future of Go! Take the 2026 Go Developer Survey

generic

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package generic is the format of generic repositories: files without package metadata, so nothing is indexed. Every other format embeds its Handler for the deploy policy that applies to every package type (decision 0032).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBlackedOut

func CheckBlackedOut(c repo.Config, path string) error

CheckBlackedOut refuses any write to, or download from, a blacked-out repository. Status and wording are Artifactory's BlackedOutException, which keeps RepoRejectException's default 404 for both (Artifactory OSS 6.20, RealRepoBase.assertValidPath). A format overriding Admit checks this first, and its own policies (Maven's snapshot handling) before CheckPatterns, in Artifactory's order.

func CheckDownload

func CheckDownload(c repo.Config, path string, folder bool) error

CheckDownload refuses what Artifactory refuses before it looks for the item a download names, whether or not it exists, and for an administrator too (DbLocalRepo.checkDownloadIsAllowed calls RealRepoBase.assertValidPath with downloadRequest set, ahead of the read permission check):

  • any path of a blacked-out repository, 404;
  • a path c's include and exclude patterns reject, 404 with IncludeExcludeException's message.

path is the one Artifactory checks: the archive of an archive entry and the file a checksum sidecar describes (RepoBase.accepts). folder is whether the request named a folder, which in Artifactory is a trailing slash (RepoPathImpl). The root is always accepted.

A virtual repository has no blackedOut (only RealRepoDescriptor carries it), and its own patterns refusing the path leave it no member to search (VirtualRepoDownloadStrategy.getInfoFromSearchableRepositories), which it answers 404 with that message.

func CheckPatterns

func CheckPatterns(c repo.Config, path string) error

CheckPatterns refuses a file path outside c's includesPattern or inside its excludesPattern: 409 for a write in Artifactory's IncludeExcludeException, which a download answers 404 (CheckDownload).

Types

type Handler

type Handler struct{}

Handler implements format.Handler for generic content.

func (Handler) Admit

Admit refuses writes to a blacked-out repository and to paths its include and exclude patterns reject, as Artifactory does for every package type.

func (Handler) Classify

func (Handler) Classify(repo.Config, string) format.Class

Classify reports every generic file as unique content.

func (Handler) Deleted

Deleted does nothing.

func (Handler) Deleting

Deleting does nothing.

func (Handler) Deployed

Deployed does nothing: a generic file belongs to no package.

Jump to

Keyboard shortcuts

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