Documentation
¶
Overview ¶
Package conan owns Conan's on-disk revision layout and write policy.
Index ¶
- Constants
- func Component(s string) bool
- func Files(ctx context.Context, st store.Store, c repo.Config, folder string) ([]types.Item, error)
- func IsNative(ctx context.Context) bool
- func Native(ctx context.Context) context.Context
- func SafeFile(name string) bool
- func Serves(t repo.PackageType) bool
- type FilePath
- type Handler
- func (h Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (h Handler) Deleted(ctx context.Context, env format.Env, c repo.Config, removed []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (h Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- type Reference
Constants ¶
const Manifest = "conanmanifest.txt"
Variables ¶
This section is empty.
Functions ¶
func Component ¶
Component rejects traversal and control characters before a protocol segment can become an item path. Conan references do not contain slashes.
func Files ¶
func Files( ctx context.Context, st store.Store, c repo.Config, folder string, ) ([]types.Item, error)
Files walks one storage folder with bounded keyset pagination. The caller must filter by its principal before returning any name or metadata.
func Native ¶
Native marks a write that entered through /api/conan. A generic item PUT cannot claim a Conan revision simply by choosing its storage path.
func SafeFile ¶
SafeFile permits Conan's metadata subfolders but no empty, dot, encoded separator or exceptionally long path component.
func Serves ¶
func Serves(t repo.PackageType) bool
Types ¶
type FilePath ¶
FilePath is the item-tree interpretation of a native Conan file URL.
func ParseStored ¶
ParseStored recognizes the documented Artifactory conan-default layout: user/name/version/channel/recipe-revision/{export/file or package/id/package-revision/file}. It is deliberately independent of the HTTP route so restore and reindex use the same identity rules.
type Handler ¶
Handler keeps the common package index tied to committed Conan manifests. Files uploaded before a manifest are invisible to search and resolution; the Conan client uploads the manifest last for each revision.
type Reference ¶
type Reference struct {
Name, Version, User, Channel, Revision string
}
Reference is the Conan identity of a recipe. Missing user and channel are represented by underscores on the wire, as the Conan client does.