distribution

package
v1.41.1 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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePathMappings

func CreatePathMappings(input, output string) []utils.PathMapping

Create the path mapping from the input spec

func CreatePathMappingsFromPatternAndTarget

func CreatePathMappingsFromPatternAndTarget(pattern, target string) []utils.PathMapping

Create the path mapping from the input spec which includes pattern and target

func DoDistribute

func DoDistribute(dr DistributeReleaseBundleExecutor) (trackerId json.Number, err error)

func GetProjectQueryParam

func GetProjectQueryParam(projectKey string) map[string]string

Types

type DistributeReleaseBundleExecutor

type DistributeReleaseBundleExecutor interface {
	GetHttpClient() *jfroghttpclient.JfrogHttpClient
	ServiceDetails() auth.ServiceDetails
	IsDryRun() bool
	GetRestApi(name, version string) string
	GetDistributeBody() any
	GetDistributionParams() DistributionParams
	GetProjectKey() string
}

type DistributionCommonParams

type DistributionCommonParams struct {
	SiteName     string
	CityName     string
	CountryCodes []string
}

func (*DistributionCommonParams) GetCityName

func (params *DistributionCommonParams) GetCityName() string

func (*DistributionCommonParams) GetCountryCodes

func (params *DistributionCommonParams) GetCountryCodes() []string

func (*DistributionCommonParams) GetSiteName

func (params *DistributionCommonParams) GetSiteName() string

func (*DistributionCommonParams) SetCityName

func (params *DistributionCommonParams) SetCityName(cityName string)

func (*DistributionCommonParams) SetCountryCodes

func (params *DistributionCommonParams) SetCountryCodes(countryCodes []string)

func (*DistributionCommonParams) SetSiteName

func (params *DistributionCommonParams) SetSiteName(siteName string)

type DistributionGetter

type DistributionGetter interface {
	GetSiteName() string
	SetSiteName(siteName string)
	GetCityName() string
	SetCityName(cityName string)
	GetCountryCodes() []string
	SetCountryCodes(countryCodes []string)
}

type DistributionParams

type DistributionParams struct {
	DistributionRules []*DistributionCommonParams
	Name              string
	Version           string
}

func NewDistributeReleaseBundleParams

func NewDistributeReleaseBundleParams(name, version string) DistributionParams

type DistributionResponseBody

type DistributionResponseBody struct {
	TrackerId json.Number `json:"id"`
}

type DistributionRulesBody

type DistributionRulesBody struct {
	SiteName     string   `json:"site_name,omitempty"`
	CityName     string   `json:"city_name,omitempty"`
	CountryCodes []string `json:"country_codes,omitempty"`
}

type DistributionSiteStatus

type DistributionSiteStatus struct {
	Status            DistributionStatus `json:"status,omitempty"`
	Error             string             `json:"general_error,omitempty"`
	TargetArtifactory TargetArtifactory  `json:"target_artifactory,omitempty"`
	TotalFiles        json.Number        `json:"total_files,omitempty"`
	TotalBytes        json.Number        `json:"total_bytes,omitempty"`
	DistributedBytes  json.Number        `json:"distributed_bytes,omitempty"`
	DistributedFiles  json.Number        `json:"distributed_files,omitempty"`
	FileErrors        []string           `json:"file_errors,omitempty"`
	FilesInProgress   []string           `json:"files_in_progress,omitempty"`
}

type DistributionStatus

type DistributionStatus string
const (
	NotDistributed DistributionStatus = "Not distributed"
	InProgress     DistributionStatus = "In progress"
	InQueue        DistributionStatus = "In queue"
	Completed      DistributionStatus = "Completed"
	Failed         DistributionStatus = "Failed"
)

type DistributionStatusResponse

type DistributionStatusResponse struct {
	Id                json.Number              `json:"distribution_id"`
	FriendlyId        json.Number              `json:"distribution_friendly_id,omitempty"`
	Type              DistributionType         `json:"type,omitempty"`
	Name              string                   `json:"release_bundle_name,omitempty"`
	Version           string                   `json:"release_bundle_version,omitempty"`
	Status            DistributionStatus       `json:"status,omitempty"`
	DistributionRules []DistributionRulesBody  `json:"distribution_rules,omitempty"`
	Sites             []DistributionSiteStatus `json:"sites,omitempty"`
}

type DistributionType

type DistributionType string
const (
	Distribute                 DistributionType = "distribute"
	DeleteReleaseBundleVersion DistributionType = "delete_release_bundle_version"
)

type ReleaseBundleDistributeV1Body

type ReleaseBundleDistributeV1Body struct {
	DryRun            bool                    `json:"dry_run"`
	DistributionRules []DistributionRulesBody `json:"distribution_rules"`
	AutoCreateRepo    bool                    `json:"auto_create_missing_repositories,omitempty"`
}

func CreateDistributeV1Body

func CreateDistributeV1Body(distCommonParams []*DistributionCommonParams, dryRun, isAutoCreateRepo bool) ReleaseBundleDistributeV1Body

type TargetArtifactory

type TargetArtifactory struct {
	ServiceId string `json:"service_id"`
	Name      string `json:"name"`
	Type      string `json:"type"`
}

Jump to

Keyboard shortcuts

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