distribution

package
v1.35.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 5

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

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)

Types

type DistributeReleaseBundleExecutor

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

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 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(distributeParams DistributionParams, dryRun, isAutoCreateRepo bool) ReleaseBundleDistributeV1Body

Jump to

Keyboard shortcuts

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