Documentation ¶
Index ¶
- Variables
- func AssetRootCmd(creator Creator, upgradeConfigFn pluginapi.UpgradeConfigFn, short string) *cobra.Command
- func BasicConnectionInfoFlags() []distgo.PublisherFlag
- func FilterProductTaskOutputInfoArtifactNames(productTaskOutputInfo *distgo.ProductTaskOutputInfo, ...)
- func GetArtifactNamesExcludeFlagValue(flagVals map[distgo.PublisherFlagName]interface{}) (*regexp.Regexp, error)
- func GetArtifactNamesFilterFlagValue(flagVals map[distgo.PublisherFlagName]interface{}) (*regexp.Regexp, error)
- func GetRequiredGroupID(flagVals map[distgo.PublisherFlagName]interface{}, ...) (string, error)
- func MavenProductPath(productTaskOutputInfo distgo.ProductTaskOutputInfo, groupID string) string
- func PropertyNotSpecifiedError(flag distgo.PublisherFlag) error
- func SetConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, ...) error
- func SetConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndPtrs ...interface{}) error
- func SetRequiredStringConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, ...) error
- func SetRequiredStringConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, ...) error
- type ArtifactExistsFunc
- type BasicConnectionInfo
- func (b *BasicConnectionInfo) SetValuesFromFlags(flagVals map[distgo.PublisherFlagName]interface{}) error
- func (b *BasicConnectionInfo) UploadDistArtifacts(productTaskOutputInfo distgo.ProductTaskOutputInfo, baseURL string, ...) (artifactPaths []string, uploadedURLs []string, rErr error)
- func (b *BasicConnectionInfo) UploadFile(fileInfo FileInfo, baseURL, artifactName string, ...) (rURL string, rErr error)
- type Checksums
- type Creator
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
var ( GroupIDFlag = distgo.PublisherFlag{ Name: "group-id", Description: "the Maven group for the product (overrides value specified in publish configuration)", Type: distgo.StringFlag, } ArtifactNamesFilterFlag = distgo.PublisherFlag{ Name: "filter-artifact-names", Description: "If specified, is interpreted as a Go regular expression and only artifacts with names that match the regular expression are uploaded", Type: distgo.StringFlag, } ArtifactNamesExcludeFlag = distgo.PublisherFlag{ Name: "exclude-artifact-names", Description: "If specified, is interpreted as a Go regular expression and any artifacts with names that match the regular expression are not uploaded", Type: distgo.StringFlag, } ConnectionInfoURLFlag = distgo.PublisherFlag{ Name: "url", Description: "URL for publishing (such as https://repository.domain.com)", Type: distgo.StringFlag, } ConnectionInfoUsernameFlag = distgo.PublisherFlag{ Name: "username", Description: "username for authentication", Type: distgo.StringFlag, } ConnectionInfoPasswordFlag = distgo.PublisherFlag{ Name: "password", Description: "password for authentication", Type: distgo.StringFlag, } )
Functions ¶
func AssetRootCmd ¶
func BasicConnectionInfoFlags ¶
func BasicConnectionInfoFlags() []distgo.PublisherFlag
func FilterProductTaskOutputInfoArtifactNames ¶ added in v1.34.0
func FilterProductTaskOutputInfoArtifactNames(productTaskOutputInfo *distgo.ProductTaskOutputInfo, filterRegexp, excludeRegexp *regexp.Regexp)
FilterProductTaskOutputInfoArtifactNames modifies the provided productTaskOutputInfo such that it only retains dist artifact names that match the provided filterRegexp and do not match the provided excludeRegexp. Is a no-op if both of the provided regular expressions are nil. Only modifies the values in DistArtifactNames (even if all values in DistArtifactNames are removed, the dist info itself is not otherwise modified or removed).
func GetArtifactNamesExcludeFlagValue ¶ added in v1.34.0
func GetArtifactNamesExcludeFlagValue(flagVals map[distgo.PublisherFlagName]interface{}) (*regexp.Regexp, error)
GetArtifactNamesExcludeFlagValue returns the regular expression specified by the ArtifactNamesExcludeFlag in the provided flagVals map. Returns nil if a value was not specified for the flag or if it was blank. Returns an error if a regular expression was specified but is not valid.
func GetArtifactNamesFilterFlagValue ¶ added in v1.34.0
func GetArtifactNamesFilterFlagValue(flagVals map[distgo.PublisherFlagName]interface{}) (*regexp.Regexp, error)
GetArtifactNamesFilterFlagValue returns the regular expression specified by the ArtifactNamesFilterFlag in the provided flagVals map. Returns nil if a value was not specified for the flag or if it was blank. Returns an error if a regular expression was specified but is not valid.
func GetRequiredGroupID ¶
func GetRequiredGroupID(flagVals map[distgo.PublisherFlagName]interface{}, productTaskOutputInfo distgo.ProductTaskOutputInfo) (string, error)
GetRequiredGroupID returns the value for the GroupID based on the provided inputs. If the provided flagVals map contains a non-empty string value for the GroupIDFlag, that value is used. Otherwise, if the PublishOutputInfo for the provided ProductTaskOutputInfo is non-nil, its GroupID value is returned. Returns an empty string if no GroupID value is specified.
func MavenProductPath ¶
func MavenProductPath(productTaskOutputInfo distgo.ProductTaskOutputInfo, groupID string) string
func PropertyNotSpecifiedError ¶
func PropertyNotSpecifiedError(flag distgo.PublisherFlag) error
func SetConfigValue ¶
func SetConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, configValPtr interface{}) error
func SetConfigValues ¶
func SetConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndPtrs ...interface{}) error
func SetRequiredStringConfigValue ¶
func SetRequiredStringConfigValue(flagVals map[distgo.PublisherFlagName]interface{}, flag distgo.PublisherFlag, stringPtr *string) error
func SetRequiredStringConfigValues ¶
func SetRequiredStringConfigValues(flagVals map[distgo.PublisherFlagName]interface{}, flagAndStringPtrs ...interface{}) error
Types ¶
type ArtifactExistsFunc ¶
type ArtifactExistsFunc func(dstFileName string, checksums Checksums, username, password string) bool
ArtifactExistsFunc returns true if the specified file with the specified checksums already exists in the destination.
type BasicConnectionInfo ¶
type BasicConnectionInfo struct { URL string `yaml:"url,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` }
func (*BasicConnectionInfo) SetValuesFromFlags ¶
func (b *BasicConnectionInfo) SetValuesFromFlags(flagVals map[distgo.PublisherFlagName]interface{}) error
func (*BasicConnectionInfo) UploadDistArtifacts ¶
func (b *BasicConnectionInfo) UploadDistArtifacts(productTaskOutputInfo distgo.ProductTaskOutputInfo, baseURL string, artifactExists ArtifactExistsFunc, dryRun bool, stdout io.Writer) (artifactPaths []string, uploadedURLs []string, rErr error)
func (*BasicConnectionInfo) UploadFile ¶
func (b *BasicConnectionInfo) UploadFile(fileInfo FileInfo, baseURL, artifactName string, artifactExists ArtifactExistsFunc, dryRun bool, stdout io.Writer) (rURL string, rErr error)
type Creator ¶
func AssetPublisherCreators ¶
func AssetPublisherCreators(assetPaths ...string) ([]Creator, []distgo.ConfigUpgrader, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
integration_test
Package integration contains the integration tests for distgo.
|
Package integration contains the integration tests for distgo. |
integration_test
Package integration contains the integration tests for distgo.
|
Package integration contains the integration tests for distgo. |
integration_test
Package integration contains the integration tests for distgo.
|
Package integration contains the integration tests for distgo. |
integration_test
Package integration contains the integration tests for distgo.
|
Package integration contains the integration tests for distgo. |