Documentation ¶
Index ¶
Constants ¶
const ApplicationURL = "https://app.planetscale.com"
Variables ¶
This section is empty.
Functions ¶
func CheckAuthentication ¶ added in v0.15.0
CheckAuthentication checks whether the user is authenticated and returns a actionable error message.
func ErrCode ¶ added in v0.12.0
func ErrCode(err error) planetscale.ErrorCode
ErrCode returns the code from a *planetscale.Error, if available. If the error is not of type *planetscale.Error or is nil, it returns an empty, undefined error code.
func MalformedError ¶ added in v0.12.0
MalformedError checks whether the given err is an *planetscale.Error and returns a descriptive, human readable error if the error code is of type planetscale.ErrResponseMalformed. If the error doesn't match these requirements, err is returned unmodified.
func OpenBrowser ¶
OpenBrowser opens a web browser at the specified url.
func RequiredArgs ¶ added in v0.3.1
func RequiredArgs(reqArgs ...string) cobra.PositionalArgs
RequiredArgs returns a short and actionable error message if the given required arguments are not available.
Types ¶
type Helper ¶ added in v0.14.0
type Helper struct { // Config contains globally sourced configuration Config *config.Config // Client returns the PlanetScale API client Client func() (*ps.Client, error) // Printer is used to print output of a command to stdout. Printer *printer.Printer }
Helper is passed to every single command and is used by individual subcommands.