services

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var SyncSleepInterval = DefaultSyncSleepInterval

Functions

func GetGetReleaseBundleVersionPromotionsApi

func GetGetReleaseBundleVersionPromotionsApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleCreationStatusRestApi

func GetReleaseBundleCreationStatusRestApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleDistributionsApi

func GetReleaseBundleDistributionsApi(rbDetails ReleaseBundleDetails) string

func GetReleaseBundleSpecificationRestApi

func GetReleaseBundleSpecificationRestApi(rbDetails ReleaseBundleDetails) string

func GetRemoteDeleteReleaseBundleApi

func GetRemoteDeleteReleaseBundleApi(rbDetails ReleaseBundleDetails) string

Types

type ArtifactSource

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

type CommonOptionalQueryParams struct {
	ProjectKey string
	Async      bool
}

type CreateFromAqlSource

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

type CreateFromArtifacts

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

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

type DistributeReleaseBundleService

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 (*DistributeReleaseBundleService) Distribute

func (dr *DistributeReleaseBundleService) Distribute() error

func (*DistributeReleaseBundleService) GetDistributeBody

func (dr *DistributeReleaseBundleService) GetDistributeBody() any

func (*DistributeReleaseBundleService) GetDistributionParams

func (*DistributeReleaseBundleService) GetHttpClient

func (*DistributeReleaseBundleService) GetMaxWaitMinutes

func (dr *DistributeReleaseBundleService) GetMaxWaitMinutes() int

func (*DistributeReleaseBundleService) GetProjectKey

func (dr *DistributeReleaseBundleService) GetProjectKey() string

func (*DistributeReleaseBundleService) GetRestApi

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

func (*DistributeReleaseBundleService) IsDryRun

func (dr *DistributeReleaseBundleService) IsDryRun() bool

func (*DistributeReleaseBundleService) IsSync

func (dr *DistributeReleaseBundleService) IsSync() bool

func (*DistributeReleaseBundleService) ServiceDetails

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

type GetDistributionsResponse

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

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

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

type PathMapping

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

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

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

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

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

type ReleaseBundleExportedStatusResponse

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

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

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

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

func (*ReleaseBundlesService) CreateFromArtifacts

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

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

func (*ReleaseBundlesService) DeleteReleaseBundleVersion

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

func (*ReleaseBundlesService) DeleteReleaseBundleVersionPromotion

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

func (*ReleaseBundlesService) ExportReleaseBundle

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

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

func (*ReleaseBundlesService) GetReleaseBundleVersionPromotions

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

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

type RlExportedStatus

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

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