Documentation
¶
Index ¶
- func AddCommand(cmd *Command)
- func Login(r *Request) (string, error)
- func NewAPIRequest(r *Request, api string, args []string, isAsync bool) (map[string]interface{}, error)
- func PrintUsage()
- func PromptAndUploadFilesIfNeeded(r *Request, api string, response map[string]interface{})
- func UploadFiles(r *Request, api string, response map[string]interface{}, validFiles []string)
- func ValidateAndGetFileList(filePaths string) ([]string, error)
- type Command
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPIRequest ¶
func NewAPIRequest(r *Request, api string, args []string, isAsync bool) (map[string]interface{}, error)
NewAPIRequest makes an API request to configured management server
func PromptAndUploadFilesIfNeeded ¶
PromptAndUploadFilesIfNeeded prompts the user to provide file paths for upload and the API is getUploadParamsFor*
func UploadFiles ¶
UploadFiles uploads files to a remote server using parameters from the API response. Shows progress for each file and reports any failures.
func ValidateAndGetFileList ¶
ValidateAndGetFileList parses a comma-separated string of file paths, trims them, checks for existence, and returns a slice of valid file paths or an error if any are missing.
Types ¶
type Command ¶
type Command struct { Name string Help string SubCommands map[string][]string CustomCompleter func(input string, position int) Handle func(*Request) error }
Command describes a CLI command
func FindCommand ¶
FindCommand finds command handler for a command string
Click to show internal directories.
Click to hide internal directories.