Documentation ¶
Index ¶
- Constants
- Variables
- func AqlResultToSearchResult(readers []*content.ContentReader) (contentReader *content.ContentReader, err error)
- func ConfirmDelete(pathsToDeleteReader *content.ContentReader) (bool, error)
- func ConvertIntToStorageSizeString(num int64) string
- func CreateAccessServiceManager(serviceDetails *config.ServerDetails, isDryRun bool) (*access.AccessServicesManager, error)
- func CreateBuildInfoProps(buildArtifactsDetailsFile string, config *viper.Viper, projectType ProjectType) (map[string]string, error)
- func CreateBuildInfoService() *build.BuildInfoService
- func CreateBuildProperties(buildName, buildNumber, projectKey string) (string, error)
- func CreateBuildPropsFromConfiguration(buildConfiguration *BuildConfiguration) (string, error)
- func CreateDeleteServiceManager(artDetails *config.ServerDetails, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateDistributionServiceManager(serviceDetails *config.ServerDetails, isDryRun bool) (*distribution.DistributionServicesManager, error)
- func CreateDownloadServiceManager(artDetails *config.ServerDetails, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateServiceManager(serverDetails *config.ServerDetails, httpRetries, httpRetryWaitMilliSecs int, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateServiceManagerWithContext(context context.Context, serverDetails *config.ServerDetails, isDryRun bool, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateServiceManagerWithProgressBar(serverDetails *config.ServerDetails, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateServiceManagerWithThreads(serverDetails *config.ServerDetails, isDryRun bool, ...) (artifactory.ArtifactoryServicesManager, error)
- func CreateUploadServiceManager(serverDetails *config.ServerDetails, ...) (artifactory.ArtifactoryServicesManager, error)
- func DownloadExtractor(artDetails *config.ServerDetails, downloadPath, targetPath string) error
- func DownloadExtractorIfNeeded(targetPath, downloadPath string) error
- func GetBuildDir(buildName, buildNumber, projectKey string) (string, error)
- func GetBuildScanError() error
- func GetEncryptedPasswordFromArtifactory(artifactoryAuth auth.ServiceDetails, insecureTls bool) (string, error)
- func GetExtractorsRemoteDetails(downloadPath string) (*config.ServerDetails, string, error)
- func GetFilesCountFromRepositorySummary(repoSummary *utils.RepositorySummary) (int64, error)
- func GetFilteredBuildInfoRepositories(storageInfo *clientUtils.StorageInfo, ...) ([]string, error)
- func GetFilteredRepositoriesByName(servicesManager artifactory.ArtifactoryServicesManager, ...) ([]string, error)
- func GetFilteredRepositoriesByNameAndType(servicesManager artifactory.ArtifactoryServicesManager, ...) ([]string, error)
- func GetGeneratedBuildsInfo(buildName, buildNumber, projectKey string) ([]*buildInfo.BuildInfo, error)
- func GetProjectConfFilePath(projectType ProjectType) (confFilePath string, exists bool, err error)
- func GetProjectDir(global bool) (string, error)
- func GetRepoNameForDependenciesSearch(repoName string, serviceManager artifactory.ArtifactoryServicesManager) (string, error)
- func GetRepositories(artDetails *config.ServerDetails, repoTypes ...RepoType) ([]string, error)
- func GetSearchParams(f *spec.File) (searchParams services.SearchParams, err error)
- func GetServerDetails(vConfig *viper.Viper) (*config.ServerDetails, error)
- func GetTestDataPath() (string, error)
- func GetUsedSpaceInBytes(repoSummary *utils.RepositorySummary) (int64, error)
- func IsRemoteRepo(repoName string, serviceManager artifactory.ArtifactoryServicesManager) (bool, error)
- func PopulateBuildArtifactsAsPartials(buildArtifacts []buildInfo.Artifact, buildConfiguration *BuildConfiguration, ...) error
- func PrepareBuildPrerequisites(buildConfiguration *BuildConfiguration) (build *build.Build, err error)
- func PrintSearchResults(reader *content.ContentReader) error
- func ReadBuildInfoGeneralDetails(buildName, buildNumber, projectKey string) (*buildInfo.General, error)
- func ReadConfigFile(configPath string, configType ConfigType) (config *viper.Viper, err error)
- func ReadMavenConfig(path string, mvnProps map[string]any) (config *viper.Viper, err error)
- func ReadPartialBuildInfoFiles(buildName, buildNumber, projectKey string) (buildInfo.Partials, error)
- func RemoteUnmarshal(serviceManager artifactory.ArtifactoryServicesManager, remoteFileUrl string, ...) (err error)
- func RemoveBuildDir(buildName, buildNumber, projectKey string) error
- func SaveBuildGeneralDetails(buildName, buildNumber, projectKey string) error
- func SaveBuildInfo(buildName, buildNumber, projectKey string, buildInfo *buildInfo.BuildInfo) (err error)
- func SavePartialBuildInfo(buildName, buildNumber, projectKey string, ...) error
- func SaveTransferSettings(settings *TransferSettings) (err error)
- func SearchResultNoDate(reader *content.ContentReader) (contentReader *content.ContentReader, err error)
- func ValidateRepoExists(repoKey string, serviceDetails auth.ServiceDetails) error
- type BuildConfigMapping
- type BuildConfiguration
- func (bc *BuildConfiguration) GetBuildName() (string, error)
- func (bc *BuildConfiguration) GetBuildNumber() (string, error)
- func (bc *BuildConfiguration) GetModule() string
- func (bc *BuildConfiguration) GetProject() string
- func (bc *BuildConfiguration) IsCollectBuildInfo() (bool, error)
- func (bc *BuildConfiguration) IsLoadedFromConfigFile() bool
- func (bc *BuildConfiguration) SetBuildName(buildName string) *BuildConfiguration
- func (bc *BuildConfiguration) SetBuildNumber(buildNumber string) *BuildConfiguration
- func (bc *BuildConfiguration) SetModule(module string) *BuildConfiguration
- func (bc *BuildConfiguration) SetProject(project string) *BuildConfiguration
- func (bc *BuildConfiguration) ValidateBuildAndModuleParams() error
- func (bc *BuildConfiguration) ValidateBuildParams() error
- type ConfigType
- type DownloadConfiguration
- type FileTree
- type IncludeExcludeFilter
- type ProjectType
- type RepoType
- type Repository
- type RepositoryConfig
- func (repo *RepositoryConfig) IsServerDetailsEmpty() bool
- func (repo *RepositoryConfig) ServerDetails() (*config.ServerDetails, error)
- func (repo *RepositoryConfig) SetServerDetails(rtDetails *config.ServerDetails) *RepositoryConfig
- func (repo *RepositoryConfig) SetTargetRepo(targetRepo string) *RepositoryConfig
- func (repo *RepositoryConfig) TargetRepo() string
- type SearchResult
- type StorageInfoManager
- func (sim *StorageInfoManager) CalculateStorageInfo() error
- func (sim *StorageInfoManager) GetRepoSummary(repoKey string) (*utils.RepositorySummary, error)
- func (sim *StorageInfoManager) GetReposTotalSizeAndFiles(repoKeys ...string) (totalSize, totalFiles int64, err error)
- func (sim *StorageInfoManager) GetServiceId() (string, error)
- func (sim *StorageInfoManager) GetServiceManager() artifactory.ArtifactoryServicesManager
- func (sim *StorageInfoManager) GetStorageInfo() (*utils.StorageInfo, error)
- type TransferSettings
- type UploadConfiguration
Constants ¶
const ( BuildInfoDetails = "details" BuildTempPath = "jfrog/builds/" ProjectConfigBuildNameKey = "name" )
const ( ProjectConfigResolverPrefix = "resolver" ProjectConfigDeployerPrefix = "deployer" ProjectConfigRepo = "repo" ProjectConfigServerId = "serverId" )
const ( // DefaultThreads is the default number of threads working while transferring Artifactory's data DefaultThreads = 8 MaxBuildInfoThreads = 8 )
const ArtifactPattern = "artifactPattern"
const BuildName = "build.name"
For key/value binding
const BuildNumber = "build.number"
const BuildProject = "build.project"
const BuildTimestamp = "build.timestamp"
const ClassworldsConf = `` /* 166-byte string literal not displayed */
const DeployArtifacts = "artifacts"
const DeployableArtifacts = "deployable.artifacts.map"
const DeployerPrefix = "deployer."
const ExcludePatterns = "excludePatterns"
const ( // This env var should be used for downloading the extractor jars through an Artifactory remote // repository, instead of downloading directly from releases.jfrog.io. The remote repository should be // configured to proxy releases.jfrog.io. // This env var should store a server ID and a remote repository in form of '<ServerID>/<RemoteRepo>' ExtractorsRemoteEnv = "JFROG_CLI_EXTRACTORS_REMOTE" )
const FilterExcludedArtifactsFromBuild = "filterExcludedArtifactsFromBuild"
const ForkCount = "forkCount"
const GeneratedBuildInfo = "buildInfo.generated"
const GradleInitScript = `` /* 1384-byte string literal not displayed */
const Host = "host"
const (
HttpProxy = "HTTP_PROXY"
)
const IncludePatterns = "includePatterns"
const InsecureTls = "insecureTls"
const IvyDescriptor = "deployIvyDescriptors"
const IvyPattern = "ivyPattern"
const MavenDescriptor = "deployMavenDescriptors"
const Password = "password"
const Port = "port"
const PropertiesTempPath = "jfrog/properties/"
For path and temp files
const Proxy = "proxy."
const ReleaseRepo = "releaseRepo"
const Repo = "repo"
const ResolverPrefix = "resolver."
const ServerId = "serverId"
const SnapshotRepo = "snapshotRepo"
const Url = "url"
const Username = "username"
Variables ¶
var ProjectTypes = []string{
"go",
"pip",
"pipenv",
"poetry",
"npm",
"yarn",
"nuget",
"maven",
"gradle",
"dotnet",
"build",
"terraform",
}
var RepoTypes = []string{
"local",
"remote",
"virtual",
"federated",
}
Functions ¶
func AqlResultToSearchResult ¶
func AqlResultToSearchResult(readers []*content.ContentReader) (contentReader *content.ContentReader, err error)
func ConfirmDelete ¶
func ConfirmDelete(pathsToDeleteReader *content.ContentReader) (bool, error)
func ConvertIntToStorageSizeString ¶ added in v2.24.3
func CreateAccessServiceManager ¶ added in v2.2.0
func CreateAccessServiceManager(serviceDetails *config.ServerDetails, isDryRun bool) (*access.AccessServicesManager, error)
func CreateBuildInfoProps ¶ added in v2.9.0
func CreateBuildInfoService ¶ added in v2.5.0
func CreateBuildInfoService() *build.BuildInfoService
func CreateBuildProperties ¶
func CreateBuildPropsFromConfiguration ¶ added in v2.27.0
func CreateBuildPropsFromConfiguration(buildConfiguration *BuildConfiguration) (string, error)
func CreateDeleteServiceManager ¶
func CreateDeleteServiceManager(artDetails *config.ServerDetails, threads, httpRetries, httpRetryWaitMilliSecs int, dryRun bool) (artifactory.ArtifactoryServicesManager, error)
func CreateDistributionServiceManager ¶
func CreateDistributionServiceManager(serviceDetails *config.ServerDetails, isDryRun bool) (*distribution.DistributionServicesManager, error)
func CreateDownloadServiceManager ¶
func CreateDownloadServiceManager(artDetails *config.ServerDetails, threads, httpRetries, httpRetryWaitMilliSecs int, dryRun bool, progressBar io.ProgressMgr) (artifactory.ArtifactoryServicesManager, error)
func CreateServiceManager ¶
func CreateServiceManager(serverDetails *config.ServerDetails, httpRetries, httpRetryWaitMilliSecs int, isDryRun bool) (artifactory.ArtifactoryServicesManager, error)
func CreateServiceManagerWithContext ¶ added in v2.20.6
func CreateServiceManagerWithContext(context context.Context, serverDetails *config.ServerDetails, isDryRun bool, threads, httpRetries, httpRetryWaitMilliSecs int) (artifactory.ArtifactoryServicesManager, error)
func CreateServiceManagerWithProgressBar ¶
func CreateServiceManagerWithProgressBar(serverDetails *config.ServerDetails, threads, httpRetries, httpRetryWaitMilliSecs int, dryRun bool, progressBar clientio.ProgressMgr) (artifactory.ArtifactoryServicesManager, error)
func CreateServiceManagerWithThreads ¶
func CreateServiceManagerWithThreads(serverDetails *config.ServerDetails, isDryRun bool, threads, httpRetries, httpRetryWaitMilliSecs int) (artifactory.ArtifactoryServicesManager, error)
Create a service manager with threads. If the value sent for httpRetries is negative, the default will be used.
func CreateUploadServiceManager ¶
func CreateUploadServiceManager(serverDetails *config.ServerDetails, threads, httpRetries, httpRetryWaitMilliSecs int, dryRun bool, progressBar io.ProgressMgr) (artifactory.ArtifactoryServicesManager, error)
func DownloadExtractor ¶ added in v2.29.8
func DownloadExtractor(artDetails *config.ServerDetails, downloadPath, targetPath string) error
func DownloadExtractorIfNeeded ¶
Download the relevant build-info-extractor jar, if it does not already exist locally. By default, the jar is downloaded directly from jfrog releases.
downloadPath: Artifactory download path. targetPath: The local download path (without the file name).
func GetBuildDir ¶
func GetBuildScanError ¶
func GetBuildScanError() error
func GetEncryptedPasswordFromArtifactory ¶
func GetEncryptedPasswordFromArtifactory(artifactoryAuth auth.ServiceDetails, insecureTls bool) (string, error)
func GetExtractorsRemoteDetails ¶
func GetExtractorsRemoteDetails(downloadPath string) (*config.ServerDetails, string, error)
func GetFilesCountFromRepositorySummary ¶ added in v2.24.0
func GetFilesCountFromRepositorySummary(repoSummary *utils.RepositorySummary) (int64, error)
func GetFilteredBuildInfoRepositories ¶ added in v2.19.1
func GetFilteredBuildInfoRepositories(storageInfo *clientUtils.StorageInfo, includePatterns, excludePatterns []string) ([]string, error)
GetFilteredBuildInfoRepositories returns the names of all build-info repositories filtered by their names. storageInfo - storage info response from Artifactory includePatterns - patterns of repository names (can contain wildcards) to include in the results. A repository's name must match at least one of these patterns in order to be included in the results. If includePatterns' length is zero, all repositories are included. excludePatterns - patterns of repository names (can contain wildcards) to exclude from the results. A repository's name must NOT match any of these patterns in order to be included in the results.
func GetFilteredRepositoriesByName ¶ added in v2.19.1
func GetFilteredRepositoriesByName(servicesManager artifactory.ArtifactoryServicesManager, includePatterns, excludePatterns []string) ([]string, error)
GetFilteredRepositoriesByName returns the names of local, remote, virtual and federated repositories filtered by their names. includePatterns - patterns of repository names (can contain wildcards) to include in the results. A repository's name must match at least one of these patterns in order to be included in the results. If includePatterns' length is zero, all repositories are included. excludePatterns - patterns of repository names (can contain wildcards) to exclude from the results. A repository's name must NOT match any of these patterns in order to be included in the results.
func GetFilteredRepositoriesByNameAndType ¶ added in v2.19.1
func GetFilteredRepositoriesByNameAndType(servicesManager artifactory.ArtifactoryServicesManager, includePatterns, excludePatterns []string, repoType RepoType) ([]string, error)
GetFilteredRepositoriesByNameAndType returns the names of local, remote, virtual and federated repositories filtered by their names and type. includePatterns - patterns of repository names (can contain wildcards) to include in the results. A repository's name must match at least one of these patterns in order to be included in the results. If includePatterns' length is zero, all repositories are included. excludePatterns - patterns of repository names (can contain wildcards) to exclude from the results. A repository's name must NOT match any of these patterns in order to be included in the results. repoType - only repositories of this type will be returned.
func GetGeneratedBuildsInfo ¶
func GetProjectConfFilePath ¶
func GetProjectConfFilePath(projectType ProjectType) (confFilePath string, exists bool, err error)
If configuration file exists in the working dir or in one of its parent dirs return its path, otherwise return the global configuration file path
func GetProjectDir ¶
func GetRepoNameForDependenciesSearch ¶
func GetRepoNameForDependenciesSearch(repoName string, serviceManager artifactory.ArtifactoryServicesManager) (string, error)
Since we can't search dependencies in a remote repository, we will turn the search to the repository's cache. Local/Virtual repository name will be returned as is.
func GetRepositories ¶
func GetRepositories(artDetails *config.ServerDetails, repoTypes ...RepoType) ([]string, error)
GetRepositories returns the names of local, remote, virtual or federated repositories filtered by their type. artDetails - Artifactory server details repoTypes - Repository types to filter. If empty - return all repository types.
func GetSearchParams ¶
func GetSearchParams(f *spec.File) (searchParams services.SearchParams, err error)
func GetServerDetails ¶
func GetServerDetails(vConfig *viper.Viper) (*config.ServerDetails, error)
Returns the Artifactory details Checks first for the deployer information if exists and if not, checks for the resolver information.
func GetTestDataPath ¶ added in v2.10.0
func GetUsedSpaceInBytes ¶ added in v2.23.2
func GetUsedSpaceInBytes(repoSummary *utils.RepositorySummary) (int64, error)
func IsRemoteRepo ¶
func IsRemoteRepo(repoName string, serviceManager artifactory.ArtifactoryServicesManager) (bool, error)
func PopulateBuildArtifactsAsPartials ¶ added in v2.27.0
func PopulateBuildArtifactsAsPartials(buildArtifacts []buildInfo.Artifact, buildConfiguration *BuildConfiguration, moduleType buildInfo.ModuleType) error
func PrepareBuildPrerequisites ¶ added in v2.12.3
func PrepareBuildPrerequisites(buildConfiguration *BuildConfiguration) (build *build.Build, err error)
func PrintSearchResults ¶
func PrintSearchResults(reader *content.ContentReader) error
func ReadConfigFile ¶
func ReadConfigFile(configPath string, configType ConfigType) (config *viper.Viper, err error)
func ReadMavenConfig ¶ added in v2.20.4
func RemoteUnmarshal ¶
func RemoteUnmarshal(serviceManager artifactory.ArtifactoryServicesManager, remoteFileUrl string, loadTarget interface{}) (err error)
Download and unmarshal a file from artifactory.
func RemoveBuildDir ¶
func SaveBuildGeneralDetails ¶
func SaveBuildInfo ¶
func SavePartialBuildInfo ¶
func SaveTransferSettings ¶ added in v2.17.0
func SaveTransferSettings(settings *TransferSettings) (err error)
func SearchResultNoDate ¶
func SearchResultNoDate(reader *content.ContentReader) (contentReader *content.ContentReader, err error)
func ValidateRepoExists ¶ added in v2.9.0
func ValidateRepoExists(repoKey string, serviceDetails auth.ServiceDetails) error
Returns an error if the given repo doesn't exist.
Types ¶
type BuildConfigMapping ¶
type BuildConfigMapping map[ProjectType][]*map[string]string
type BuildConfiguration ¶
type BuildConfiguration struct {
// contains filtered or unexported fields
}
func ExtractBuildDetailsFromArgs ¶
func ExtractBuildDetailsFromArgs(args []string) (cleanArgs []string, buildConfig *BuildConfiguration, err error)
func NewBuildConfiguration ¶ added in v2.7.0
func NewBuildConfiguration(buildName, buildNumber, module, project string) *BuildConfiguration
func (*BuildConfiguration) GetBuildName ¶ added in v2.7.0
func (bc *BuildConfiguration) GetBuildName() (string, error)
func (*BuildConfiguration) GetBuildNumber ¶ added in v2.7.0
func (bc *BuildConfiguration) GetBuildNumber() (string, error)
func (*BuildConfiguration) GetModule ¶ added in v2.7.0
func (bc *BuildConfiguration) GetModule() string
func (*BuildConfiguration) GetProject ¶ added in v2.7.0
func (bc *BuildConfiguration) GetProject() string
func (*BuildConfiguration) IsCollectBuildInfo ¶ added in v2.7.0
func (bc *BuildConfiguration) IsCollectBuildInfo() (bool, error)
func (*BuildConfiguration) IsLoadedFromConfigFile ¶ added in v2.7.0
func (bc *BuildConfiguration) IsLoadedFromConfigFile() bool
func (*BuildConfiguration) SetBuildName ¶ added in v2.7.0
func (bc *BuildConfiguration) SetBuildName(buildName string) *BuildConfiguration
func (*BuildConfiguration) SetBuildNumber ¶ added in v2.7.0
func (bc *BuildConfiguration) SetBuildNumber(buildNumber string) *BuildConfiguration
func (*BuildConfiguration) SetModule ¶ added in v2.7.0
func (bc *BuildConfiguration) SetModule(module string) *BuildConfiguration
func (*BuildConfiguration) SetProject ¶ added in v2.7.0
func (bc *BuildConfiguration) SetProject(project string) *BuildConfiguration
func (*BuildConfiguration) ValidateBuildAndModuleParams ¶ added in v2.7.0
func (bc *BuildConfiguration) ValidateBuildAndModuleParams() error
Validates: 1. If the build number exists, the build name also exists (and vice versa). 2. If the modules exists, the build name/number are also exist (and vice versa).
func (*BuildConfiguration) ValidateBuildParams ¶ added in v2.7.0
func (bc *BuildConfiguration) ValidateBuildParams() error
Validates that if the build number exists, the build name also exists (and vice versa).
type ConfigType ¶
type ConfigType string
const ( YAML ConfigType = "yaml" PROPERTIES ConfigType = "properties" )
type DownloadConfiguration ¶
type FileTree ¶ added in v2.17.0
type FileTree struct {
// contains filtered or unexported fields
}
FileTree is a UI components that displays a file-system tree view in the terminal.
func NewFileTree ¶ added in v2.17.0
func NewFileTree() *FileTree
type IncludeExcludeFilter ¶ added in v2.28.0
func (*IncludeExcludeFilter) ShouldIncludeItem ¶ added in v2.28.0
func (rf *IncludeExcludeFilter) ShouldIncludeItem(item string) (bool, error)
func (*IncludeExcludeFilter) ShouldIncludeRepository ¶ added in v2.28.0
func (rf *IncludeExcludeFilter) ShouldIncludeRepository(repoKey string) (bool, error)
type ProjectType ¶
type ProjectType int
const ( Go ProjectType = iota Pip Pipenv Poetry Npm Yarn Nuget Maven Gradle Dotnet Build Terraform )
func (ProjectType) String ¶
func (projectType ProjectType) String() string
type Repository ¶
type Repository struct { Repo string `yaml:"repo,omitempty"` ServerId string `yaml:"serverId,omitempty"` SnapshotRepo string `yaml:"snapshotRepo,omitempty"` ReleaseRepo string `yaml:"releaseRepo,omitempty"` DeployMavenDesc bool `yaml:"deployMavenDescriptors,omitempty"` DeployIvyDesc bool `yaml:"deployIvyDescriptors,omitempty"` IvyPattern string `yaml:"ivyPattern,omitempty"` ArtifactsPattern string `yaml:"artifactPattern,omitempty"` NugetV2 bool `yaml:"nugetV2,omitempty"` IncludePatterns string `yaml:"includePatterns,omitempty"` ExcludePatterns string `yaml:"excludePatterns,omitempty"` }
type RepositoryConfig ¶
type RepositoryConfig struct {
// contains filtered or unexported fields
}
func GetRepoConfigByPrefix ¶
func GetRepoConfigByPrefix(configFilePath, prefix string, vConfig *viper.Viper) (repoConfig *RepositoryConfig, err error)
func GetResolutionOnlyConfiguration ¶
func GetResolutionOnlyConfiguration(projectType ProjectType) (*RepositoryConfig, error)
func ReadResolutionOnlyConfiguration ¶
func ReadResolutionOnlyConfiguration(confFilePath string) (*RepositoryConfig, error)
func (*RepositoryConfig) IsServerDetailsEmpty ¶
func (repo *RepositoryConfig) IsServerDetailsEmpty() bool
func (*RepositoryConfig) ServerDetails ¶
func (repo *RepositoryConfig) ServerDetails() (*config.ServerDetails, error)
func (*RepositoryConfig) SetServerDetails ¶
func (repo *RepositoryConfig) SetServerDetails(rtDetails *config.ServerDetails) *RepositoryConfig
func (*RepositoryConfig) SetTargetRepo ¶
func (repo *RepositoryConfig) SetTargetRepo(targetRepo string) *RepositoryConfig
func (*RepositoryConfig) TargetRepo ¶
func (repo *RepositoryConfig) TargetRepo() string
type SearchResult ¶
type SearchResult struct { Path string `json:"path,omitempty"` Type string `json:"type,omitempty"` Size int64 `json:"size,omitempty"` Created string `json:"created,omitempty"` Modified string `json:"modified,omitempty"` Sha1 string `json:"sha1,omitempty"` Sha256 string `json:"sha256,omitempty"` Md5 string `json:"md5,omitempty"` Props map[string][]string `json:"props,omitempty"` }
type StorageInfoManager ¶ added in v2.20.0
type StorageInfoManager struct {
// contains filtered or unexported fields
}
func NewStorageInfoManager ¶ added in v2.20.0
func NewStorageInfoManager(ctx context.Context, serverDetails *config.ServerDetails) (*StorageInfoManager, error)
func (*StorageInfoManager) CalculateStorageInfo ¶ added in v2.20.0
func (sim *StorageInfoManager) CalculateStorageInfo() error
Start calculating storage info in Artifactory
func (*StorageInfoManager) GetRepoSummary ¶ added in v2.20.0
func (sim *StorageInfoManager) GetRepoSummary(repoKey string) (*utils.RepositorySummary, error)
Get repository summary from the storage info. This method must be called after CalculateStorageInfo. repoKey - The repository key
func (*StorageInfoManager) GetReposTotalSizeAndFiles ¶ added in v2.24.0
func (sim *StorageInfoManager) GetReposTotalSizeAndFiles(repoKeys ...string) (totalSize, totalFiles int64, err error)
GetReposTotalSizeAndFiles gets the total size (bytes) and files of all passed repositories. This method must be called after CalculateStorageInfo. The result of this function might not be accurate!
func (*StorageInfoManager) GetServiceId ¶ added in v2.21.0
func (sim *StorageInfoManager) GetServiceId() (string, error)
Get Service Id from Artifactory
func (*StorageInfoManager) GetServiceManager ¶ added in v2.21.0
func (sim *StorageInfoManager) GetServiceManager() artifactory.ArtifactoryServicesManager
func (*StorageInfoManager) GetStorageInfo ¶ added in v2.20.0
func (sim *StorageInfoManager) GetStorageInfo() (*utils.StorageInfo, error)
Get storage info from Artifactory
type TransferSettings ¶ added in v2.17.0
type TransferSettings struct {
ThreadsNumber int `json:"threadsNumber,omitempty"`
}
func LoadTransferSettings ¶ added in v2.17.0
func LoadTransferSettings() (settings *TransferSettings, err error)
func (*TransferSettings) CalcNumberOfThreads ¶ added in v2.19.2
func (ts *TransferSettings) CalcNumberOfThreads(buildInfoRepo bool) int