Documentation ¶
Index ¶
- Constants
- func AddAuthHeaders(headers map[string]string, artifactoryDetails auth.ServiceDetails)
- func AddChecksumHeaders(headers map[string]string, fileDetails *fileutils.FileDetails)
- func AddChecksumTokenHeader(headers map[string]string, checksumToken string)
- func AddHeader(headerName, headerValue string, headers *map[string]string)
- func AddSigningKeyNameHeader(keyName string, headers *map[string]string)
- func BuildQueryFromSpecFile(specFile *CommonParams, requiredArtifactProps RequiredArtifactProps) string
- func ConvertArtifactsDetailsToBuildInfoArtifacts(artifactsDetailsReader *content.ContentReader) ([]buildinfo.Artifact, error)
- func ConvertArtifactsDetailsToBuildInfoDependencies(artifactsDetailsReader *content.ContentReader) ([]buildinfo.Dependency, error)
- func ConvertIntToStorageSizeString(num int64) string
- func CreateAqlBodyForSpecWithPattern(params *CommonParams) (string, error)
- func CreateAqlQueryForBuildInfoJson(project, buildName, buildNumber, timestamp string) string
- func CreateAqlQueryForLatestCreated(repo, path string) string
- func CreateAqlQueryForLatestCreatedFolder(repo, path string) string
- func CreateAqlQueryForPypi(repo, file string) string
- func CreateAqlQueryForYarn(npmName, npmVersion string) string
- func DisableAccelBuffering(headers *map[string]string)
- func DisableTransitiveSearchIfNotAllowed(params *CommonParams, artifactoryVersion *version.Version)
- func ExecAql(aqlQuery string, flags CommonConf) (io.ReadCloser, error)
- func ExecAqlSaveToFile(aqlQuery string, flags CommonConf) (reader *content.ContentReader, err error)
- func FilterBottomChainResults(readerRecord SearchBasedContentItem, reader *content.ContentReader) (resultReader *content.ContentReader, err error)
- func FilterCandidateToBeDeleted(deleteCandidates *content.ContentReader, resultWriter *content.ContentWriter, ...) ([]*content.ContentReader, error)
- func FilterResultsByBuild(specFile *CommonParams, flags CommonConf, ...) (*content.ContentReader, error)
- func FilterTopChainResults(readerRecord SearchBasedContentItem, reader *content.ContentReader) (resultReader *content.ContentReader, err error)
- func GetBuildInfo(buildName, buildNumber, projectKey string, flags CommonConf) (pbi *buildinfo.PublishedBuildInfo, found bool, err error)
- func GetBuildInfoRepositoryByProject(projectKey string) string
- func GetBuildNameAndNumberFromArtifactory(buildName, buildNumber, projectKey string, flags CommonConf) (string, string, error)
- func GetBuildNameAndNumberFromBuildIdentifier(buildIdentifier, projectKey string, flags CommonConf) (string, string, error)
- func GetLatestBuildNumberFromArtifactory(buildName, projectKey string, flags CommonConf) (buildNumber string, err error)
- func GetProjectQueryParam(projectKey string) string
- func GetTestResourcesPath() string
- func HasPrefix(paths []string, prefix string) bool
- func IsSubPath(paths []string, index int, separator string) bool
- func IsWildcardPattern(pattern string) bool
- func LogSearchResults(numOfArtifacts int)
- func ParseNameAndVersion(identifier string, useLatestPolicy bool) (string, string, error)
- func ReduceBottomChainDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader) (*content.ContentReader, error)
- func ReduceDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader, ...) (reader *content.ContentReader, err error)
- func ReduceTopChainDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader) (*content.ContentReader, error)
- func SearchBySpecWithAql(specFile *CommonParams, flags CommonConf, ...) (reader *content.ContentReader, err error)
- func SearchBySpecWithBuild(specFile *CommonParams, flags CommonConf) (readerContent *content.ContentReader, err error)
- func SearchBySpecWithPattern(specFile *CommonParams, flags CommonConf, ...) (*content.ContentReader, error)
- func SetContentType(contentType string, headers *map[string]string)
- func SumIntArray(arr []int) int
- func UploadFile(localPath, url, logMsgPrefix string, artifactoryDetails *auth.ServiceDetails, ...) (*http.Response, []byte, error)
- func UploadFileFromReader(reader io.Reader, url string, artifactoryDetails *auth.ServiceDetails, ...) (*http.Response, []byte, error)
- func WildcardToDirsPath(deletePattern, searchResult string) (string, error)
- func WriteCandidateDirsToBeDeleted(candidateDirsReaders []*content.ContentReader, ...) (err error)
- type Aql
- type AqlSearchResult
- type AqlSearchResultItemFilter
- type ArtifactDetails
- type BinariesSummary
- type Build
- type BundleReleaseNotes
- type CommonConf
- type CommonConfImpl
- type CommonParams
- func (params *CommonParams) GetAql() Aql
- func (params CommonParams) GetArchiveEntries() string
- func (params *CommonParams) GetBuild() string
- func (params *CommonParams) GetBundle() string
- func (params *CommonParams) GetExcludeProps() string
- func (params *CommonParams) GetExclusions() []string
- func (params *CommonParams) GetLimit() int
- func (params *CommonParams) GetOffset() int
- func (params *CommonParams) GetPattern() string
- func (params *CommonParams) GetPatternType() clientutils.PatternType
- func (params *CommonParams) GetProject() string
- func (params *CommonParams) GetProps() string
- func (params *CommonParams) GetSortBy() []string
- func (params *CommonParams) GetSortOrder() string
- func (params CommonParams) GetSpecType() (specType SpecType)
- func (params *CommonParams) GetTarget() string
- func (params *CommonParams) GetTargetProps() *Properties
- func (params CommonParams) IsIncludeDirs() bool
- func (params *CommonParams) IsRecursive() bool
- func (params *CommonParams) SetArchiveEntries(archiveEntries string)
- func (params *CommonParams) SetExcludeProps(excludeProps string)
- func (params *CommonParams) SetPattern(pattern string)
- func (params *CommonParams) SetProps(props string)
- func (params *CommonParams) SetTarget(target string)
- func (params *CommonParams) SetTargetProps(targetProps *Properties)
- type FileInfo
- type FileListFile
- type FileListParams
- type FileListResponse
- type FileStoreSummary
- type FolderInfo
- type FolderInfoChildren
- type GetReplicationBody
- type ItemProperties
- type MetadataTimestamps
- type MultipartUpload
- type OperationSummary
- type PathMapping
- type Properties
- func (props *Properties) AddProperty(key, value string)
- func (props *Properties) KeysLen() int
- func (props *Properties) ParseAndAddProperties(propStr string) error
- func (props *Properties) ToEncodedString(concatValues bool) string
- func (props *Properties) ToHeadersMap() map[string]string
- func (props *Properties) ToMap() map[string][]string
- type Property
- type RbGpgValidator
- func (r *RbGpgValidator) ArtifactsMap() map[string]string
- func (r *RbGpgValidator) SetAtrifactoryDetails(artDetails *auth.ServiceDetails) *RbGpgValidator
- func (r *RbGpgValidator) SetClient(client *jfroghttpclient.JfrogHttpClient) *RbGpgValidator
- func (r *RbGpgValidator) SetPublicKey(path string) *RbGpgValidator
- func (r *RbGpgValidator) SetRbName(rbName string) *RbGpgValidator
- func (r *RbGpgValidator) SetRbVersion(rbVersion string) *RbGpgValidator
- func (r *RbGpgValidator) Validate() error
- func (r *RbGpgValidator) VerifyArtifact(artifactPath, sha256 string) error
- type ReleaseArtifact
- type ReleaseBundleModel
- type ReplicationParams
- type RepoPathFile
- type RepositorySummary
- type RequiredArtifactProps
- type Result
- type ResultItem
- func (item ResultItem) GetItemRelativeLocation() string
- func (item ResultItem) GetItemRelativePath() string
- func (item ResultItem) GetName() string
- func (item *ResultItem) GetProperty(key string) string
- func (item ResultItem) GetSortKey() string
- func (item ResultItem) GetType() string
- func (item *ResultItem) ToArtifact() buildinfo.Artifact
- func (item *ResultItem) ToDependency() buildinfo.Dependency
- type ResultItemType
- type SearchBasedContentItem
- type SpecType
- type Stat
- type StorageInfo
- type UpdateReplicationBody
Constants ¶
const ( ArtifactorySymlink = "symlink.dest" SymlinkSha1 = "symlink.destsha1" LatestBuildNumberKey = "LATEST" )
const ( // Sizes and limits constants MaxMultipartUploadFileSize = SizeTiB * 5 DefaultUploadChunkSize int64 = SizeMiB * 20 )
const ( SizeKib int64 = 1 << 10 SizeMiB int64 = 1 << 20 SizeGiB int64 = 1 << 30 SizeTiB int64 = 1 << 40 )
Variables ¶
This section is empty.
Functions ¶
func AddAuthHeaders ¶
func AddAuthHeaders(headers map[string]string, artifactoryDetails auth.ServiceDetails)
func AddChecksumHeaders ¶
func AddChecksumHeaders(headers map[string]string, fileDetails *fileutils.FileDetails)
func AddChecksumTokenHeader ¶ added in v1.43.1
Add the checksum token header to the headers map. This header enables Artifactory to accept the Checksum Deployment of a file uploaded via multipart upload.
func AddSigningKeyNameHeader ¶ added in v1.31.0
func BuildQueryFromSpecFile ¶ added in v0.9.0
func BuildQueryFromSpecFile(specFile *CommonParams, requiredArtifactProps RequiredArtifactProps) string
Creates an aql query from a spec file.
func ConvertArtifactsDetailsToBuildInfoArtifacts ¶ added in v0.20.1
func ConvertArtifactsDetailsToBuildInfoArtifacts(artifactsDetailsReader *content.ContentReader) ([]buildinfo.Artifact, error)
func ConvertArtifactsDetailsToBuildInfoDependencies ¶ added in v0.20.1
func ConvertArtifactsDetailsToBuildInfoDependencies(artifactsDetailsReader *content.ContentReader) ([]buildinfo.Dependency, error)
func ConvertIntToStorageSizeString ¶ added in v1.40.2
func CreateAqlBodyForSpecWithPattern ¶ added in v0.9.0
func CreateAqlBodyForSpecWithPattern(params *CommonParams) (string, error)
Returns an AQL body string to search file in Artifactory by pattern, according the specified arguments requirements.
func CreateAqlQueryForBuildInfoJson ¶ added in v1.34.5
noinspection GoUnusedExportedFunction
func CreateAqlQueryForLatestCreated ¶ added in v0.26.1
func CreateAqlQueryForLatestCreatedFolder ¶ added in v1.42.0
func CreateAqlQueryForPypi ¶ added in v0.5.3
func CreateAqlQueryForYarn ¶ added in v1.10.0
noinspection GoUnusedExportedFunction
func DisableAccelBuffering ¶ added in v0.5.6
func DisableTransitiveSearchIfNotAllowed ¶ added in v0.21.3
func DisableTransitiveSearchIfNotAllowed(params *CommonParams, artifactoryVersion *version.Version)
func ExecAql ¶
func ExecAql(aqlQuery string, flags CommonConf) (io.ReadCloser, error)
func ExecAqlSaveToFile ¶ added in v0.13.0
func ExecAqlSaveToFile(aqlQuery string, flags CommonConf) (reader *content.ContentReader, err error)
func FilterBottomChainResults ¶
func FilterBottomChainResults(readerRecord SearchBasedContentItem, reader *content.ContentReader) (resultReader *content.ContentReader, err error)
func FilterCandidateToBeDeleted ¶ added in v0.13.0
func FilterCandidateToBeDeleted(deleteCandidates *content.ContentReader, resultWriter *content.ContentWriter, candidateType ResultItemType) ([]*content.ContentReader, error)
func FilterResultsByBuild ¶ added in v0.13.0
func FilterResultsByBuild(specFile *CommonParams, flags CommonConf, requiredArtifactProps RequiredArtifactProps, reader *content.ContentReader) (*content.ContentReader, error)
Filter the results by build, if no build found or items to filter, nil will be returned.
func FilterTopChainResults ¶
func FilterTopChainResults(readerRecord SearchBasedContentItem, reader *content.ContentReader) (resultReader *content.ContentReader, err error)
Reduce the amount of items by saving only the shortest item path for each unique path e.g.: a | a/b | c | e/f -> a | c | e/f
func GetBuildInfo ¶ added in v0.20.1
func GetBuildInfo(buildName, buildNumber, projectKey string, flags CommonConf) (pbi *buildinfo.PublishedBuildInfo, found bool, err error)
func GetBuildInfoRepositoryByProject ¶ added in v1.31.0
func GetBuildNameAndNumberFromArtifactory ¶ added in v0.3.1
func GetBuildNameAndNumberFromArtifactory(buildName, buildNumber, projectKey string, flags CommonConf) (string, string, error)
func GetBuildNameAndNumberFromBuildIdentifier ¶ added in v1.38.0
func GetBuildNameAndNumberFromBuildIdentifier(buildIdentifier, projectKey string, flags CommonConf) (string, string, error)
This method parses buildIdentifier. buildIdentifier should be from the format "buildName/buildNumber". If no buildNumber provided LATEST will be downloaded. If buildName or buildNumber contains "/" (slash) it should be escaped by "\" (backslash). Result examples of parsing: "aaa/123" > "aaa"-"123", "aaa" > "aaa"-"LATEST", "aaa\\/aaa" > "aaa/aaa"-"LATEST", "aaa/12\\/3" > "aaa"-"12/3".
func GetLatestBuildNumberFromArtifactory ¶ added in v1.31.0
func GetLatestBuildNumberFromArtifactory(buildName, projectKey string, flags CommonConf) (buildNumber string, err error)
func GetProjectQueryParam ¶ added in v0.20.1
func GetTestResourcesPath ¶ added in v1.5.0
func GetTestResourcesPath() string
func HasPrefix ¶ added in v1.26.0
Returns true if one or more paths has a value of 'prefix' as a prefix
func IsSubPath ¶
paths - Sorted array. index - Index of the current path which we want to check if it a prefix of any of the other previous paths. separator - File separator. Returns true paths[index] is a prefix of any of the paths[i] where i<index, otherwise returns false.
func IsWildcardPattern ¶
func LogSearchResults ¶
func LogSearchResults(numOfArtifacts int)
func ParseNameAndVersion ¶ added in v1.5.0
For builds (useLatestPolicy = true) - Parse build name and number. The build number can be LATEST if absent. For release bundles - Parse bundle name and version. For module - Parse module name and number.
func ReduceBottomChainDirResult ¶ added in v0.13.0
func ReduceBottomChainDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader) (*content.ContentReader, error)
func ReduceDirResult ¶
func ReduceDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader, ascendingOrder bool, resultsFilter AqlSearchResultItemFilter) (reader *content.ContentReader, err error)
Reduce Dir results by using the resultsFilter.
func ReduceTopChainDirResult ¶ added in v0.13.0
func ReduceTopChainDirResult(readerRecord SearchBasedContentItem, searchResults *content.ContentReader) (*content.ContentReader, error)
func SearchBySpecWithAql ¶ added in v0.2.0
func SearchBySpecWithAql(specFile *CommonParams, flags CommonConf, requiredArtifactProps RequiredArtifactProps) (reader *content.ContentReader, err error)
Use this function when running Aql with pattern
func SearchBySpecWithBuild ¶ added in v0.2.0
func SearchBySpecWithBuild(specFile *CommonParams, flags CommonConf) (readerContent *content.ContentReader, err error)
Use this function when searching by build without pattern or aql. Collect build artifacts and build dependencies separately, then merge the results into one reader.
func SearchBySpecWithPattern ¶ added in v0.2.0
func SearchBySpecWithPattern(specFile *CommonParams, flags CommonConf, requiredArtifactProps RequiredArtifactProps) (*content.ContentReader, error)
Perform search by pattern.
func SetContentType ¶
func SumIntArray ¶ added in v0.9.0
func UploadFile ¶
func UploadFile(localPath, url, logMsgPrefix string, artifactoryDetails *auth.ServiceDetails, details *fileutils.FileDetails, httpClientsDetails httputils.HttpClientDetails, client *jfroghttpclient.JfrogHttpClient, includeChecksums bool, progress clientio.ProgressMgr) (*http.Response, []byte, error)
func UploadFileFromReader ¶ added in v0.20.1
func UploadFileFromReader(reader io.Reader, url string, artifactoryDetails *auth.ServiceDetails, details *fileutils.FileDetails, httpClientsDetails httputils.HttpClientDetails, client *jfroghttpclient.JfrogHttpClient) (*http.Response, []byte, error)
func WildcardToDirsPath ¶
func WriteCandidateDirsToBeDeleted ¶ added in v0.13.0
func WriteCandidateDirsToBeDeleted(candidateDirsReaders []*content.ContentReader, filesNotToBeDeleteReader *content.ContentReader, resultWriter *content.ContentWriter) (err error)
Write all the dirs to be deleted into 'resultWriter'. However, skip dirs with files(s) that should not be deleted. In order to accomplish this, we check if the dirs are a prefix of any artifact, witch means the folder contains the artifact and should not be deleted. Optimization: In order not to scan for each dir the entire artifact reader and see if it is a prefix or not, we rely on the fact that the dirs and artifacts are sorted. We have two sorted readers in ascending order, we will start scanning from the beginning of the lists and compare whether the folder is a prefix of the current artifact, in case this is true the dir should not be deleted and we can move on to the next dir, otherwise we have to continue to the next dir or artifact. To know this, we will choose to move on with the lexicographic largest between the two.
candidateDirsReaders - Sorted list of dirs to be deleted. filesNotToBeDeleteReader - Sorted files that should not be deleted. resultWriter - The filtered list of dirs to be deleted.
Types ¶
type AqlSearchResult ¶
type AqlSearchResult struct {
Results []ResultItem
}
type AqlSearchResultItemFilter ¶
type AqlSearchResultItemFilter func(SearchBasedContentItem, *content.ContentReader) (*content.ContentReader, error)
type ArtifactDetails ¶ added in v0.20.1
type ArtifactDetails struct { // Path of the artifact in Artifactory ArtifactoryPath string `json:"artifactoryPath,omitempty"` Checksums buildinfo.Checksum `json:"checksums,omitempty"` }
func (*ArtifactDetails) ToBuildInfoArtifact ¶ added in v0.20.1
func (ad *ArtifactDetails) ToBuildInfoArtifact() (buildinfo.Artifact, error)
func (*ArtifactDetails) ToBuildInfoDependency ¶ added in v0.20.1
func (ad *ArtifactDetails) ToBuildInfoDependency() buildinfo.Dependency
type BinariesSummary ¶ added in v1.15.0
type BinariesSummary struct { BinariesCount string `json:"binariesCount,omitempty"` BinariesSize string `json:"binariesSize,omitempty"` ArtifactsSize string `json:"artifactsSize,omitempty"` Optimization string `json:"optimization,omitempty"` ItemsCount string `json:"itemsCount,omitempty"` ArtifactsCount string `json:"artifactsCount,omitempty"` }
type BundleReleaseNotes ¶ added in v1.5.0
type CommonConf ¶
type CommonConf interface { GetArtifactoryDetails() auth.ServiceDetails GetJfrogHttpClient() *jfroghttpclient.JfrogHttpClient }
func NewCommonConfImpl ¶ added in v0.21.0
func NewCommonConfImpl(artDetails auth.ServiceDetails) (CommonConf, error)
type CommonConfImpl ¶
type CommonConfImpl struct {
// contains filtered or unexported fields
}
func (*CommonConfImpl) GetArtifactoryDetails ¶
func (flags *CommonConfImpl) GetArtifactoryDetails() auth.ServiceDetails
func (*CommonConfImpl) GetJfrogHttpClient ¶
func (flags *CommonConfImpl) GetJfrogHttpClient() *jfroghttpclient.JfrogHttpClient
type CommonParams ¶ added in v1.0.1
type CommonParams struct { Aql Aql PathMapping PathMapping Pattern string Exclusions []string Target string Props string TargetProps *Properties ExcludeProps string SortOrder string SortBy []string Offset int Limit int Build string Project string ExcludeArtifacts bool IncludeDeps bool Bundle string Recursive bool IncludeDirs bool Regexp bool Ant bool ArchiveEntries string Transitive bool Include []string }
func (*CommonParams) GetAql ¶ added in v1.0.1
func (params *CommonParams) GetAql() Aql
func (CommonParams) GetArchiveEntries ¶ added in v1.0.1
func (params CommonParams) GetArchiveEntries() string
func (*CommonParams) GetBuild ¶ added in v1.0.1
func (params *CommonParams) GetBuild() string
func (*CommonParams) GetBundle ¶ added in v1.0.1
func (params *CommonParams) GetBundle() string
func (*CommonParams) GetExcludeProps ¶ added in v1.0.1
func (params *CommonParams) GetExcludeProps() string
func (*CommonParams) GetExclusions ¶ added in v1.0.1
func (params *CommonParams) GetExclusions() []string
func (*CommonParams) GetLimit ¶ added in v1.0.1
func (params *CommonParams) GetLimit() int
func (*CommonParams) GetOffset ¶ added in v1.0.1
func (params *CommonParams) GetOffset() int
func (*CommonParams) GetPattern ¶ added in v1.0.1
func (params *CommonParams) GetPattern() string
func (*CommonParams) GetPatternType ¶ added in v1.0.1
func (params *CommonParams) GetPatternType() clientutils.PatternType
func (*CommonParams) GetProject ¶ added in v1.2.0
func (params *CommonParams) GetProject() string
func (*CommonParams) GetProps ¶ added in v1.0.1
func (params *CommonParams) GetProps() string
func (*CommonParams) GetSortBy ¶ added in v1.0.1
func (params *CommonParams) GetSortBy() []string
func (*CommonParams) GetSortOrder ¶ added in v1.0.1
func (params *CommonParams) GetSortOrder() string
func (CommonParams) GetSpecType ¶ added in v1.0.1
func (params CommonParams) GetSpecType() (specType SpecType)
func (*CommonParams) GetTarget ¶ added in v1.0.1
func (params *CommonParams) GetTarget() string
func (*CommonParams) GetTargetProps ¶ added in v1.0.1
func (params *CommonParams) GetTargetProps() *Properties
func (CommonParams) IsIncludeDirs ¶ added in v1.0.1
func (params CommonParams) IsIncludeDirs() bool
func (*CommonParams) IsRecursive ¶ added in v1.0.1
func (params *CommonParams) IsRecursive() bool
func (*CommonParams) SetArchiveEntries ¶ added in v1.0.1
func (params *CommonParams) SetArchiveEntries(archiveEntries string)
func (*CommonParams) SetExcludeProps ¶ added in v1.0.1
func (params *CommonParams) SetExcludeProps(excludeProps string)
func (*CommonParams) SetPattern ¶ added in v1.0.1
func (params *CommonParams) SetPattern(pattern string)
func (*CommonParams) SetProps ¶ added in v1.0.1
func (params *CommonParams) SetProps(props string)
func (*CommonParams) SetTarget ¶ added in v1.0.1
func (params *CommonParams) SetTarget(target string)
func (*CommonParams) SetTargetProps ¶ added in v1.0.1
func (params *CommonParams) SetTargetProps(targetProps *Properties)
type FileInfo ¶
type FileInfo struct { Uri string `json:"uri,omitempty"` DownloadUri string `json:"downloadUri,omitempty"` Repo string `json:"repo,omitempty"` Path string `json:"path,omitempty"` RemoteUrl string `json:"remoteUrl,omitempty"` Created string `json:"created,omitempty"` CreatedBy string `json:"createdBy,omitempty"` LastModified string `json:"lastModified,omitempty"` ModifiedBy string `json:"modifiedBy,omitempty"` LastUpdated string `json:"lastUpdated,omitempty"` Size string `json:"size,omitempty"` MimeType string `json:"mimeType,omitempty"` Checksums struct { Sha1 string `json:"sha1,omitempty"` Sha256 string `json:"sha256,omitempty"` Md5 string `json:"md5,omitempty"` } `json:"checksums,omitempty"` }
type FileListFile ¶ added in v1.15.0
type FileListFile struct { Uri string `json:"uri,omitempty"` Size json.Number `json:"size,omitempty"` LastModified string `json:"lastModified,omitempty"` Folder bool `json:"folder,omitempty"` Sha1 string `json:"sha1,omitempty"` Sha2 string `json:"sha2,omitempty"` MetadataTimestamps MetadataTimestamps `json:"mdTimestamps,omitempty"` }
type FileListParams ¶ added in v1.15.0
type FileListParams struct { Deep bool Depth int ListFolders bool MetadataTimestamps bool IncludeRootPath bool }
func NewFileListParams ¶ added in v1.15.0
func NewFileListParams() FileListParams
type FileListResponse ¶ added in v1.15.0
type FileListResponse struct { Uri string `json:"uri,omitempty"` Created string `json:"created,omitempty"` Files []FileListFile `json:"files,omitempty"` }
type FileStoreSummary ¶ added in v1.15.0
type FolderInfo ¶ added in v1.15.0
type FolderInfo struct { Uri string `json:"uri,omitempty"` Repo string `json:"repo,omitempty"` Path string `json:"path,omitempty"` Created string `json:"created,omitempty"` CreatedBy string `json:"createdBy,omitempty"` LastModified string `json:"lastModified,omitempty"` ModifiedBy string `json:"modifiedBy,omitempty"` LastUpdated string `json:"lastUpdated,omitempty"` Children []FolderInfoChildren `json:"children,omitempty"` }
type FolderInfoChildren ¶ added in v1.15.0
type GetReplicationBody ¶ added in v1.10.0
type GetReplicationBody struct { ProxyRef string `json:"proxyRef"` // contains filtered or unexported fields }
type ItemProperties ¶ added in v1.15.0
type MetadataTimestamps ¶ added in v1.15.0
type MetadataTimestamps struct {
Properties string `json:"properties,omitempty"`
}
type MultipartUpload ¶ added in v1.38.0
type MultipartUpload struct {
// contains filtered or unexported fields
}
func NewMultipartUpload ¶ added in v1.38.0
func NewMultipartUpload(client *jfroghttpclient.JfrogHttpClient, httpClientsDetails *httputils.HttpClientDetails, artifactoryUrl string) *MultipartUpload
func (*MultipartUpload) IsSupported ¶ added in v1.38.0
func (mu *MultipartUpload) IsSupported(serviceDetails auth.ServiceDetails) (supported bool, err error)
func (*MultipartUpload) UploadFileConcurrently ¶ added in v1.38.0
func (mu *MultipartUpload) UploadFileConcurrently(localPath, targetPath string, fileSize int64, sha1 string, progress ioutils.ProgressMgr, splitCount int, chunkSize int64) (checksumToken string, err error)
type OperationSummary ¶ added in v0.20.1
type OperationSummary struct { // A ContentReader of FileTransferDetails structs TransferDetailsReader *content.ContentReader // A ContentReader of ArtifactDetails structs ArtifactsDetailsReader *content.ContentReader TotalSucceeded int TotalFailed int }
func (*OperationSummary) Close ¶ added in v0.20.1
func (cs *OperationSummary) Close() error
type PathMapping ¶ added in v1.35.0
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
func MergeProperties ¶ added in v0.20.2
func MergeProperties(properties []*Properties) *Properties
Merges multiple Properties structs into one and removes duplicate values
func NewProperties ¶ added in v0.20.2
func NewProperties() *Properties
func ParseProperties ¶
func ParseProperties(propStr string) (*Properties, error)
Parsing properties string to Properties struct.
func (*Properties) AddProperty ¶ added in v0.20.2
func (props *Properties) AddProperty(key, value string)
func (*Properties) KeysLen ¶ added in v0.20.2
func (props *Properties) KeysLen() int
func (*Properties) ParseAndAddProperties ¶ added in v0.20.2
func (props *Properties) ParseAndAddProperties(propStr string) error
func (*Properties) ToEncodedString ¶
func (props *Properties) ToEncodedString(concatValues bool) string
Creates a string of the properties, ready to use in a URL. If concatValues is true, then the values of each property are concatenated together separated by a comma. For example: key=val1,val2,... Otherwise, each value of the property will be written with its key separately. For example: key=val1;key=val2;...
func (*Properties) ToHeadersMap ¶
func (props *Properties) ToHeadersMap() map[string]string
func (*Properties) ToMap ¶ added in v0.19.0
func (props *Properties) ToMap() map[string][]string
Convert properties from Slice to map
type RbGpgValidator ¶ added in v1.5.0
type RbGpgValidator struct {
// contains filtered or unexported fields
}
func NewRbGpgValidator ¶ added in v1.5.0
func NewRbGpgValidator() *RbGpgValidator
func (*RbGpgValidator) ArtifactsMap ¶ added in v1.5.0
func (r *RbGpgValidator) ArtifactsMap() map[string]string
func (*RbGpgValidator) SetAtrifactoryDetails ¶ added in v1.5.0
func (r *RbGpgValidator) SetAtrifactoryDetails(artDetails *auth.ServiceDetails) *RbGpgValidator
func (*RbGpgValidator) SetClient ¶ added in v1.5.0
func (r *RbGpgValidator) SetClient(client *jfroghttpclient.JfrogHttpClient) *RbGpgValidator
func (*RbGpgValidator) SetPublicKey ¶ added in v1.5.0
func (r *RbGpgValidator) SetPublicKey(path string) *RbGpgValidator
func (*RbGpgValidator) SetRbName ¶ added in v1.5.0
func (r *RbGpgValidator) SetRbName(rbName string) *RbGpgValidator
func (*RbGpgValidator) SetRbVersion ¶ added in v1.5.0
func (r *RbGpgValidator) SetRbVersion(rbVersion string) *RbGpgValidator
func (*RbGpgValidator) Validate ¶ added in v1.5.0
func (r *RbGpgValidator) Validate() error
Validate gets a signed release bundle from Artifactory, validates the signature with the public gpg key and saves the release bundle's artifacts in a map
func (*RbGpgValidator) VerifyArtifact ¶ added in v1.5.0
func (r *RbGpgValidator) VerifyArtifact(artifactPath, sha256 string) error
type ReleaseArtifact ¶ added in v1.5.0
type ReleaseBundleModel ¶ added in v1.5.0
type ReleaseBundleModel struct { Id string `json:"id"` Name string `json:"name"` Version string `json:"version"` Created string `json:"created"` Description string `json:"description"` Artifacts []*ReleaseArtifact `json:"artifacts"` ReleaseNotes *BundleReleaseNotes `json:"release_notes"` Signature string `json:"signature"` Type string `json:"type"` }
func (*ReleaseBundleModel) GetOrCalculateId ¶ added in v1.5.0
func (rbm *ReleaseBundleModel) GetOrCalculateId() string
func (*ReleaseBundleModel) Valid ¶ added in v1.5.0
func (rbm *ReleaseBundleModel) Valid() error
type ReplicationParams ¶ added in v0.9.0
type ReplicationParams struct { Username string Password string Url string CronExp string // Source replication repository. RepoKey string Proxy string EnableEventReplication bool SocketTimeoutMillis int Enabled bool SyncDeletes bool SyncProperties bool SyncStatistics bool // Deprecated PathPrefix string IncludePathPrefixPattern string }
func CreateReplicationParams ¶ added in v1.10.0
func CreateReplicationParams(body GetReplicationBody) *ReplicationParams
type RepoPathFile ¶ added in v0.5.0
type RepoPathFile struct {
// contains filtered or unexported fields
}
We need to translate the provided download pattern to an AQL query. In Artifactory, for each artifact the name and path of the artifact are saved separately. We therefore need to build an AQL query that covers all possible repositories, paths and names the provided pattern can include. For example, the pattern repo/a/* can include the two following file: repo/a/file1.tgz and also repo/a/b/file2.tgz To achieve that, this function parses the pattern by splitting it by its * characters. The end result is a list of RepoPathFile structs. Each struct represent a possible repository, path and file name triple to be included in AQL query with an "or" relationship.
type RepositorySummary ¶ added in v1.15.0
type RepositorySummary struct { RepoKey string `json:"repoKey,omitempty"` RepoType string `json:"repoType,omitempty"` FoldersCount json.Number `json:"foldersCount,omitempty"` FilesCount json.Number `json:"filesCount,omitempty"` UsedSpace string `json:"usedSpace,omitempty"` UsedSpaceInBytes json.Number `json:"usedSpaceInBytes,omitempty"` ItemsCount json.Number `json:"itemsCount,omitempty"` PackageType string `json:"packageType,omitempty"` ProjectKey string `json:"projectKey,omitempty"` Percentage string `json:"percentage,omitempty"` }
type RequiredArtifactProps ¶
type RequiredArtifactProps int
const ( ALL RequiredArtifactProps = iota SYMLINK NONE )
This enum defines which properties are required in the result of the aql. For example, when performing a copy/move command - the props are not needed, so we set RequiredArtifactProps to NONE.
type ResultItem ¶
type ResultItem struct { Repo string `json:"repo,omitempty"` Path string `json:"path,omitempty"` Name string `json:"name,omitempty"` Created string `json:"created,omitempty"` Modified string `json:"modified,omitempty"` Updated string `json:"updated,omitempty"` CreatedBy string `json:"created_by,omitempty"` ModifiedBy string `json:"modified_by,omitempty"` Type string `json:"type,omitempty"` Actual_Md5 string `json:"actual_md5,omitempty"` Actual_Sha1 string `json:"actual_sha1,omitempty"` Sha256 string `json:"sha256,omitempty"` Depth int `json:"depth,omitempty"` Size int64 `json:"size,omitempty"` OriginalMd5 string `json:"original_md5,omitempty"` Properties []Property `json:"properties,omitempty"` Stats []Stat `json:"stats,omitempty"` }
func (ResultItem) GetItemRelativeLocation ¶ added in v0.13.2
func (item ResultItem) GetItemRelativeLocation() string
Returns "item.Repo/item.Path/".
func (ResultItem) GetItemRelativePath ¶
func (item ResultItem) GetItemRelativePath() string
func (ResultItem) GetName ¶ added in v0.17.0
func (item ResultItem) GetName() string
func (*ResultItem) GetProperty ¶ added in v0.17.5
func (item *ResultItem) GetProperty(key string) string
func (ResultItem) GetSortKey ¶ added in v0.17.0
func (item ResultItem) GetSortKey() string
func (ResultItem) GetType ¶ added in v0.17.0
func (item ResultItem) GetType() string
func (*ResultItem) ToArtifact ¶
func (item *ResultItem) ToArtifact() buildinfo.Artifact
func (*ResultItem) ToDependency ¶
func (item *ResultItem) ToDependency() buildinfo.Dependency
type ResultItemType ¶ added in v1.42.0
type ResultItemType string
const ( File ResultItemType = "file" Folder ResultItemType = "folder" )
type SearchBasedContentItem ¶ added in v0.17.0
type SearchBasedContentItem interface { content.SortableContentItem GetItemRelativePath() string GetName() string GetType() string }
Implement this interface to allow creating 'content.ContentReader' items which can be used with 'searchutils' functions.
type StorageInfo ¶ added in v1.15.0
type StorageInfo struct { BinariesSummary `json:"binariesSummary,omitempty"` RepositoriesSummaryList []RepositorySummary `json:"repositoriesSummaryList,omitempty"` FileStoreSummary `json:"fileStoreSummary,omitempty"` }
func (*StorageInfo) FindRepositoryWithKey ¶ added in v1.20.0
func (si *StorageInfo) FindRepositoryWithKey(key string) (*RepositorySummary, error)
type UpdateReplicationBody ¶ added in v1.10.0
type UpdateReplicationBody struct { Proxy string `json:"proxy"` // contains filtered or unexported fields }
func CreateUpdateReplicationBody ¶ added in v1.10.0
func CreateUpdateReplicationBody(params ReplicationParams) *UpdateReplicationBody