Documentation
¶
Index ¶
- Constants
- Variables
- func AskYesNo(message string, defaultStr string, label string) (bool, error)
- func CreateDirInJfrogHome(dirName string) (string, error)
- func CreateSummaryReportString(success, failed int, err error) (string, error)
- func ExitOnErr(err error)
- func GetCliError(err error, success, failed int, failNoOp bool) error
- func GetCliPersistentTempDirPath() string
- func GetConfigVersion() string
- func GetDocumentationMessage() string
- func GetIntFlagValue(c *cli.Context, flagName string, defValue int) (int, error)
- func GetInteractiveValue(c *cli.Context) bool
- func GetJfrogBackupDir() (string, error)
- func GetJfrogCertsDir() (string, error)
- func GetJfrogHomeDir() (string, error)
- func GetJfrogSecurityConfFilePath() (string, error)
- func GetJfrogSecurityDir() (string, error)
- func GetQuietValue(c *cli.Context) bool
- func GetStringsArrFlagValue(c *cli.Context, flagName string) (resultArray []string)
- func GetUserAgent() string
- func GetVersion() string
- func InteractiveConfirm(message string, defaultValue bool) bool
- func IsLinux() bool
- func IsWindows() bool
- func PanicOnError(err error) error
- func PrintHelpAndReturnError(msg string, context *cli.Context) error
- func PrintSummaryReport(success, failed int, resultReader *content.ContentReader, rtUrl string, ...) error
- func ReplaceVars(content []byte, specVars map[string]string) []byte
- func SpecVarsStringToMap(rawVars string) map[string]string
- func SumTrueValues(boolArr []bool) int
- type CliError
- type Credentials
- type ExitCode
- type OnError
Constants ¶
const ( // General CLI constants CliVersion = "1.38.3" ClientAgent = "jfrog-cli-go" OnErrorPanic OnError = "panic" // CLI base commands constants: CmdArtifactory = "rt" CmdBintray = "bt" CmdMissionControl = "mc" CmdXray = "xr" CmdCompletion = "completion" // Download DownloadMinSplitKb = 5120 DownloadSplitCount = 3 DownloadMaxSplitCount = 15 // Common Retries = 3 TokenRefreshDisabled = 0 TokenRefreshDefaultInterval = 60 TokenExpiry = 3600 // Home Dir JfrogCertsDirName = "certs" JfrogConfigFile = "jfrog-cli.conf" JfrogDependenciesDirName = "dependencies" JfrogSecurityDirName = "security" JfrogSecurityConfFile = "security.yaml" JfrogBackupDirName = "backup" JfrogLogsDirName = "logs" JfrogLockDirName = "lock" // Env ReportUsage = "JFROG_CLI_REPORT_USAGE" LogLevel = "JFROG_CLI_LOG_LEVEL" OfferConfig = "JFROG_CLI_OFFER_CONFIG" HomeDir = "JFROG_CLI_HOME_DIR" ErrorHandling = "JFROG_CLI_ERROR_HANDLING" TempDir = "JFROG_CLI_TEMP_DIR" CI = "CI" DependenciesDir = "JFROG_CLI_DEPENDENCIES_DIR" BuildName = "JFROG_CLI_BUILD_NAME" BuildNumber = "JFROG_CLI_BUILD_NUMBER" BuildUrl = "JFROG_CLI_BUILD_URL" EnvExclude = "JFROG_CLI_ENV_EXCLUDE" UserAgent = "JFROG_CLI_USER_AGENT" // Deprecated: JfrogHomeEnv = "JFROG_CLI_HOME" )
Variables ¶
var ExitCodeError = ExitCode{1}
var ExitCodeFailNoOp = ExitCode{2}
var ExitCodeNoError = ExitCode{0}
var ExitCodeVulnerableBuild = ExitCode{3}
Functions ¶
func CreateDirInJfrogHome ¶
func GetCliPersistentTempDirPath ¶
func GetCliPersistentTempDirPath() string
Return the path of CLI temp dir. This path should be persistent, meaning - should not be cleared at the end of a CLI run.
func GetConfigVersion ¶
func GetConfigVersion() string
func GetDocumentationMessage ¶
func GetDocumentationMessage() string
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 GetJfrogBackupDir ¶
func GetJfrogCertsDir ¶
func GetJfrogHomeDir ¶
func GetJfrogSecurityDir ¶
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 GetUserAgent ¶
func GetUserAgent() string
func GetVersion ¶
func GetVersion() string
func InteractiveConfirm ¶
func PanicOnError ¶
func PrintSummaryReport ¶
func PrintSummaryReport(success, failed int, resultReader *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.