Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create domain forwarding", Long: "Create domain forwarding configuration.\n\nUse this endpoint to set up domain redirects to other URLs.", Run: func(cmd *cobra.Command, args []string) { utils.EnumCheck(cmd, "redirect-type", []string{"301", "302"}) payload, err := json.Marshal(createBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().DomainsCreateDomainForwardingV1WithBodyWithResponse(context.TODO(), "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var DeleteCmd = &cobra.Command{ Use: "delete <domain>", Short: "Delete domain forwarding", Long: "Delete domain forwarding data.\n\nUse this endpoint to remove redirect configuration from domains.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsDeleteDomainForwardingV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GetCmd = &cobra.Command{ Use: "get <domain>", Short: "Get domain forwarding", Long: "Retrieve domain forwarding data.\n\nUse this endpoint to view current redirect configuration for domains.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsGetDomainForwardingV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GroupCmd = &cobra.Command{
Use: "forwarding",
Short: "Forwarding commands",
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.