Documentation ¶
Index ¶
- Constants
- func CreateSummaryReportString(success, failed int, err error) (string, error)
- func GetBasicBuildToolsFlags() (flags []cli.Flag)
- func GetBuildName(buildName string) string
- func GetBuildUrl(buildUrl string) string
- func GetCliError(err error, success, failed int, failNoOp bool) error
- func GetCommandFlags(cmd string) []cli.Flag
- func GetDocumentationMessage() string
- func GetEnvExclude(envExclude string) string
- func GetIntFlagValue(c *cli.Context, flagName string, defValue int) (int, error)
- func GetInteractiveValue(c *cli.Context) bool
- func GetLegacyGoFlags() (flags []cli.Flag)
- func GetLegacyNpmFlags() (flags []cli.Flag)
- func GetLegacyNugetFlags() (flags []cli.Flag)
- func GetQuietValue(c *cli.Context) bool
- func GetStringsArrFlagValue(c *cli.Context, flagName string) (resultArray []string)
- func GetVersion() string
- func PrintHelpAndReturnError(msg string, context *cli.Context) error
- func PrintSummaryReport(success, failed int, reader *content.ContentReader, rtUrl string, ...) error
- type OnError
Constants ¶
const ( // General CLI constants CliVersion = "1.41.1" ClientAgent = "jfrog-cli-go" // CLI base commands constants: CmdArtifactory = "rt" CmdBintray = "bt" CmdMissionControl = "mc" CmdXray = "xr" CmdCompletion = "completion" CmdPlugin = "plugin" // Download DownloadMinSplitKb = 5120 DownloadSplitCount = 3 DownloadMaxSplitCount = 15 // Common Retries = 3 TokenExpiry = 3600 DefaultLicenseCount = 1 // Env OfferConfig = "JFROG_CLI_OFFER_CONFIG" BuildUrl = "JFROG_CLI_BUILD_URL" EnvExclude = "JFROG_CLI_ENV_EXCLUDE" UserAgent = "JFROG_CLI_USER_AGENT" )
const ( // Artifactory's Commands Keys Config = "config" Upload = "upload" Download = "download" Move = "move" Copy = "copy" Delete = "delete" Properties = "properties" Search = "search" BuildPublish = "build-publish" BuildScan = "build-scan" BuildPromote = "build-promote" BuildDistribute = "build-distribute" BuildDiscard = "build-discard" BuildAddDependencies = "build-add-dependencies" BuildAddGit = "build-add-git" GitLfsClean = "git-lfs-clean" Mvn = "mvn" MvnConfig = "mvn-config" Gradle = "gradle" GradleConfig = "gradle-config" DockerPromote = "docker-promote" DockerPull = "docker-pull" DockerPush = "docker-push" NpmConfig = "npm-config" Npm = "npm" NpmPublish = "npmPublish" NugetConfig = "nuget-config" Nuget = "nuget" Dotnet = "dotnet" DotnetConfig = "dotnet-config" Go = "go" GoConfig = "go-config" GoPublish = "go-publish" GoRecursivePublish = "go-recursive-publish" PipInstall = "pip-install" PipConfig = "pip-config" Ping = "ping" Curl = "curl" ReleaseBundleCreate = "release-bundle-create" ReleaseBundleUpdate = "release-bundle-update" ReleaseBundleSign = "release-bundle-sign" ReleaseBundleDistribute = "release-bundle-distribute" ReleaseBundleDelete = "release-bundle-delete" TemplateConsumer = "template-consumer" RepoDelete = "repo-delete" ReplicationDelete = "replication-delete" PermissionTargetDelete = "permission-target-delete" AccessTokenCreate = "access-token-create" // MC's Commands Keys McConfig = "mc-config" LicenseAcquire = "license-acquire" LicenseDeploy = "license-deploy" LicenseRelease = "license-release" JpdAdd = "jpd-add" JpdDelete = "jpd-delete" // XRay's Commands Keys OfflineUpdate = "offline-update" )
Variables ¶
This section is empty.
Functions ¶
func GetBasicBuildToolsFlags ¶ added in v1.39.0
This function is used for mvn and gradle command validation
func GetBuildName ¶ added in v1.39.5
func GetBuildUrl ¶ added in v1.39.5
func GetCommandFlags ¶ added in v1.39.0
func GetDocumentationMessage ¶
func GetDocumentationMessage() string
func GetEnvExclude ¶ added in v1.39.5
func GetIntFlagValue ¶
func GetInteractiveValue ¶
This function indicates whether the command should be executed in an interactive mode. If the --interactive option was sent, it is used to determine the mode. If not, the mode will be interactive, unless the CI environment variable was set to true.
func GetLegacyGoFlags ¶ added in v1.39.0
This function is used for legacy (deprecated) go command validation
func GetLegacyNpmFlags ¶ added in v1.39.0
This function is used for legacy (deprecated) npm command validation
func GetLegacyNugetFlags ¶ added in v1.39.0
This function is used for legacy (deprecated) nuget command validation
func GetQuietValue ¶
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 GetStringsArrFlagValue ¶
func GetVersion ¶
func GetVersion() string
func PrintSummaryReport ¶
func PrintSummaryReport(success, failed int, reader *content.ContentReader, rtUrl string, originalErr error) error
If a resultReader is provided, we will iterate over the result and print a detailed summary including the affected files.