Documentation ¶
Index ¶
- Constants
- func CreateServerDetailsWithConfigOffer(createServerDetails func() (*config.ServerDetails, error), ...) (*config.ServerDetails, error)
- func FixWinPathBySource(path string, fromSpec bool) string
- func FixWinPathsForFileSystemSourcedCmds(uploadSpec *spec.SpecFiles, specFlag, exclusionsFlag bool)
- func GetCLIDocumentationMessage() string
- func GetThreadsCount(threadCountStrVal string) (threads int, err error)
- func HandleSecretInput(stringFlag, secretRaw, stdinFlag string, isStdin bool) (secret string, err error)
- func LogNonGenericAuditCommandDeprecation(cmdName string)
- func LogNonNativeCommandDeprecation(cmdName, oldSubcommand string)
- func OfferConfig(createServerDetails func() (*config.ServerDetails, error)) (*config.ServerDetails, error)
- func PrintHelpAndReturnError(msg string, printHelp func() error) error
- func ShouldLogWarning() bool
- func ShouldOfferConfig() (bool, error)
- func ShowCmdHelpIfNeeded(args []string, printHelp func() error) (bool, error)
- func ShowGenericCmdHelpIfNeeded(args []string, printHelp func() error) (bool, error)
- func WrongNumberOfArgumentsHandler(argCount int, printHelp func() error) error
- type CommandDomain
Constants ¶
const ( // Common Threads = 3 // Environment variables JfrogCliAvoidDeprecationWarnings = "JFROG_CLI_AVOID_DEPRECATION_WARNINGS" )
Variables ¶
This section is empty.
Functions ¶
func CreateServerDetailsWithConfigOffer ¶
func CreateServerDetailsWithConfigOffer(createServerDetails func() (*config.ServerDetails, error), excludeRefreshableTokens bool) (*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 FixWinPathBySource ¶
func GetCLIDocumentationMessage ¶
func GetCLIDocumentationMessage() string
func GetThreadsCount ¶
func HandleSecretInput ¶
func HandleSecretInput(stringFlag, secretRaw, stdinFlag string, isStdin bool) (secret string, err error)
Get a secret value from a flag or from stdin.
func LogNonGenericAuditCommandDeprecation ¶
func LogNonGenericAuditCommandDeprecation(cmdName string)
func LogNonNativeCommandDeprecation ¶
func LogNonNativeCommandDeprecation(cmdName, oldSubcommand string)
func OfferConfig ¶
func OfferConfig(createServerDetails func() (*config.ServerDetails, error)) (*config.ServerDetails, error)
func PrintHelpAndReturnError ¶
func ShouldLogWarning ¶
func ShouldLogWarning() bool
func ShouldOfferConfig ¶
func ShowCmdHelpIfNeeded ¶
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 ShowGenericCmdHelpIfNeeded ¶
This function checks whether the command received --help as a single option. This function should be used iff the SkipFlagParsing option is used. Generic commands such as docker, don't have dedicated subcommands. As a workaround, printing the help of their subcommands, we use a dummy command with no logic but the help message. to trigger the print of those dummy commands, each generic command must decide what cmdName it needs to pass to this function. For example, 'jf docker scan --help' passes cmdName='dockerscanhelp' to print our help and not the origin from docker client/cli.
Types ¶
type CommandDomain ¶
type CommandDomain string
const ( Rt CommandDomain = "rt" Ds CommandDomain = "ds" Xr CommandDomain = "xr" Platform CommandDomain = "platform" )