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 ¶
- func CheckBlackedOut(c repo.Config, path string) error
- func CheckDownload(c repo.Config, path string, folder bool) error
- func CheckPatterns(c repo.Config, path string) error
- type Handler
- func (Handler) Admit(_ context.Context, _ format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Classify(repo.Config, string) format.Class
- func (Handler) Deleted(context.Context, format.Env, repo.Config, []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (Handler) Deployed(context.Context, format.Env, repo.Config, types.Item) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBlackedOut ¶
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 ¶
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.
Types ¶
type Handler ¶
type Handler struct{}
Handler implements format.Handler for generic content.
func (Handler) Admit ¶
func (Handler) Admit( _ context.Context, _ format.Env, c repo.Config, w format.Write, ) (format.Write, error)
Admit refuses writes to a blacked-out repository and to paths its include and exclude patterns reject, as Artifactory does for every package type.