services

package
v1.44.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultSyncSleepInterval = 10 * time.Second
)

Variables

View Source
var SyncSleepInterval = DefaultSyncSleepInterval

Functions

func GetGetReleaseBundleVersionPromotionsApi added in v1.38.0

func GetGetReleaseBundleVersionPromotionsApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleCreationStatusRestApi

func GetReleaseBundleCreationStatusRestApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleDistributionsApi added in v1.38.0

func GetReleaseBundleDistributionsApi(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 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
}

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 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 PathMapping added in v1.32.0

type PathMapping struct {
	Pattern string
	Target  string
}

type RbCreationBody

type RbCreationBody struct {
	ReleaseBundleDetails
	SourceType SourceType  `json:"source_type,omitempty"`
	Source     interface{} `json:"source,omitempty"`
}

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 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_key,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) 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) CreateReleaseBundle added in v1.38.0

func (rbs *ReleaseBundlesService) CreateReleaseBundle(rbDetails ReleaseBundleDetails, params CommonOptionalQueryParams,
	signingKeyName string, rbSourceType SourceType, source interface{}) 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) 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"
)

Jump to

Keyboard shortcuts

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