Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupCmd = &cobra.Command{
Use: "wordpress",
Short: "Wordpress commands",
}
View Source
var InstallCmd = &cobra.Command{ Use: "install <username>", Short: "Install WordPress", Long: "Install WordPress on an existing website.\n\nThe website must already exist before calling this endpoint. To create a new\nwebsite first, use POST /api/hosting/v1/websites and poll\nGET /api/hosting/v1/websites until it appears.\n\nCall GET /api/hosting/v1/wordpress/installations filtered by username and\ndomain before proceeding to check whether WordPress is already installed on\nthe target domain/path. If WordPress already exists and `overwrite` is false\n(the default), the async job will fail.\n\nThis operation is asynchronous: a successful response only means the install\njob has been queued, not that WordPress is ready. Installation typically\ntakes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations filtered\nby username and domain to track progress. When the installation appears in\nthat list, WordPress is ready.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { utils.EnumCheck(cmd, "auto-updates", []string{"all", "none", "minor"}) payload, err := json.Marshal(installBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().HostingInstallWordPressV1WithBodyWithResponse(context.TODO(), args[0], "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var ListInstallationsCmd = &cobra.Command{ Use: "list-installations", Short: "List WordPress installations", Long: "List WordPress installations accessible to the authenticated client.\n\nUse this endpoint to discover existing WordPress installations and to poll\nfor installation status after calling the install endpoint. When a newly\nrequested installation appears in this list, WordPress is ready. Filter by\nusername and domain to narrow results to a specific website.\n\nEach installation includes a `valid` flag and, when invalid, a\n`validationError` describing why.", Run: func(cmd *cobra.Command, args []string) { utils.EnumCheck(cmd, "ownership", []string{"owned", "managed", "all"}) r, err := api.Request().HostingListWordPressInstallationsV1WithResponse(context.TODO(), listInstallationsParams(cmd)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.