constants

package
v0.0.0-...-96442b9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package constants defines global constants and utility functions for the divekit CLI.

Index

Constants

View Source
const (
	// Default buffer size for reading/writing operations (64 KB)
	DefaultBufferSize = 64 * 1024

	// Maximum scanner buffer size (1 MB)
	MaxScannerBuffer = 1024 * 1024
)

Buffer Sizes for I/O Operations

View Source
const (
	// Root is the name of the CLI application
	Root = "divekit"

	// DivekitHomeEnvVar is the environment variable used to specify the divekit home directory
	DivekitHomeEnvVar = "DIVEKIT_HOME"

	// DivekitFolder is the name of the divekit configuration directory
	DivekitFolder = ".divekit"
	// CoordinationFolder holds write locks inside an origin. It sits next to
	// DivekitFolder so state cleanup cannot drop a lock inode a writer holds.
	CoordinationFolder = ".divekit-coordination"
	// UserCoordinationFolder avoids placing a resource's lock inside the
	// resource when a caller explicitly uses CoordinationFolder as its home.
	UserCoordinationFolder = ".divekit-user-coordination"
	// GUIWorkspaceConfigFile is the GUI workspace and access state kept in the
	// .divekit folder of the directory the GUI serves.
	GUIWorkspaceConfigFile = "gui-workspaces.json"
	// DistributionsFolder is the directory containing all distributions
	DistributionsFolder = "distributions"
	// TempIndividualizedFolder is the temporary directory for individualized content
	TempIndividualizedFolder = ".tmp-individualized"
	// ConfigFile is the name of the main configuration file
	ConfigFile = "config.json"
	// DivekitConfigName is the name of the divekit-specific configuration file
	DivekitConfigName = "divekit-config.json"
	// VariationConfigFile is the name of the variation configuration file
	VariationConfigFile = "variation.json"
	// IndividualizationConfigFile is the name of the individualization configuration file
	IndividualizationConfigFile = "individualization.json"
	// IndividualsFile is the name of the individuals configuration file
	IndividualsFile = "individuals.json"
	// RemotesConfigFile is the name of the remotes configuration file
	RemotesConfigFile = "remotes.json"
	// OperationJournalFile is the origin-local SQLite journal for shared writes.
	OperationJournalFile = "operation-journal.db"
	// LicenseFile is the name of the license file
	LicenseFile = "LICENSE"
	// ReadmeFile is the name of the readme file
	ReadmeFile = "README.md"
	// SeriesFile is the origin-level declaration of milestone series and their pass rules.
	SeriesFile = "series.json"
	// ResultsRecordFile is the distribution-scoped record of results per repository group
	// that a milestone series reads. It outlives the repositories of the distribution.
	ResultsRecordFile = "results.json"
	// MembersFile is the name of the members configuration file
	MembersFile = "members.json"
	// DivekitDbFile is the name of the central local SQLite database file.
	DivekitDbFile = "divekit.db"
	// LegacyIndexDbFile is the historic project-index database file name.
	LegacyIndexDbFile = "index.db"
	// IndexDbFile is kept for compatibility with older internal call sites.
	//
	// Deprecated: use DivekitDbFile for the central local database or
	// LegacyIndexDbFile when referring to the old index-only database.
	IndexDbFile = DivekitDbFile
	// GitLabCIFileName is the standard GitLab CI file in the repository root.
	GitLabCIFileName = ".gitlab-ci.yml"

	// DefaultBranch is the default git branch name for new projects
	DefaultBranch = "main"
	// DefaultAuthorName is the default author name for commits
	DefaultAuthorName = "Divekit"
	// DefaultAuthorEmail is the default author email for commits
	DefaultAuthorEmail = "divekit@git.nrw"
	// DefaultPermissions is the project role init proposes for students. Divekit
	// leaves GitLab's default branch protection in place, which lets only
	// maintainers push to the default branch, so a lower role cannot push.
	DefaultPermissions = "maintainer"
	// DefaultDistributionName is the initial distribution name suggested by init.
	DefaultDistributionName = "ST1-M1"
	// DefaultRepositoryNamePattern is the implicit repository name template for distributions.
	DefaultRepositoryNamePattern = "{{distribution}}-{{uuid}}"

	// DefaultTargetName is the canonical name of the primary work target.
	DefaultTargetName = "work"
	// LegacyDefaultTargetName is the historic primary target alias kept for backward compatibility.
	LegacyDefaultTargetName = "main"
	// LegacyCodeTargetAlias is the older user-facing alias for the primary work target.
	LegacyCodeTargetAlias = "code"

	// EvaluationTargetName is the canonical name of the evaluation target.
	EvaluationTargetName = "eval"
	// LegacyEvaluationTargetAlias is the historic evaluation target name kept for backward compatibility.
	LegacyEvaluationTargetAlias = "sandbox"
	// LegacyTestTargetName is the historic evaluation target alias kept for backward compatibility.
	LegacyTestTargetName = "test"
	// EvaluationPipelineDisplayName is the preferred singular label for the evaluation feature.
	EvaluationPipelineDisplayName = "Evaluation Pipeline"
	// EvaluationPipelineDisplayPluralName is the preferred plural label for the evaluation feature.
	EvaluationPipelineDisplayPluralName = "Evaluation Pipelines"
	// LegacyEvaluationPipelineConfigKey is the legacy persisted config key kept for backward compatibility.
	LegacyEvaluationPipelineConfigKey = "securePipeline"
	// EvaluationPipelineConfigKey is the canonical persisted config key.
	EvaluationPipelineConfigKey = "evaluationPipeline"

	// GroupLayoutModeLegacy keeps the legacy evaluation pipeline fallback behavior.
	GroupLayoutModeLegacy = "legacy"
	// GroupLayoutModeDistributionSubgroups creates per-distribution work/eval subgroups.
	GroupLayoutModeDistributionSubgroups = "distribution-subgroups"
	// DistributionStudentSubgroupName is the canonical subgroup for primary work repositories.
	DistributionStudentSubgroupName = "work"
	// LegacyDistributionMainSubgroupName is the historic subgroup name for primary repositories.
	LegacyDistributionMainSubgroupName = "main"
	// LegacyDistributionStudentSubgroupName is the older subgroup name for primary repositories.
	LegacyDistributionStudentSubgroupName = "student"
	// DistributionEvalSubgroupName is the canonical subgroup for evaluation repositories.
	DistributionEvalSubgroupName = "eval"

	// EvalSubgroupName is the canonical subgroup name created for evaluation fallback.
	EvalSubgroupName = "eval"

	// EvaluationPipelineDirName is the previous .divekit directory for evaluation pipeline assets.
	EvaluationPipelineDirName = "evaluation-pipeline"
	// LegacyEvaluationPipelineDirName is the older directory retained for backward compatibility.
	LegacyEvaluationPipelineDirName = "secure-pipeline"
	// EvaluationAuthoringDirName is the canonical origin-side directory for evaluation-pipeline authoring files.
	EvaluationAuthoringDirName = "eval-pipeline"
	// MainCIFileName is the canonical CI override file for work repositories.
	MainCIFileName = ".gitlab-ci_workrepo.yml"
	// LegacyMainCIFileName is the legacy CI override file retained for backward compatibility.
	LegacyMainCIFileName = ".gitlab-ci_mainrepo.yml"
	// EvaluationCIFileName is the canonical CI file for eval repositories.
	EvaluationCIFileName = ".gitlab-ci_evalrepo.yml"
	// LegacyEvaluationCIFileName is the legacy CI file retained for backward compatibility.
	LegacyEvaluationCIFileName = ".gitlab-ci_sandboxrepo.yml"
	// EvaluationPluginsConfigFile is the canonical origin-side eval plugin state file stored under .divekit.
	EvaluationPluginsConfigFile = EvaluationAuthoringDirName + "/plugins.json"
	// EvaluationWorkAuthoringDir is the origin-side target-root authoring directory for work repositories.
	EvaluationWorkAuthoringDir = ".divekit/" + EvaluationAuthoringDirName + "/work"
	// EvaluationEvalAuthoringDir is the origin-side target-root authoring directory for eval repositories.
	EvaluationEvalAuthoringDir = ".divekit/" + EvaluationAuthoringDirName + "/eval"
	// WorkCIOriginFile is the canonical origin-side CI file authored for work repositories.
	WorkCIOriginFile = EvaluationWorkAuthoringDir + "/" + GitLabCIFileName
	// EvalCIOriginFile is the canonical origin-side CI file authored for eval repositories.
	EvalCIOriginFile = EvaluationEvalAuthoringDir + "/" + GitLabCIFileName
	// WorkEvalTriggerOriginFile is the canonical origin-side work-repo trigger include file.
	WorkEvalTriggerOriginFile = EvaluationWorkAuthoringDir + "/.gitlab/ci/divekit/eval-trigger.yml"
	// WorkEvalTriggerTargetFile is the generated work-repo trigger include file.
	WorkEvalTriggerTargetFile = ".gitlab/ci/divekit/eval-trigger.yml"
	// EvaluationMaterializationConfigFile is the optional origin-side materialization authoring config.
	EvaluationMaterializationConfigFile = ".divekit/" + EvaluationAuthoringDirName + "/materialization.json"
	// EvaluationMaterializationManifestFile is the generated eval-repo runtime materialization manifest.
	EvaluationMaterializationManifestFile = ".divekit/materialization.json"
	// EvaluationMaterializationMarkerCopy marks work-repo content that should be copied into eval repositories.
	EvaluationMaterializationMarkerCopy = "_copy_to_eval"
	// EvaluationMaterializationMarkerOverwrite marks work-repo content that should overwrite eval repository content.
	EvaluationMaterializationMarkerOverwrite = "_overwrite_to_eval"
	// EvaluationPluginManagedOriginDir is the canonical origin path for eval-only managed plugin child pipelines.
	EvaluationPluginManagedOriginDir = EvaluationEvalAuthoringDir + "/.gitlab/ci/divekit/plugins"
	// LegacyEvaluationPluginManagedOriginDir is the legacy origin path for eval-only managed plugin child pipelines.
	LegacyEvaluationPluginManagedOriginDir = ".gitlab_evalrepo/eval-plugins"
	// EvaluationPluginManagedTargetDir is the canonical eval-repo path for managed plugin child pipelines.
	EvaluationPluginManagedTargetDir = ".gitlab/ci/divekit/plugins"

	// FilePreIdentifierDefault is the default prefix used for target-scoped file markers.
	FilePreIdentifierDefault = "_"
	// FilePostIdentifierDefault is the default suffix used for target-scoped file markers.
	FilePostIdentifierDefault = "repo"
	// NoRepoIdentifierDefault is the default target marker used to exclude files from all repos.
	NoRepoIdentifierDefault = "no"

	// MainTargetNameWrapper defines how the work target derives its name from the base pattern.
	// {{base}} will be replaced with the main/base name pattern from config (e.g., "ST2-{{uuid}}").
	MainTargetNameWrapper = "{{base}}"

	// NonMainTargetNameWrapper defines how non-work targets derive their name from the base pattern.
	// {{base}} will be replaced with the work/base name pattern (e.g., "ST2-{{uuid}}").
	// {{target}} will be replaced with the user-facing target token (e.g., "eval").
	NonMainTargetNameWrapper = "{{base}}_{{target}}"

	// TimeFormat is the standard time format used throughout the application
	TimeFormat = "2006-01-02 15:04"

	// InitialCommitMsg is the default commit message for the initial commit
	InitialCommitMsg = "Initial commit"
	// PatchCommitMsgTemplate is the template for patch commit messages
	PatchCommitMsgTemplate = "Patch applied on %s"

	// DryRunFakeProjectIDStart defines the starting ID for fake projects in dry runs
	DryRunFakeProjectIDStart = 9000

	// DryRunFakeUserIDStart defines the starting ID for fake users in dry runs
	DryRunFakeUserIDStart = 8000

	// DryRunFakeGroupPrefix defines the prefix for fake group paths in dry runs
	DryRunFakeGroupPrefix = "divekit-dry-run"

	// LocalDataProviderDirName defines the directory name for local data provider files
	LocalDataProviderDirName = "local-data"
	// LocalDataSourceLocal defines the directory name for local provider outputs.
	LocalDataSourceLocal = "local"
	// LocalDataSourceGitLab defines the directory name for GitLab-backed local data.
	LocalDataSourceGitLab = "gitlab"
	// LocalDataRunsDirName defines the directory for run result snapshots.
	LocalDataRunsDirName = "runs"
	// LocalDataPasscheckDirName defines the directory for the latest passcheck snapshot.
	LocalDataPasscheckDirName = "passcheck"
	// PasscheckSnapshotFileName defines the file name of the latest passcheck snapshot.
	PasscheckSnapshotFileName = "latest.json"

	// MaxUploadRetries is the maximum number of retries for upload operations
	MaxUploadRetries = 3 // Maximum number of retries for upload operations
	// MaxLockRetries is the maximum number of retries for lock acquisition
	MaxLockRetries = 5 // Maximum number of retries for lock acquisition
	// UploadRetryDelay is the time to wait between upload retries
	UploadRetryDelay = 500 * time.Millisecond // Time to wait between upload retries
	// LockAcquisitionDelay is the time to wait between lock acquisition attempts
	LockAcquisitionDelay = 100 * time.Millisecond // Time to wait between lock acquisition attempts

	// StandardRateLimitDelay defines a small default pause between API requests
	StandardRateLimitDelay = 100 * time.Millisecond

	// OverviewDefaultWorkers is the default number of concurrent API workers for overview
	OverviewDefaultWorkers = 10 // Default number of concurrent API workers for overview

	// RunDefaultWorkers is the default number of concurrent workers for `divekit run`
	RunDefaultWorkers = 4 // Default number of concurrent workers for `divekit run`

	// RunDefaultScriptTimeout is the default time limit of a Lua run script and of each
	// prepare, each, and cleanup callback.
	RunDefaultScriptTimeout = 10 * time.Second
)
View Source
const (
	// DefaultDirPermission is the standard permission for created directories (rwxr-xr-x)
	DefaultDirPermission = 0o755
	// DefaultFilePermission is the standard permission for created files (rw-r--r--)
	DefaultFilePermission = 0o644
	// ConfigFilePermission is the secure permission for config files (rw-------), owner-only access
	ConfigFilePermission = 0o600
	// HomePrivatePermission is the permission for private home directories (rwx------), owner-only access
	HomePrivatePermission = 0o700
	// LogDirPermission is the permission for log directories (rwxr-x---), group-readable
	LogDirPermission = 0o750
)

File and Directory Permissions

View Source
const (
	// GitLabPageSize is the page size for GitLab API pagination
	GitLabPageSize = 100
	// DefaultHTTPPort is the default HTTP port for local services
	DefaultHTTPPort = 8080
	// DefaultHTTPTimeout is the timeout for HTTP requests to avoid indefinite hangs.
	// Set to 5 minutes to accommodate large commits with many files (e.g., 150+ files per project)
	DefaultHTTPTimeout = 5 * time.Minute
)

API and HTTP Configuration

View Source
const (
	CacheFolder = ".cache"
	ReposFolder = "repos"
)

Cache-related folders

View Source
const (
	// Text input and textarea dimensions
	TextInputCharLimit = 150
	TextareaWidth      = 100
	TextareaHeight     = 8

	// Progress bar and display
	ProgressBarWidth    = 40
	ProgressBarMaxWidth = 15
	LineNumberWidth     = 3

	// Output formatting
	DividerWidth = 50

	// Display limits
	MaxExamplesPerToken     = 12
	ContextLinesToShow      = 3
	UnresolvedMatchesToShow = 5
)

UI Component Dimensions

View Source
const (
	// DefaultQueueSize is the default queue capacity for worker pools
	DefaultQueueSize = 100
	// DistributionQueueSize is the queue size for distribution operations
	DistributionQueueSize = 200
	// PatchQueueSize is the queue size for patch operations
	PatchQueueSize = 150
	// FetchQueueSize is the queue size for fetch operations
	FetchQueueSize = 64
	// IndexingQueueSize is the queue size for indexing operations
	IndexingQueueSize = 500
	// AggressiveQueueSize is the maximum queue size for aggressive operations
	AggressiveQueueSize = 512
)

Worker Pool Configuration - Queue Sizes

View Source
const (
	// DefaultTaskTimeout is the default timeout for individual tasks
	DefaultTaskTimeout = 5 * time.Minute
	// DistributionTaskTimeout is the task timeout for distribution operations
	DistributionTaskTimeout = 10 * time.Minute
	// PatchTaskTimeout is the task timeout for patch operations
	PatchTaskTimeout = 3 * time.Minute
	// FetchTaskTimeout is the task timeout for fetch operations
	FetchTaskTimeout = 20 * time.Minute
	// IndexingTaskTimeout is the task timeout for indexing operations
	IndexingTaskTimeout = 2 * time.Minute
	// AggressiveTaskTimeout is the task timeout for aggressive operations
	AggressiveTaskTimeout = 15 * time.Minute
)

Worker Pool Configuration - Task Timeouts

View Source
const (
	// DefaultMaxRetries is the default maximum number of retries
	DefaultMaxRetries = 3
	// DefaultInitialBackoff is the default initial backoff duration
	DefaultInitialBackoff = 100 * time.Millisecond
	// DefaultMaxBackoff is the default maximum backoff duration
	DefaultMaxBackoff = 30 * time.Second
	// DefaultBackoffMultiplier is the default backoff multiplier
	DefaultBackoffMultiplier = 2.0
	// DefaultJitterFraction is the default jitter fraction for backoff calculation
	DefaultJitterFraction = 0.1
)

Retry Configuration - Default Policy

View Source
const (
	// PatchRetryMaxAttempts is the maximum number of retry attempts for patch operations
	PatchRetryMaxAttempts = 2
	// PatchRetryInitialBackoff is the initial backoff for patch retries
	PatchRetryInitialBackoff = 50 * time.Millisecond
	// PatchRetryMaxBackoff is the maximum backoff for patch retries
	PatchRetryMaxBackoff = 10 * time.Second
)

Retry Configuration - Patch Policy

View Source
const (
	// WorkerCountMultiplier is the multiplier for CPU-core-based worker count calculation
	WorkerCountMultiplier = 2
	// IndexingWorkerMultiplier is the multiplier for indexing worker count
	IndexingWorkerMultiplier = 4
	// MinWorkerCount is the absolute minimum number of workers allowed
	MinWorkerCount = 2
	// MaxWorkerCount is the absolute maximum number of workers allowed
	MaxWorkerCount = 64
	// ReadWorkerCount is the number of concurrent API reads for interactive lookups
	// such as member roles, link refresh and repository activity. Reads are light, so
	// there is no per-second cap; 800 targets at 150 ms still need 15 s with 16.
	ReadWorkerCount = 16
	// DistributionWorkerCount is the worker count for distribution operations,
	// the upper bound on repositories in flight. Limited to 2 to avoid overwhelming
	// GitLab's Gitaly with concurrent large commits.
	DistributionWorkerCount = 2
)

Worker Count Configuration

View Source
const (
	// AggressiveRetryMaxAttempts is the maximum retry attempts for aggressive operations
	AggressiveRetryMaxAttempts = 5
	// ConservativeRateLimit is the conservative rate limit value
	ConservativeRateLimit = 5
	// FetchRateLimit is the rate limit for fetch operations
	FetchRateLimit = 10
	// SnapshotRateLimit is the rate limit for snapshot jobs (tasks per second).
	// They also run git over HTTP, which the host pacing of the API client does not see.
	SnapshotRateLimit = 3
)

Rate Limiting and Concurrency

View Source
const (
	// LinkingWorkerCount is the number of parallel workers for repository linking.
	// Conservative to avoid overwhelming GitLab with concurrent API requests.
	LinkingWorkerCount = 4
	// LinkingQueueSize is the queue size for linking operations
	LinkingQueueSize = 100
	// LinkingTaskTimeout is the timeout for individual linking tasks
	LinkingTaskTimeout = 5 * time.Minute
)

Linking Configuration - for repository linking operations (cross-repo variables, tokens)

View Source
const (
	// PacingInitialReadRate is the read rate (requests per second) a host starts
	// at, the same as the old fixed pace of the fetch pool.
	PacingInitialReadRate = FetchRateLimit
	// PacingInitialWriteRate is the write rate a host starts at: 2 repositories
	// per second at about three writes each, as distribute used to send.
	PacingInitialWriteRate = 6
	// PacingMaxReadRate and PacingMaxWriteRate cap slow start and growth.
	PacingMaxReadRate  = 200
	PacingMaxWriteRate = 100
)

Adaptive host pacing - see internal/infrastructure/hostpacing

View Source
const DefaultUserTokenFallback = "owner"

DefaultUserTokenFallback is used when no user names are provided for individualization.

View Source
const (
	DocsURL = "https://divekit.pages.git.nrw/documentation/pages/docs/"
)

Documentation links shared across the CLI.

Variables

This section is empty.

Functions

func DisplayTargetName

func DisplayTargetName(targetName string) string

DisplayTargetName returns the preferred user-facing label token for a target.

func GetDistributionCachePath

func GetDistributionCachePath(workingDir, distributionName string) string

GetDistributionCachePath returns the cache path for a distribution

func GetDistributionConfigPath

func GetDistributionConfigPath(workingDir, distributionName string) string

GetDistributionConfigPath constructs the path to a distribution's main configuration file (config.json). This file contains the distribution settings including targets, linking pairs, and other metadata. The path follows the pattern: workingDir/.divekit/distributions/distributionName/config.json

Example: GetDistributionConfigPath("/project", "my-dist") -> "/project/.divekit/distributions/my-dist/config.json"

func GetDistributionIndividualizationPath

func GetDistributionIndividualizationPath(workingDir, distributionName string) string

GetDistributionIndividualizationPath constructs the path to a distribution's unified individualization configuration file (individualization.json). This file can contain variables, solution deletion, warnings, fileManipulation, relations, variableExtensions, and variations.

func GetDistributionIndividualsPath

func GetDistributionIndividualsPath(workingDir, distributionName string) string

GetDistributionIndividualsPath constructs the path to a distribution's individuals configuration file (individuals.json). This file contains the user group assignments and individualization settings for the distribution.

Example: GetDistributionIndividualsPath("/project", "my-dist") -> "/project/.divekit/distributions/my-dist/individuals.json"

func GetDistributionPath

func GetDistributionPath(workingDir, distributionName string) string

GetDistributionPath constructs the full path to a specific distribution directory. This is the base directory where all distribution-specific files are stored. The path follows the pattern: workingDir/.divekit/distributions/distributionName

Example: GetDistributionPath("/project", "my-dist") -> "/project/.divekit/distributions/my-dist"

func GetDistributionRemotesPath

func GetDistributionRemotesPath(workingDir, distributionName string) string

GetDistributionRemotesPath constructs the path to a distribution's remotes configuration file (remotes.json). This file stores the mapping between UUIDs and remote repository information generated during distribution. The path follows the pattern: workingDir/.divekit/distributions/distributionName/remotes.json

Example: GetDistributionRemotesPath("/project", "my-dist") -> "/project/.divekit/distributions/my-dist/remotes.json"

func GetDistributionReposCachePath

func GetDistributionReposCachePath(workingDir, distributionName, timestamp string) string

GetDistributionReposCachePath returns the repos cache path for a distribution

func GetDistributionResultsPath

func GetDistributionResultsPath(workingDir, distributionName string) string

GetDistributionResultsPath constructs the path to a distribution's results record (results.json). It sits beside config.json so it stays with the distribution after its repositories are deleted.

Example: GetDistributionResultsPath("/project", "ST1M2") -> "/project/.divekit/distributions/ST1M2/results.json"

func GetDistributionVariationPath

func GetDistributionVariationPath(workingDir, distributionName string) string

GetDistributionVariationPath constructs the path to a distribution's variation configuration file (variation.json). This file defines the individualization rules, token patterns, and content variations for the distribution.

Example: GetDistributionVariationPath("/project", "my-dist") -> "/project/.divekit/distributions/my-dist/variation.json"

func GetDistributionsPath

func GetDistributionsPath(workingDir string) string

GetDistributionsPath constructs the path to the distributions root directory. This directory contains all distribution subdirectories within a divekit project. The path follows the pattern: workingDir/.divekit/distributions

Example: GetDistributionsPath("/project") -> "/project/.divekit/distributions"

func GetDivekitIndexPath

func GetDivekitIndexPath(workingDir string) string

GetDivekitIndexPath constructs the path to the repository-local index directory.

func GetDivekitPath

func GetDivekitPath(workingDir string) string

GetDivekitPath constructs the path to the repository-local divekit directory.

func GetEvaluationPipelinePath

func GetEvaluationPipelinePath(workingDir string) string

GetEvaluationPipelinePath constructs the path to the canonical evaluation pipeline directory.

func GetLegacyEvaluationPipelinePath

func GetLegacyEvaluationPipelinePath(workingDir string) string

GetLegacyEvaluationPipelinePath constructs the path to the legacy evaluation pipeline directory.

func GetLocalDataDistributionPath

func GetLocalDataDistributionPath(workingDir, distributionName string) string

GetLocalDataDistributionPath constructs the root path for distribution-scoped local data.

func GetLocalDataGitLabRunPath

func GetLocalDataGitLabRunPath(workingDir, distributionName, timestamp string) string

GetLocalDataGitLabRunPath constructs the path to a timestamped GitLab fetch output.

func GetLocalDataProviderPath

func GetLocalDataProviderPath(workingDir, distributionName, targetName string) string

GetLocalDataProviderPath constructs the path to local data provider storage for a specific distribution and target. This is used when running in local filesystem mode (dry-run with "fs" mode) to store simulated project data. The path follows the pattern: workingDir/.divekit/local-data/distributionName/local/targetName

Example: GetLocalDataProviderPath("/project", "my-dist", "work") -> "/project/.divekit/local-data/my-dist/local/work"

func GetLocalDataReportPath

func GetLocalDataReportPath(workingDir, distributionName string, timestamp time.Time) string

GetLocalDataReportPath constructs the path to a timestamped locally archived report directory. The path follows the pattern: workingDir/.divekit/local-data/reports/distributionName/timestamp

Example: GetLocalDataReportPath("/project", "my-dist", time.Date(2026, 4, 23, 12, 34, 56, 0, time.UTC)) -> "/project/.divekit/local-data/reports/my-dist/20260423_123456"

func GetLocalDataReportsPath

func GetLocalDataReportsPath(workingDir string) string

GetLocalDataReportsPath constructs the shared root path for locally archived reports.

func GetLocalDataRootPath

func GetLocalDataRootPath(workingDir string) string

GetLocalDataRootPath constructs the shared root path for local provider storage.

func GetLocalDataRunResultsPath

func GetLocalDataRunResultsPath(workingDir, distributionName, timestamp string) string

GetLocalDataRunResultsPath constructs the path to timestamped run results.

func GetLocalDataSourcePath

func GetLocalDataSourcePath(workingDir, distributionName, source string) string

GetLocalDataSourcePath constructs the root path for a distribution source.

func GetLocalDataSourceRunPath

func GetLocalDataSourceRunPath(workingDir, distributionName, source, runID string) string

GetLocalDataSourceRunPath constructs the path to a timestamped source run.

func GetPasscheckSnapshotPath

func GetPasscheckSnapshotPath(workingDir, distributionName string) string

GetPasscheckSnapshotPath constructs the path to the latest persisted passcheck snapshot. The path follows the pattern: workingDir/.divekit/local-data/distributionName/passcheck/latest.json

func GetProjectScriptsPath

func GetProjectScriptsPath(workingDir string) string

GetProjectScriptsPath constructs the path to the repository-local scripts directory.

func GetRootIndividualizationPath

func GetRootIndividualizationPath(workingDir string) string

GetRootIndividualizationPath constructs the path to the root unified individualization configuration file (individualization.json).

func GetRootVariationPath

func GetRootVariationPath(workingDir string) string

GetRootVariationPath constructs the path to the root variation configuration file (variation.json). This file defines the default individualization rules that can be overridden by distribution-specific variations.

Example: GetRootVariationPath("/project") -> "/project/.divekit/variation.json"

func GetSeriesPath

func GetSeriesPath(workingDir string) string

GetSeriesPath constructs the path to the origin's milestone series declaration.

Example: GetSeriesPath("/project") -> "/project/.divekit/series.json"

func GetTempIndividualizedPath

func GetTempIndividualizedPath(workingDir, uuid string) string

GetTempIndividualizedPath constructs the path to a temporary directory for individualized content. This directory is used during the individualization process to store processed files before upload. Each UUID gets its own subdirectory to avoid conflicts during concurrent processing. The path follows the pattern: workingDir/.divekit/.tmp-individualized/uuid

Example: GetTempIndividualizedPath("/project", "uuid123") -> "/project/.divekit/.tmp-individualized/uuid123"

func NormalizeTargetName

func NormalizeTargetName(name string) string

NormalizeTargetName maps legacy and user-facing target aliases to their canonical internal names.

func TargetRepoAliases

func TargetRepoAliases(targetName string) []string

TargetRepoAliases returns all recognized path/file aliases for a target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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