config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package config loads the application configuration described in docs/operations/configuration-reference.md and decision record 0009.

The precedence is flag, then environment, then file, then default. The file is strict YAML: an unknown key is an error rather than a silently ignored typo, because a misspelt storage key would otherwise start the server on the wrong backend without any warning.

Index

Constants

View Source
const (
	AzureSharedKey        = "shared_key"
	AzureSAS              = "sas"
	AzureConnectionString = "connection_string"
	AzureDefault          = "default"
	AzureManagedIdentity  = "managed_identity"
	AzureWorkloadIdentity = "workload_identity"
)

Azure credential kinds.

View Source
const (
	DefaultListen        = ":8081"
	DefaultDataDir       = "./data"
	DefaultCompatVersion = "7.155.0"
	DefaultDriver        = "sqlite"
	DefaultBlobBackend   = "fs"
	DefaultLogLevel      = "info"
	DefaultLogFormat     = "json"
	// DefaultRedirectMinSize matches Artifactory's self-hosted 1 MB: below
	// it a redirect costs the client more than the bytes it saves.
	DefaultRedirectMinSize ByteSize = 1 << 20
	// DefaultRedirectTTL covers a client's retries and the later parts of a
	// split download, which Artifactory's 30 seconds do not (decision 0029).
	DefaultRedirectTTL = 5 * time.Minute

	// DefaultFolderMaxConcurrent is Artifactory's "Max Parallel Folder
	// Downloads" default (folderDownloadConfig.maxConcurrentRequests).
	DefaultFolderMaxConcurrent = 10
	// DefaultAQLMaxResults is the cap JFrog SaaS sets with
	// aql.search.query.max.limit; self-managed Artifactory has none (DV-030).
	DefaultAQLMaxResults = 500000
	// DefaultAQLScanFactor reads no extra rows for non-admin filtering, the
	// default of artifactory.aql.query.non.admin.scan.factor.
	DefaultAQLScanFactor = 1
	// DefaultAQLQueryTimeout and DefaultAQLStreamedTimeout are the defaults
	// of artifactory.aql.query.timeout.seconds (900) and
	// artifactory.aql.streamed.query.timeout (7200).
	DefaultAQLQueryTimeout    = 15 * time.Minute
	DefaultAQLStreamedTimeout = 2 * time.Hour
	// DefaultUserQueryLimit is artifactory.search.userQueryLimit's default.
	DefaultUserQueryLimit = 1000
	// The persistent work queue's defaults (decision 0033).
	DefaultWorkWorkers     = 4
	DefaultWorkLease       = 2 * time.Minute
	DefaultWorkMaxAttempts = 10
	// DefaultNPMMaxPublishSize is decision 0034's cap on an npm publish
	// body. The body carries the tarball in base64, a third larger than the
	// tarball itself.
	DefaultNPMMaxPublishSize ByteSize = 1 << 30
	// DefaultGlobalEnvironmentLimit is Access's environments.global-limit
	// default; it must match roles.DefaultGlobalEnvironmentLimit.
	DefaultGlobalEnvironmentLimit = 10
	// DefaultNPMLoginTokenExpiry is the 30 days a token from npm login lasts
	// on 7.x (KB 000006713: 2592000 s). An hourly login would be unusable.
	DefaultNPMLoginTokenExpiry = 30 * 24 * time.Hour
)

Defaults that the reference documents.

View Source
const DefaultMavenSnapshotCleanupInterval = 5 * time.Minute

DefaultMavenSnapshotCleanupInterval is how often Artifactory 7.x's background process deletes the unique snapshots over a repository's maxUniqueSnapshots: "every 5 minutes" (JFrog KB, "How does the max unique snapshots parameter work", 2025-05-15; decision 0036).

View Source
const DefaultNuGetSnapshotCleanupInterval = 5 * time.Minute

DefaultNuGetSnapshotCleanupInterval is how often Artifactory 7.x's background process deletes the unique snapshots over a repository's maxUniqueSnapshots, NuGet's among them: "every 5 minutes" (JFrog KB 000005403; decision 0038).

View Source
const EnvPrefix = "ARTIFACTWEAVE_"

EnvPrefix is prepended to every environment key. Nested keys join their segments with an underscore, so `database.dsn` is ARTIFACTWEAVE_DATABASE_DSN.

Variables

View Source
var (
	ErrUnknownKey    = errors.New("config: unknown configuration key")
	ErrInvalidValue  = errors.New("config: invalid configuration value")
	ErrUnknownDriver = errors.New("config: unknown database driver")
	ErrMissingDSN    = errors.New("config: database.dsn is required for postgres")
	ErrUnknownBlob   = errors.New("config: unknown blob backend")
	ErrMissingBucket = errors.New("config: a bucket is required for this blob backend")
	ErrMissingValue  = errors.New("config: a required configuration value is missing")
	ErrBadListen     = errors.New("config: listen is not a host:port address")
	ErrBadBaseURL    = errors.New("config: base_url must be an absolute http or https url")
	ErrMissingKey    = errors.New("config: master_key is required (set ARTIFACTWEAVE_MASTER_KEY)")
)

Sentinel errors for Validate; wrap them with context.

Functions

func OSEnv

func OSEnv(name string) (string, bool)

OSEnv adapts os.LookupEnv for LoadOptions.Env.

Types

type AQL

type AQL struct {
	// MaxResults caps the rows of every query, its own limit included; zero
	// means no cap.
	MaxResults int `yaml:"max_results"`
	// NonAdminScanFactor multiplies a non-admin query's limit to read
	// enough rows that the limit is still met once unreadable rows are
	// filtered out. A request's scan-factor header overrides it.
	NonAdminScanFactor int `yaml:"non_admin_scan_factor"`
}

AQL limits POST /api/search/aql (decision 0012).

type AQLTimeout

type AQLTimeout struct {
	// Query is Artifactory's artifactory.aql.query.timeout.seconds.
	Query time.Duration `yaml:"query"`
	// Streamed applies to a request with a stream: true header, as
	// Artifactory's artifactory.aql.streamed.query.timeout does.
	Streamed time.Duration `yaml:"streamed"`
}

AQLTimeout bounds how long POST /api/search/aql reads the database (decision 0012). A query that runs longer is cancelled in the database and answers 408. Zero means no timeout.

type Blob

type Blob struct {
	BlobBackend `yaml:",inline"`
	// Stores are named stores, the members a mirror chooses from.
	Stores map[string]BlobStore `yaml:"stores"`
	Mirror BlobMirror           `yaml:"mirror"`
}

Blob selects one blob store: the hot store (blob) or the archive tier (cold_blob). Backend is fs, s3, gcs or azure for a single store, or mirror to keep every blob in several of the named Stores (decision 0028).

type BlobAzure

type BlobAzure struct {
	Account   string `yaml:"account"`
	Endpoint  string `yaml:"endpoint"`
	Container string `yaml:"container"`
	Prefix    string `yaml:"prefix"`
	// Credential is shared_key, sas, connection_string, default (the Azure
	// SDK's default chain), managed_identity or workload_identity. Empty
	// picks connection_string, shared_key or sas when that secret is set,
	// otherwise default.
	Credential              string   `yaml:"credential"`
	AccountKey              string   `yaml:"account_key"`
	SASToken                string   `yaml:"sas_token"`
	ConnectionString        string   `yaml:"connection_string"`
	ManagedIdentityClientID string   `yaml:"managed_identity_client_id"`
	PartSize                ByteSize `yaml:"part_size"`
	CopyRangeSize           ByteSize `yaml:"copy_range_size"`
	Concurrency             int      `yaml:"concurrency"`
	// CDN is a CDN in front of the container (decision 0029).
	CDN BlobAzureCDN `yaml:"cdn"`
}

BlobAzure is the Azure Blob Storage backend (decision 0027). AccountKey, SASToken and ConnectionString are secrets: prefer their environment variables to the file, and they are redacted from every summary.

func (BlobAzure) EffectiveCredential

func (a BlobAzure) EffectiveCredential() string

EffectiveCredential is Credential, or the kind the configured secrets imply when it is empty.

type BlobAzureCDN

type BlobAzureCDN struct {
	FrontDoor FrontDoor `yaml:"front_door"`
}

BlobAzureCDN is the CDN in front of an azure store.

type BlobBackend

type BlobBackend struct {
	Backend string    `yaml:"backend"`
	FS      BlobFS    `yaml:"fs"`
	S3      BlobS3    `yaml:"s3"`
	GCS     BlobGCS   `yaml:"gcs"`
	Azure   BlobAzure `yaml:"azure"`
}

BlobBackend is one store's backend and its settings.

type BlobFS

type BlobFS struct {
	Root string `yaml:"root"`
}

BlobFS is the local disk backend.

type BlobGCS

type BlobGCS struct {
	Bucket          string `yaml:"bucket"`
	Prefix          string `yaml:"prefix"`
	Endpoint        string `yaml:"endpoint"`
	CredentialsFile string `yaml:"credentials_file"`
	// GoogleAccessID is the service account that signs download URLs when
	// the credentials alone do not name one.
	GoogleAccessID string   `yaml:"google_access_id"`
	PartSize       ByteSize `yaml:"part_size"`
	// CDN is a CDN in front of the bucket (decision 0029).
	CDN BlobGCSCDN `yaml:"cdn"`
}

BlobGCS is the Google Cloud Storage backend (decision 0027). Credentials are Application Default Credentials unless CredentialsFile names a service-account key file.

type BlobGCSCDN

type BlobGCSCDN struct {
	CloudCDN CloudCDN `yaml:"cloud_cdn"`
}

BlobGCSCDN is the CDN in front of a gcs store.

type BlobMirror

type BlobMirror struct {
	// Members names the stores that hold copies.
	Members []string `yaml:"members"`
	// Redundancy is the number of copies of each blob; zero means every
	// member.
	Redundancy int `yaml:"redundancy"`
	// WriteQuorum is how many copies must be stored before an upload
	// succeeds; zero means Redundancy-1 (at least 1), so one member down
	// does not stop uploads.
	WriteQuorum int `yaml:"write_quorum"`
	// Zone is this instance's zone; members in it are preferred.
	Zone string `yaml:"zone"`
	// MemberTimeout bounds how long a member may finish after the quorum;
	// zero means 30s.
	MemberTimeout time.Duration `yaml:"member_timeout"`
}

BlobMirror is the mirror (decision 0028).

func (BlobMirror) Effective

func (m BlobMirror) Effective() (redundancy, quorum int)

Effective returns the redundancy and write quorum with their defaults applied for the configured members.

type BlobS3

type BlobS3 struct {
	Bucket    string `yaml:"bucket"`
	Prefix    string `yaml:"prefix"`
	Endpoint  string `yaml:"endpoint"`
	Region    string `yaml:"region"`
	PathStyle bool   `yaml:"path_style"`
	Profile   string `yaml:"profile"`
	// CDN is a CDN in front of the bucket (decision 0029).
	CDN BlobS3CDN `yaml:"cdn"`
}

BlobS3 is the S3-compatible backend. Credentials come from the AWS SDK's own chain, never from this file; Profile selects a named profile of the shared AWS configuration, so mirror members can use different accounts.

type BlobS3CDN

type BlobS3CDN struct {
	CloudFront CloudFront `yaml:"cloudfront"`
}

BlobS3CDN is the CDN in front of an s3 store.

type BlobStore

type BlobStore struct {
	BlobBackend `       yaml:",inline"`
	Zone        string `yaml:"zone"`
	// WriteEnabled false drains the store: no new copies, reads continue.
	// Unset means true.
	WriteEnabled *bool `yaml:"write_enabled"`
}

BlobStore is a named store: a backend with its zone (a region or site label the mirror orders reads and writes by) and whether it accepts new copies.

func (BlobStore) IsWritable

func (s BlobStore) IsWritable() bool

IsWritable reports whether the store accepts new copies.

type Bootstrap

type Bootstrap struct {
	AdminPassword string `yaml:"admin_password"`
	Descriptor    string `yaml:"descriptor"`
}

Bootstrap seeds the first start.

type Build

type Build struct {
	// BlockDuplicateEntries refuses a build-info publish whose module lists
	// one file twice, as Artifactory 7.x's
	// artifactory.build.block.duplicate.entries does by default.
	BlockDuplicateEntries bool `yaml:"block_duplicate_entries"`
}

Build holds the build-info settings (decision 0014).

type ByteSize

type ByteSize int64

ByteSize is a size in bytes, written in the file and the environment as a plain number of bytes or with a binary suffix: "512KiB", "16MiB", "1GiB".

func ParseByteSize

func ParseByteSize(s string) (ByteSize, error)

ParseByteSize reads a ByteSize.

func (ByteSize) MarshalYAML

func (b ByteSize) MarshalYAML() (any, error)

MarshalYAML renders the size as String does.

func (ByteSize) String

func (b ByteSize) String() string

String renders the size with the largest exact binary suffix.

func (*ByteSize) UnmarshalYAML

func (b *ByteSize) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML accepts a number of bytes or a suffixed string.

type CloudCDN

type CloudCDN struct {
	// Domain is the load balancer host, or an http(s) URL for a test edge.
	Domain string `yaml:"domain"`
	// KeyName names the signing key on the backend bucket.
	KeyName string `yaml:"key_name"`
	// KeyFile holds the 128-bit key, base64url, as gcloud reads it.
	KeyFile string `yaml:"key_file"`
	// PathPrefix is the path inside the bucket the load balancer serves at
	// its root.
	PathPrefix string `yaml:"path_prefix"`
}

CloudCDN is a Cloud CDN backend bucket whose bucket is the store's. The signing key stays in its file, which is read at start: the configuration holds only the path.

func (CloudCDN) IsEnabled

func (c CloudCDN) IsEnabled() bool

IsEnabled reports whether any field is set.

type CloudFront

type CloudFront struct {
	// Domain is the distribution host, or an http(s) URL for a test edge.
	Domain string `yaml:"domain"`
	// KeyPairID is the public key's ID in a trusted key group.
	KeyPairID string `yaml:"key_pair_id"`
	// PrivateKeyFile is the PEM key that signs URLs.
	PrivateKeyFile string `yaml:"private_key_file"`
	// Hash is sha1 (the default) or sha256.
	Hash string `yaml:"hash"`
	// PathPrefix is the distribution origin's path inside the bucket.
	PathPrefix string `yaml:"path_prefix"`
}

CloudFront is a CloudFront distribution whose origin is the bucket. The private key stays in its file, which is read at start: the configuration holds only the path.

func (CloudFront) IsEnabled

func (c CloudFront) IsEnabled() bool

IsEnabled reports whether any field is set.

type Compat

type Compat struct {
	ArtifactoryVersion string `yaml:"artifactory_version"`
}

Compat holds the Artifactory version string reported to clients. Clients gate features on it (decision record 0005), so it is configurable rather than derived from the build.

type Conda

type Conda struct {
	ShardsEnabled bool `yaml:"shards_enabled"`
}

Conda controls optional CEP-16 metadata; classic indexes remain available.

type Config

type Config struct {
	Listen   string   `yaml:"listen"`
	BaseURL  string   `yaml:"base_url"`
	DataDir  string   `yaml:"data_dir"`
	Compat   Compat   `yaml:"compat"`
	Database Database `yaml:"database"`
	Blob     Blob     `yaml:"blob"`
	// ColdBlob is the archive tier (decision 0024); an empty backend means
	// none is configured.
	ColdBlob  Blob   `yaml:"cold_blob"`
	MasterKey string `yaml:"master_key"`
	// MasterKeyPrevious is the key being rotated away from; it is kept
	// until `artifactweave keys rotate` has re-sealed every value.
	MasterKeyPrevious string           `yaml:"master_key_previous"`
	Bootstrap         Bootstrap        `yaml:"bootstrap"`
	Docker            Docker           `yaml:"docker"`
	Log               Log              `yaml:"log"`
	GC                GC               `yaml:"gc"`
	Download          Download         `yaml:"download"`
	Search            Search           `yaml:"search"`
	Work              Work             `yaml:"work"`
	Build             Build            `yaml:"build"`
	NPM               NPM              `yaml:"npm"`
	Token             Token            `yaml:"token"`
	Deploy            Deploy           `yaml:"deploy"`
	Environments      Environments     `yaml:"environments"`
	AQLTimeout        AQLTimeout       `yaml:"aql_timeout"`
	Maven             Maven            `yaml:"maven"`
	Helm              Helm             `yaml:"helm"`
	NuGet             NuGet            `yaml:"nuget"`
	HuggingFace       HuggingFace      `yaml:"huggingface"`
	Conda             Conda            `yaml:"conda"`
	PyPI              PyPI             `yaml:"pypi"`
	Cran              Cran             `yaml:"cran"`
	Remote            Remote           `yaml:"remote"`
	API               apilimit.Options `yaml:"api"`
}

Config is the application configuration. YAML tags are the file keys; the same dotted key names are used by the flag overlay and, upper-cased with the prefix, by the environment.

func Default

func Default() Config

Default returns the configuration with every documented default applied.

func Load

func Load(opts LoadOptions) (Config, error)

Load applies file, environment and flags over the defaults, in that order, and validates the result.

func (Config) BlobRoot

func (c Config) BlobRoot() string

BlobRoot is the explicit fs root or the blobs directory under DataDir.

func (Config) DatabaseDSN

func (c Config) DatabaseDSN() string

DatabaseDSN is the explicit DSN or, for sqlite, the file under DataDir.

func (Config) RequireMasterKey

func (c Config) RequireMasterKey() error

RequireMasterKey is the extra check `serve` makes; `config validate` and `migrate` run without the key so operators can check a file before the secret exists.

func (Config) SQLitePath

func (c Config) SQLitePath() string

SQLitePath is the SQLite database file: the explicit DSN without a "file:" prefix, or artifactweave.db under DataDir.

func (Config) String

func (c Config) String() string

String renders the configuration for logs and `config validate` with every secret replaced, so a pasted summary can never leak a key or password.

func (Config) Validate

func (c Config) Validate() error

Validate checks the values that would otherwise fail at first use.

type Cran

type Cran struct {
	// ArchiveMoverEnabled enables move-archives. It defaults off, matching
	// Artifactory's artifactory.cran.archiveMover.enabled system property.
	ArchiveMoverEnabled bool `yaml:"archive_mover_enabled"`
}

Cran controls the legacy CRAN archive migration operation.

type Database

type Database struct {
	Driver string `yaml:"driver"`
	DSN    string `yaml:"dsn"`
}

Database selects the metadata store.

type Deploy

type Deploy struct {
	// EnforceIdenticalChecksumDeploy makes a checksum deploy over a file
	// with the same content need the delete permission, as Artifactory
	// 7.x's enforce.permission.check.on.identical.checksum.deploy does. Off
	// by default, as there, so that a CI re-run of jf rt u by a user who may
	// deploy but not delete succeeds.
	EnforceIdenticalChecksumDeploy bool `yaml:"enforce_permission_check_on_identical_checksum_deploy"`
}

Deploy holds the deploy settings.

type Docker

type Docker struct {
	// SubdomainMatch adds the subdomain method to repository-path routing:
	// <repo>.<base_url host>/v2/<image> addresses an image in repo. It needs
	// base_url, whose host the repository subdomains sit under.
	SubdomainMatch bool `yaml:"subdomain_match"`
}

Docker holds the Docker access-method options.

type Download

type Download struct {
	Redirect Redirect       `yaml:"redirect"`
	Folder   FolderDownload `yaml:"folder"`
}

Download holds how downloads are served.

type Environments

type Environments struct {
	// GlobalLimit caps the global environments, DEV and PROD included, as
	// Access's environments.global-limit does; creating one more answers
	// 400.
	GlobalLimit int `yaml:"global_limit"`
}

Environments holds the environment settings.

type FolderDownload

type FolderDownload struct {
	// MaxConcurrentRequests is how many folder downloads may run at once on
	// this node; one more answers 400 until one finishes.
	MaxConcurrentRequests int `yaml:"max_concurrent_requests"`
}

FolderDownload bounds folder archive downloads. Whether they are on, and how large they may be, is the folder download setting in the store.

type FrontDoor

type FrontDoor struct {
	// Endpoint is the endpoint host, or an http(s) URL for a test edge.
	Endpoint string `yaml:"endpoint"`
	// PathPrefix is the route's origin path inside the account, starting
	// with the container.
	PathPrefix string `yaml:"path_prefix"`
}

FrontDoor is an Azure Front Door endpoint whose origin is the storage account. Front Door checks no signature: the store signs a read SAS and Front Door passes it to storage, so the store's credential must be one that signs (not sas).

func (FrontDoor) IsEnabled

func (c FrontDoor) IsEnabled() bool

IsEnabled reports whether any field is set.

type GC

type GC struct {
	// Interval is the time between scheduled passes.
	Interval time.Duration `yaml:"interval"`
	// GracePeriod is how long unreferenced content is kept before it is
	// deleted. It must outlast the slowest upload: content is written before
	// the reference that keeps it.
	GracePeriod time.Duration `yaml:"grace_period"`
}

GC schedules garbage collection (decision 0010). Zero values mean the defaults: a pass every four hours, as Artifactory schedules it, and an hour's grace.

type Helm

type Helm struct {
	// RelativeURLs serves chart paths relative to the repository URL. It
	// defaults on, matching Artifactory releases after November 2024.
	RelativeURLs bool `yaml:"relative_urls"`
}

Helm controls the classic Helm repository protocol (decision 0039).

type HuggingFace

type HuggingFace struct {
	XetEnabled bool `yaml:"xet_enabled"`
}

HuggingFace controls the opt-in native Xet transfer protocol.

type LoadOptions

type LoadOptions struct {
	// File is the YAML path; empty means no file.
	File string
	// Env looks up an environment variable; nil means no environment.
	Env func(string) (string, bool)
	// Flags maps dotted keys (for example "database.dsn") to values given on
	// the command line. Only keys the caller actually set belong here.
	Flags map[string]string
}

LoadOptions are the inputs to Load. Env and Flags are injected so tests never read the process environment.

type Log

type Log struct {
	Level  string `yaml:"level"`
	Format string `yaml:"format"`
}

Log holds slog settings.

type Maven

type Maven struct {
	// SnapshotCleanupInterval is how often each node runs the
	// maxUniqueSnapshots cleanups that deploys have marked in the work
	// queue (maven.snapshot_cleanup_interval).
	SnapshotCleanupInterval time.Duration `yaml:"snapshot_cleanup_interval"`
}

Maven holds the Maven, Gradle, Ivy and SBT repositories' options (decision 0036).

type NPM

type NPM struct {
	NPMLogin `yaml:",inline"`
	NPMTag   `yaml:",inline"`
	NPMPath  `yaml:",inline"`
	// MaxPublishSize is the largest npm publish request accepted; a larger
	// one answers 413.
	MaxPublishSize ByteSize `yaml:"max_publish_size"`
}

NPM holds the npm registry's options (decision 0034).

type NPMLogin

type NPMLogin struct {
	// LoginTokenExpiry is how long a token from npm login lasts. 7.x sets it
	// only with the global artifactory.artifactory.tokens.expiration.timeSecs.
	LoginTokenExpiry time.Duration `yaml:"login_token_expiry"`
}

NPMLogin holds npm's legacy login options (decision 0034).

type NPMPath

type NPMPath struct {
	// EnforcePath refuses the upload of a package tarball whose file name
	// is not the one its package.json gives, in every npm local
	// repository, as 7.x's global artifactory.npm.enforce.path does. Off
	// by default, as there.
	EnforcePath bool `yaml:"enforce_path"`
}

NPMPath holds the npm format's upload path option (decision 0034).

type NPMTag

type NPMTag struct {
	// TagLatestByPublish gives latest to the version deployed last rather
	// than the highest, as 7.x's global
	// artifactory.npm.tag.tagLatestByPublish does. Off by default, as
	// there.
	TagLatestByPublish bool `yaml:"tag_latest_by_publish"`
}

NPMTag holds the npm format's dist-tag option (decision 0034).

type NuGet

type NuGet struct {
	// SnapshotCleanupInterval is how often each node runs the
	// maxUniqueSnapshots cleanups that pre-release pushes have marked in
	// the work queue (nuget.snapshot_cleanup_interval).
	SnapshotCleanupInterval time.Duration `yaml:"snapshot_cleanup_interval"`
}

NuGet holds the NuGet repositories' options (decision 0038).

type PyPI

type PyPI struct {
	// EnforceLayout refuses the upload of a distribution whose file name
	// does not begin with its metadata's Name and Version, as
	// artifactory.pypi.enforce.layout does.
	EnforceLayout bool `yaml:"enforce_layout"`
	// EnforceNamingNormalization refuses the upload of a distribution
	// whose file name's name segment holds a "-", as
	// artifactory.pypi.enforce.naming.normalization does.
	EnforceNamingNormalization bool `yaml:"enforce_naming_normalization"`
	// SimpleJSON answers the simple index in PEP 691 JSON to a client that
	// asks for it, as "Enable simple json format" does from 7.146.7.
	SimpleJSON bool `yaml:"simple_json"`
	// CoreMetadata advertises and serves the wheels' core metadata files
	// (PEP 658), as the system property behind "Fast Dependency
	// Resolution" does (RTFACT-31470).
	CoreMetadata bool `yaml:"core_metadata"`
}

PyPI holds the PyPI repositories' options (decision 0037). Each is server-wide, as its 7.x counterpart is a system property or a global setting with no field on the repository, and each is off by default, as there.

type Redirect

type Redirect struct {
	// MinSize is the smallest file that redirects; smaller files stream.
	MinSize ByteSize `yaml:"min_size"`
	// TTL is the least time a signed URL stays valid once handed out.
	TTL time.Duration `yaml:"ttl"`
}

Redirect tunes downloadRedirect and cdnRedirect (decision 0029).

type Remote

type Remote struct {
	AllowedPrivateOrigins []string `yaml:"allowed_private_origins"`
}

Remote supplies exact operator-approved private source origins. Repository URL patterns still independently authorize each archive URL.

type Search struct {
	AQL AQL `yaml:"aql"`
	// UserQueryLimit caps the results of a GET search for anonymous
	// callers, and for every non-admin unless LimitAnonymousUsersOnly; zero
	// means no cap. search.aql.max_results caps every caller's.
	UserQueryLimit int `yaml:"user_query_limit"`
	// LimitAnonymousUsersOnly spares signed-in users UserQueryLimit, as
	// Artifactory's artifactory.search.limitAnonymousUsersOnly does by
	// default.
	LimitAnonymousUsersOnly bool `yaml:"limit_anonymous_users_only"`
}

Search holds the search limits.

type Token

type Token struct {
	// AllowBasicAuth lets a user name and password sent with HTTP Basic
	// create tokens through POST /access/api/v1/tokens. Off by default, as
	// Artifactory 7.x ships token.allow-basic-auth ("Enable Token Generation
	// via API"): a token outlives a change of the password that minted it,
	// so a leaked password would otherwise leave credentials behind.
	AllowBasicAuth bool `yaml:"allow_basic_auth"`
}

Token holds the access token settings (decision 0005).

type Work

type Work struct {
	// Workers is how many work items run at once on this node.
	Workers int `yaml:"workers"`
	// Lease is how long a run holds its item before another node may take
	// it over; a running item's lease is renewed every half lease.
	Lease time.Duration `yaml:"lease"`
	// MaxAttempts is how many runs an item gets before it is parked.
	MaxAttempts int `yaml:"max_attempts"`
}

Work sizes the persistent work queue (decision 0033), which runs derived work such as package metadata after the change that needs it.

Jump to

Keyboard shortcuts

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