Documentation ¶
Index ¶
- func AskConfirmation(question string, optimistic bool) (bool, error)
- func CopyDir(src, dest string) error
- func CopyFile(src, dest string) error
- func DoAuthorizedReq(ctx infra.DnoteCtx, hc http.Client, method, path, body string) (*http.Response, error)
- func DoReq(ctx infra.DnoteCtx, method, path, body string) (*http.Response, error)
- func FileExists(filepath string) bool
- func GenerateUUID() string
- func PromptInput(message string, dest *string) error
- func PromptPassword(message string, dest *string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
AskConfirmation prompts for user input to confirm a choice
func CopyDir ¶ added in v0.2.0
CopyDir copies a directory from src to dest, recursively copying nested directories
func DoAuthorizedReq ¶ added in v0.4.9
func DoAuthorizedReq(ctx infra.DnoteCtx, hc http.Client, method, path, body string) (*http.Response, error)
DoAuthorizedReq does a http request to the given path in the api endpoint as a user, with the appropriate headers. The given path should include the preceding slash.
func FileExists ¶ added in v0.2.0
FileExists checks if the file exists at the given path
func PromptInput ¶ added in v0.6.0
PromptInput prompts the user input and saves the result to the destination
func PromptPassword ¶ added in v0.6.0
PromptPassword prompts the user input a password and saves the result to the destination. The input is masked, meaning it is not echoed on the terminal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.