services

package
v1.54.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Tag               = "tag"
	PropertiesBaseApi = "api/storage"
)
View Source
const (
	DefaultSyncSleepInterval = 10 * time.Second
)

Variables

View Source
var SyncSleepInterval = DefaultSyncSleepInterval

Functions

func GetDeletePropParams added in v1.53.0

func GetDeletePropParams(params AnnotateOperationParams) map[string]string

func GetGetReleaseBundleVersionPromotionsApi added in v1.38.0

func GetGetReleaseBundleVersionPromotionsApi(rbDetails ReleaseBundleDetails) string

func GetIsExistReleaseBundleApi added in v1.49.1

func GetIsExistReleaseBundleApi(releaseBundleNameAndVersion string) string

func GetPropQueryParam added in v1.53.0

func GetPropQueryParam(params AnnotateOperationParams) map[string]string

func GetReleaseBundleCreationStatusRestApi

func GetReleaseBundleCreationStatusRestApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleDistributionsApi added in v1.38.0

func GetReleaseBundleDistributionsApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleSetTagApi added in v1.53.0

func GetReleaseBundleSetTagApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleSpecificationRestApi added in v1.38.0

func GetReleaseBundleSpecificationRestApi(rbDetails ReleaseBundleDetails) string

func GetRemoteDeleteReleaseBundleApi added in v1.38.0

func GetRemoteDeleteReleaseBundleApi(rbDetails ReleaseBundleDetails) string

Types

type AnnotateOperationParams added in v1.53.0

type AnnotateOperationParams struct {
	RbTag          RbAnnotationTag
	RbProps        RbAnnotationProps
	RbDelProps     RbDelProps
	RbDetails      ReleaseBundleDetails
	QueryParams    CommonOptionalQueryParams
	PropertyParams CommonPropParams
	ArtifactoryUrl ArtCommonParams
}

type ArtCommonParams added in v1.53.0

type ArtCommonParams struct {
	Url string `json:"url"`
}

type ArtifactSource added in v1.38.0

type ArtifactSource struct {
	Path   string `json:"path,omitempty"`
	Sha256 string `json:"sha256,omitempty"`
}

type BuildSource

type BuildSource struct {
	BuildName           string `json:"build_name,omitempty"`
	BuildNumber         string `json:"build_number,omitempty"`
	BuildRepository     string `json:"build_repository,omitempty"`
	IncludeDependencies bool   `json:"include_dependencies,omitempty"`
}

type CommonOptionalQueryParams added in v1.37.0

type CommonOptionalQueryParams struct {
	ProjectKey    string
	Async         bool
	PromotionType string
}

type CommonPropParams added in v1.53.0

type CommonPropParams struct {
	Path      string `json:"path"`
	Recursive bool   `json:"recursive"`
}

type CreateFromAqlSource added in v1.38.0

type CreateFromAqlSource struct {
	Aql string `json:"aql,omitempty"`
}

type CreateFromArtifacts added in v1.38.0

type CreateFromArtifacts struct {
	Artifacts []ArtifactSource `json:"artifacts,omitempty"`
}

type CreateFromBuildsSource

type CreateFromBuildsSource struct {
	Builds []BuildSource `json:"builds,omitempty"`
}

type CreateFromPackagesSource added in v1.54.2

type CreateFromPackagesSource struct {
	Packages []PackageSource `json:"packages,omitempty"`
}

type CreateFromReleaseBundlesSource

type CreateFromReleaseBundlesSource struct {
	ReleaseBundles []ReleaseBundleSource `json:"release_bundles,omitempty"`
}

type DistributeReleaseBundleParams added in v1.38.0

type DistributeReleaseBundleParams struct {
	Sync              bool
	AutoCreateRepo    bool
	MaxWaitMinutes    int
	DistributionRules []*distribution.DistributionCommonParams
	PathMappings      []PathMapping
	ProjectKey        string
}

type DistributeReleaseBundleService added in v1.32.0

type DistributeReleaseBundleService struct {
	LcDetails        auth.ServiceDetails
	DryRun           bool
	AutoCreateRepo   bool
	Sync             bool
	MaxWaitMinutes   int
	DistributeParams distribution.DistributionParams
	ProjectKey       string
	Modifications
	// contains filtered or unexported fields
}

func NewDistributeReleaseBundleService added in v1.32.0

func NewDistributeReleaseBundleService(client *jfroghttpclient.JfrogHttpClient) *DistributeReleaseBundleService

func (*DistributeReleaseBundleService) Distribute added in v1.32.0

func (dr *DistributeReleaseBundleService) Distribute() error

func (*DistributeReleaseBundleService) GetDistributeBody added in v1.32.0

func (dr *DistributeReleaseBundleService) GetDistributeBody() any

func (*DistributeReleaseBundleService) GetDistributionParams added in v1.32.0

func (*DistributeReleaseBundleService) GetHttpClient added in v1.32.0

func (*DistributeReleaseBundleService) GetMaxWaitMinutes added in v1.38.0

func (dr *DistributeReleaseBundleService) GetMaxWaitMinutes() int

func (*DistributeReleaseBundleService) GetProjectKey added in v1.38.0

func (dr *DistributeReleaseBundleService) GetProjectKey() string

func (*DistributeReleaseBundleService) GetRestApi added in v1.32.0

func (dr *DistributeReleaseBundleService) GetRestApi(name, version string) string

func (*DistributeReleaseBundleService) IsDryRun added in v1.32.0

func (dr *DistributeReleaseBundleService) IsDryRun() bool

func (*DistributeReleaseBundleService) IsSync added in v1.38.0

func (dr *DistributeReleaseBundleService) IsSync() bool

func (*DistributeReleaseBundleService) ServiceDetails added in v1.32.0

func (dr *DistributeReleaseBundleService) ServiceDetails() auth.ServiceDetails

type GetDistributionsResponse added in v1.38.0

type GetDistributionsResponse []struct {
	FriendlyId           json.Number `json:"distribution_tracker_friendly_id"`
	Type                 string      `json:"type"`
	ReleaseBundleName    string      `json:"release_bundle_name"`
	ReleaseBundleVersion string      `json:"release_bundle_version"`
	Repository           string      `json:"storing_repository"`
	Status               RbStatus    `json:"status"`
	DistributedBy        string      `json:"distributed_by"`
	Created              string      `json:"created"`
	StartTime            string      `json:"start_time"`
	FinishTime           string      `json:"finish_time"`
	Targets              []string    `json:"targets"`
}

type GetPromotionsOptionalQueryParams added in v1.38.0

type GetPromotionsOptionalQueryParams struct {
	Include    string
	Offset     int
	Limit      int
	FilterBy   string
	OrderBy    string
	OrderAsc   bool
	ProjectKey string
}

type Message

type Message struct {
	Source  string `json:"source,omitempty"`
	Text    string `json:"text,omitempty"`
	Created string `json:"created,omitempty"`
}

type Modifications added in v1.32.0

type Modifications struct {
	PathMappings []utils.PathMapping `json:"mappings"`
}

type PackageSource added in v1.54.2

type PackageSource struct {
	PackageName    string `json:"package_name,omitempty"`
	PackageVersion string `json:"package_version,omitempty"`
	PackageType    string `json:"package_type,omitempty"`
	RepositoryKey  string `json:"repository_key,omitempty"`
}

type PathMapping added in v1.32.0

type PathMapping struct {
	Pattern string
	Target  string
}

type RbAnnotationProps added in v1.53.0

type RbAnnotationProps struct {
	Properties map[string][]string `json:"properties,omitempty"`
	Exist      bool                `json:"exist"`
}

func (*RbAnnotationProps) PropertiesToString added in v1.53.0

func (r *RbAnnotationProps) PropertiesToString() string

type RbAnnotationTag added in v1.53.0

type RbAnnotationTag struct {
	Tag   string `json:"tag,omitempty"`
	Exist bool   `json:"exist"`
}

type RbCreationBody

type RbCreationBody struct {
	ReleaseBundleDetails
	SourceType SourceType  `json:"source_type,omitempty"`
	Source     interface{} `json:"source,omitempty"`
	Sources    []RbSource  `json:"sources,omitempty"`
}

type RbDelProps added in v1.53.0

type RbDelProps struct {
	Keys  string `json:"keys"`
	Exist bool   `json:"exist"`
}

type RbPromotion added in v1.38.0

type RbPromotion struct {
	Status               RbStatus    `json:"status,omitempty"`
	RepositoryKey        string      `json:"repository_key,omitempty"`
	ReleaseBundleName    string      `json:"release_bundle_name,omitempty"`
	ReleaseBundleVersion string      `json:"release_bundle_version,omitempty"`
	Environment          string      `json:"environment,omitempty"`
	ServiceId            string      `json:"service_id,omitempty"`
	CreatedBy            string      `json:"created_by,omitempty"`
	Created              string      `json:"created,omitempty"`
	CreatedMillis        json.Number `json:"created_millis,omitempty"`
	Messages             []Message   `json:"messages,omitempty"`
}

type RbPromotionBody

type RbPromotionBody struct {
	Environment            string   `json:"environment,omitempty"`
	IncludedRepositoryKeys []string `json:"included_repository_keys,omitempty"`
	ExcludedRepositoryKeys []string `json:"excluded_repository_keys,omitempty"`
}

type RbPromotionParams added in v1.37.0

type RbPromotionParams struct {
	Environment            string
	IncludedRepositoryKeys []string
	ExcludedRepositoryKeys []string
}

type RbPromotionResp

type RbPromotionResp struct {
	RepositoryKey string `json:"repository_key,omitempty"`
	ReleaseBundleDetails
	RbPromotionBody
	Created       string      `json:"created,omitempty"`
	CreatedMillis json.Number `json:"created_millis,omitempty"`
}

type RbPromotionsResponse added in v1.38.0

type RbPromotionsResponse struct {
	Promotions []RbPromotion `json:"promotions,omitempty"`
}

type RbSource added in v1.54.2

type RbSource struct {
	SourceType     SourceType            `json:"source_type"`
	Builds         []BuildSource         `json:"builds,omitempty"`
	ReleaseBundles []ReleaseBundleSource `json:"release_bundles,omitempty"`
	Artifacts      []ArtifactSource      `json:"artifacts,omitempty"`
	Packages       []PackageSource       `json:"packages,omitempty"`
	Aql            string                `json:"aql,omitempty"`
}

type RbStatus

type RbStatus string
const (
	Completed  RbStatus = "COMPLETED"
	Processing RbStatus = "PROCESSING"
	InProgress RbStatus = "IN_PROGRESS"
	Pending    RbStatus = "PENDING"
	Failed     RbStatus = "FAILED"
	Rejected   RbStatus = "REJECTED"
	Deleting   RbStatus = "DELETING"
	Started    RbStatus = "STARTED"
)

type ReleaseBundleDetails

type ReleaseBundleDetails struct {
	ReleaseBundleName    string `json:"release_bundle_name,omitempty"`
	ReleaseBundleVersion string `json:"release_bundle_version,omitempty"`
}

type ReleaseBundleDistributeBody added in v1.32.0

type ReleaseBundleDistributeBody struct {
	distribution.ReleaseBundleDistributeV1Body
	Modifications `json:"modifications"`
}

type ReleaseBundleExportedStatusResponse added in v1.39.0

type ReleaseBundleExportedStatusResponse struct {
	Status      RlExportedStatus `json:"status,omitempty"`
	RelativeUrl string           `json:"relative_download_url,omitempty"`
	DownloadUrl string           `json:"download_url,omitempty"`
}

type ReleaseBundleOperation

type ReleaseBundleOperation interface {
	// contains filtered or unexported methods
}

type ReleaseBundleRemoteDeleteParams added in v1.38.0

type ReleaseBundleRemoteDeleteParams struct {
	DistributionRules []*distribution.DistributionCommonParams
	DryRun            bool
	// Max time in minutes to wait for sync distribution to finish.
	MaxWaitMinutes int
	CommonOptionalQueryParams
}

type ReleaseBundleSource

type ReleaseBundleSource struct {
	ReleaseBundleName    string `json:"release_bundle_name,omitempty"`
	ReleaseBundleVersion string `json:"release_bundle_version,omitempty"`
	ProjectKey           string `json:"project,omitempty"`
}

type ReleaseBundleSpecResponse added in v1.38.0

type ReleaseBundleSpecResponse struct {
	CreatedBy     string    `json:"created_by,omitempty"`
	Created       time.Time `json:"created"`
	CreatedMillis int       `json:"created_millis,omitempty"`
	Artifacts     []struct {
		Path                string `json:"path,omitempty"`
		Checksum            string `json:"checksum,omitempty"`
		SourceRepositoryKey string `json:"source_repository_key,omitempty"`
		PackageType         string `json:"package_type,omitempty"`
		Size                int    `json:"size,omitempty"`
		Properties          []struct {
			Key    string   `json:"key"`
			Values []string `json:"values"`
		} `json:"properties,omitempty"`
	} `json:"artifacts,omitempty"`
}

type ReleaseBundleStatusResponse

type ReleaseBundleStatusResponse struct {
	Status   RbStatus  `json:"status,omitempty"`
	Messages []Message `json:"messages,omitempty"`
}

type ReleaseBundlesService

type ReleaseBundlesService struct {
	// contains filtered or unexported fields
}

func NewReleaseBundlesService

func NewReleaseBundlesService(lcDetails auth.ServiceDetails, client *jfroghttpclient.JfrogHttpClient) *ReleaseBundlesService

func (*ReleaseBundlesService) AnnotateReleaseBundle added in v1.53.0

func (rbs *ReleaseBundlesService) AnnotateReleaseBundle(params AnnotateOperationParams) error

func (*ReleaseBundlesService) CreateFromAql added in v1.38.0

func (rbs *ReleaseBundlesService) CreateFromAql(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, signingKeyName string, aqlQuery string) error

func (*ReleaseBundlesService) CreateFromArtifacts added in v1.38.0

func (rbs *ReleaseBundlesService) CreateFromArtifacts(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, signingKeyName string, sourceArtifacts CreateFromArtifacts) error

func (*ReleaseBundlesService) CreateFromBuilds

func (rbs *ReleaseBundlesService) CreateFromBuilds(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, signingKeyName string, sourceBuilds CreateFromBuildsSource) error

func (*ReleaseBundlesService) CreateFromBundles

func (rbs *ReleaseBundlesService) CreateFromBundles(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, signingKeyName string, sourceReleaseBundles CreateFromReleaseBundlesSource) error

func (*ReleaseBundlesService) CreateFromPackages added in v1.54.2

func (rbs *ReleaseBundlesService) CreateFromPackages(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, signingKeyName string, sourcePackages CreateFromPackagesSource) error

func (*ReleaseBundlesService) CreateReleaseBundle added in v1.38.0

func (rbs *ReleaseBundlesService) CreateReleaseBundle(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams,
	signingKeyName string, rbSourceType SourceType, source interface{}) error

func (*ReleaseBundlesService) CreateReleaseBundleFromMultipleSources added in v1.54.2

func (rbs *ReleaseBundlesService) CreateReleaseBundleFromMultipleSources(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams,
	signingKeyName string, sources []RbSource) (response []byte, err error)

func (*ReleaseBundlesService) DeleteReleaseBundleVersion added in v1.38.0

func (rbs *ReleaseBundlesService) DeleteReleaseBundleVersion(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams) error

func (*ReleaseBundlesService) DeleteReleaseBundleVersionPromotion added in v1.38.0

func (rbs *ReleaseBundlesService) DeleteReleaseBundleVersionPromotion(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams, createdMillis string) error

func (*ReleaseBundlesService) ExportReleaseBundle added in v1.39.0

func (rbs *ReleaseBundlesService) ExportReleaseBundle(rbDetails ReleaseBundleDetails, modifications Modifications, queryParams CommonOptionalQueryParams) (exportResponse ReleaseBundleExportedStatusResponse, err error)

func (*ReleaseBundlesService) GetLifecycleDetails

func (rbs *ReleaseBundlesService) GetLifecycleDetails() auth.ServiceDetails

func (*ReleaseBundlesService) GetReleaseBundleCreationStatus

func (rbs *ReleaseBundlesService) GetReleaseBundleCreationStatus(rbDetails ReleaseBundleDetails, projectKey string, sync bool) (ReleaseBundleStatusResponse, error)

func (*ReleaseBundlesService) GetReleaseBundlePromotionStatus

func (rbs *ReleaseBundlesService) GetReleaseBundlePromotionStatus(rbDetails ReleaseBundleDetails, projectKey, createdMillis string, sync bool) (ReleaseBundleStatusResponse, error)

func (*ReleaseBundlesService) GetReleaseBundleSpecification added in v1.38.0

func (rbs *ReleaseBundlesService) GetReleaseBundleSpecification(rbDetails ReleaseBundleDetails) (specResp ReleaseBundleSpecResponse, err error)

func (*ReleaseBundlesService) GetReleaseBundleVersionPromotions added in v1.38.0

func (rbs *ReleaseBundlesService) GetReleaseBundleVersionPromotions(rbDetails ReleaseBundleDetails, optionalQueryParams GetPromotionsOptionalQueryParams) (response RbPromotionsResponse, err error)

func (*ReleaseBundlesService) Promote

func (rbs *ReleaseBundlesService) Promote(rbDetails ReleaseBundleDetails, queryParams CommonOptionalQueryParams, signingKeyName string, promotionParams RbPromotionParams) (RbPromotionResp, error)

func (*ReleaseBundlesService) ReleaseBundleExists added in v1.49.1

func (rbs *ReleaseBundlesService) ReleaseBundleExists(rbName, rbVersion, projectKey string) (bool, error)

func (*ReleaseBundlesService) RemoteDeleteReleaseBundle added in v1.32.3

func (rbs *ReleaseBundlesService) RemoteDeleteReleaseBundle(rbDetails ReleaseBundleDetails, params ReleaseBundleRemoteDeleteParams) error

type RlExportedStatus added in v1.39.0

type RlExportedStatus string
const (
	ExportCompleted    RlExportedStatus = "COMPLETED"
	ExportProcessing   RlExportedStatus = "IN_PROGRESS"
	ExportFailed       RlExportedStatus = "FAILED"
	ExportNotTriggered RlExportedStatus = "NOT_TRIGGERED"
)

type SourceBuildDetails

type SourceBuildDetails struct {
	BuildName   string
	BuildNumber string
	ProjectKey  string
}

type SourceType added in v1.38.0

type SourceType string
const (
	Aql            SourceType = "aql"
	Artifacts      SourceType = "artifacts"
	Builds         SourceType = "builds"
	ReleaseBundles SourceType = "release_bundles"
	Packages       SourceType = "packages"
)

Jump to

Keyboard shortcuts

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