Documentation
¶
Index ¶
- func CleanupResult(result *commandUtils.Result, err *error)
- func CreateArtifactoryDetailsByFlags(c *components.Context) (*coreConfig.ServerDetails, error)
- func CreateBuildConfiguration(c *components.Context) *build.BuildConfiguration
- func CreateBuildConfigurationWithModule(c *components.Context) (buildConfigConfiguration *buildUtils.BuildConfiguration, err error)
- func CreateServerDetailsFromFlags(c *components.Context) (details *config.ServerDetails, err error)
- func CreateServerDetailsWithConfigOffer(c *components.Context, excludeRefreshableTokens bool, ...) (*config.ServerDetails, error)
- func CreateSummaryReportString(success, failed int, failNoOp bool, err error) (string, error)
- func ExtractArguments(context *components.Context) []string
- func ExtractCommand(c *components.Context) []string
- func FixWinPathsForFileSystemSourcedCmds(uploadSpec *spec.SpecFiles, c *components.Context)
- func GetBuildName(buildName string) string
- func GetBuildUrl(buildUrl string) string
- func GetCliError(err error, success, failed int, failNoOp bool) error
- func GetCommandFlags(cmdKey string, commandToFlags map[string][]string, ...) []components.Flag
- func GetDetailedSummary(c *components.Context) bool
- func GetDocumentationMessage() string
- func GetEnvExclude(envExclude string) string
- func GetFileSystemSpec(c *components.Context) (fsSpec *spec.SpecFiles, err error)
- func GetPrintCurrentCmdHelp(c *components.Context) func() error
- func GetProject(c *components.Context) string
- func GetQuietValue(c *components.Context) bool
- func GetServerDetails(c *components.Context) (*config.ServerDetails, error)
- func GetServerIdFlag() components.StringFlag
- func GetStringsArrFlagValue(c *components.Context, flagName string) (resultArray []string)
- func GetThreadsCount(c *components.Context) (threads int, err error)
- func HandleSecretInput(c *components.Context, stringFlag, stdinFlag string) (secret string, err error)
- func IsFailNoOp(context *components.Context) bool
- func OverrideArrayIfSet(field *[]string, c *components.Context, fieldName string)
- func OverrideIntIfSet(field *int, c *components.Context, fieldName string)
- func OverrideSpecFieldsIfSet(spec *spec.File, c *components.Context)
- func OverrideStringIfSet(field *string, c *components.Context, fieldName string)
- func PrintBriefSummaryReport(success, failed int, failNoOp bool, originalErr error) error
- func PrintCommandSummary(result *commandUtils.Result, ...) (err error)
- func PrintDeploymentView(reader *content.ContentReader) error
- func PrintDetailedSummaryReport(basicSummary string, reader *content.ContentReader, uploaded bool, ...) error
- func PrintHelpAndReturnError(msg string, context *components.Context) error
- func RunCmdWithDeprecationWarning(cmdName, oldSubcommand string, c *components.Context, ...) error
- func ShowCmdHelpIfNeeded(c *components.Context, args []string) (bool, error)
- func WrongNumberOfArgumentsHandler(context *components.Context) error
- type DetailedSummaryRecord
- type ExtendedDetailedSummaryRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupResult ¶
func CleanupResult(result *commandUtils.Result, err *error)
func CreateArtifactoryDetailsByFlags ¶
func CreateArtifactoryDetailsByFlags(c *components.Context) (*coreConfig.ServerDetails, error)
func CreateBuildConfiguration ¶
func CreateBuildConfiguration(c *components.Context) *build.BuildConfiguration
Returns build configuration struct using the args (build name/number) and options (project) provided by the user. Any empty configuration could be later overridden by environment variables if set.
func CreateBuildConfigurationWithModule ¶
func CreateBuildConfigurationWithModule(c *components.Context) (buildConfigConfiguration *buildUtils.BuildConfiguration, err error)
Returns build configuration struct using the options provided by the user. Any empty configuration could be later overridden by environment variables if set.
func CreateServerDetailsFromFlags ¶
func CreateServerDetailsFromFlags(c *components.Context) (details *config.ServerDetails, err error)
func CreateServerDetailsWithConfigOffer ¶
func CreateServerDetailsWithConfigOffer(c *components.Context, excludeRefreshableTokens bool, domain cliUtils.CommandDomain) (*config.ServerDetails, error)
Exclude refreshable tokens parameter should be true when working with external tools (build tools, curl, etc) or when sending requests not via ArtifactoryHttpClient.
func ExtractArguments ¶
func ExtractArguments(context *components.Context) []string
func ExtractCommand ¶
func ExtractCommand(c *components.Context) []string
func FixWinPathsForFileSystemSourcedCmds ¶
func FixWinPathsForFileSystemSourcedCmds(uploadSpec *spec.SpecFiles, c *components.Context)
func GetBuildName ¶
func GetBuildUrl ¶
func GetCommandFlags ¶
func GetCommandFlags(cmdKey string, commandToFlags map[string][]string, flagsMap map[string]components.Flag) []components.Flag
Return a sorted list of a command's flags by a given command key.
func GetDetailedSummary ¶
func GetDetailedSummary(c *components.Context) bool
func GetDocumentationMessage ¶
func GetDocumentationMessage() string
func GetEnvExclude ¶
func GetFileSystemSpec ¶
func GetFileSystemSpec(c *components.Context) (fsSpec *spec.SpecFiles, err error)
func GetPrintCurrentCmdHelp ¶
func GetPrintCurrentCmdHelp(c *components.Context) func() error
func GetProject ¶
func GetProject(c *components.Context) string
Get project key from flag or environment variable
func GetQuietValue ¶
func GetQuietValue(c *components.Context) bool
This function indicates whether the command should be executed without confirmation warning or not. If the --quiet option was sent, it is used to determine whether to prompt the confirmation or not. If not, the command will prompt the confirmation, unless the CI environment variable was set to true.
func GetServerDetails ¶
func GetServerDetails(c *components.Context) (*config.ServerDetails, error)
Return the Artifactory Details of the provided 'server-id', or the default one.
func GetStringsArrFlagValue ¶
func GetStringsArrFlagValue(c *components.Context, flagName string) (resultArray []string)
func GetThreadsCount ¶
func GetThreadsCount(c *components.Context) (threads int, err error)
func HandleSecretInput ¶
func HandleSecretInput(c *components.Context, stringFlag, stdinFlag string) (secret string, err error)
Get a secret value from a flag or from stdin.
func IsFailNoOp ¶
func IsFailNoOp(context *components.Context) bool
func OverrideArrayIfSet ¶
func OverrideArrayIfSet(field *[]string, c *components.Context, fieldName string)
If `fieldName` exist in the cli args, read it to `field` as an array split by `;`.
func OverrideIntIfSet ¶
func OverrideIntIfSet(field *int, c *components.Context, fieldName string)
If `fieldName` exist in the cli args, read it to `field` as a int.
func OverrideSpecFieldsIfSet ¶
func OverrideSpecFieldsIfSet(spec *spec.File, c *components.Context)
func OverrideStringIfSet ¶
func OverrideStringIfSet(field *string, c *components.Context, fieldName string)
If `fieldName` exist in the cli args, read it to `field` as a string.
func PrintBriefSummaryReport ¶
func PrintCommandSummary ¶
func PrintCommandSummary(result *commandUtils.Result, detailedSummary, printDeploymentView, failNoOp bool, originalErr error) (err error)
func PrintDeploymentView ¶
func PrintDeploymentView(reader *content.ContentReader) error
Print a file tree based on the items' path in the reader's list.
func PrintDetailedSummaryReport ¶
func PrintDetailedSummaryReport(basicSummary string, reader *content.ContentReader, uploaded bool, originalErr error) error
Prints a summary report. If a resultReader is provided, we will iterate over the result and print a detailed summary including the affected files.
func PrintHelpAndReturnError ¶
func PrintHelpAndReturnError(msg string, context *components.Context) error
func RunCmdWithDeprecationWarning ¶
func RunCmdWithDeprecationWarning(cmdName, oldSubcommand string, c *components.Context, cmd func(c *components.Context) error) error
func ShowCmdHelpIfNeeded ¶
func ShowCmdHelpIfNeeded(c *components.Context, args []string) (bool, error)
This function checks whether the command received --help as a single option. If it did, the command's help is shown and true is returned. This function should be used iff the SkipFlagParsing option is used.
func WrongNumberOfArgumentsHandler ¶
func WrongNumberOfArgumentsHandler(context *components.Context) error
Types ¶
type DetailedSummaryRecord ¶
type ExtendedDetailedSummaryRecord ¶
type ExtendedDetailedSummaryRecord struct {
DetailedSummaryRecord
Sha256 string `json:"sha256"`
}