Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableLockCmd = &cobra.Command{ Use: "disable-lock <domain>", Short: "Disable domain lock", Long: "Disable domain lock for the domain.\n\nDomain lock needs to be disabled before transferring the domain to another registrar.\n\nUse this endpoint to prepare domains for transfer to other registrars.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsDisableDomainLockV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var DisablePrivacyProtectionCmd = &cobra.Command{ Use: "disable-privacy-protection <domain>", Short: "Disable privacy protection", Long: "Disable privacy protection for the domain.\n\nWhen privacy protection is disabled, domain owner's personal information is visible in public WHOIS database.\n\nUse this endpoint to make domain owner's information publicly visible.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsDisablePrivacyProtectionV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var EnableLockCmd = &cobra.Command{ Use: "enable-lock <domain>", Short: "Enable domain lock", Long: "Enable domain lock for the domain.\n\nWhen domain lock is enabled,\nthe domain cannot be transferred to another registrar without first disabling the lock.\n\nUse this endpoint to secure domains against unauthorized transfers.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsEnableDomainLockV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var EnablePrivacyProtectionCmd = &cobra.Command{ Use: "enable-privacy-protection <domain>", Short: "Enable privacy protection", Long: "Enable privacy protection for the domain.\n\nWhen privacy protection is enabled, domain owner's personal information is hidden from public WHOIS database.\n\nUse this endpoint to protect domain owner's personal information from public view.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsEnablePrivacyProtectionV1WithResponse(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 details", Long: "Retrieve detailed information for specified domain.\n\nUse this endpoint to view comprehensive domain configuration and status.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsGetDomainDetailsV1WithResponse(context.TODO(), args[0]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GroupCmd = &cobra.Command{
Use: "portfolio",
Short: "Portfolio commands",
}
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "Get domain list", Long: "Retrieve all domains associated with your account.\n\nUse this endpoint to view user's domain portfolio.", Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DomainsGetDomainListV1WithResponse(context.TODO()) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var PurchaseCmd = &cobra.Command{ Use: "purchase", Short: "Purchase new domain", Long: "Purchase and register a new domain name.\n\nIf registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status.\n\nIf no payment method is provided, your default payment method will be used automatically.\n\nIf no WHOIS information is provided, default contact information for that TLD will be used.\nBefore making request, ensure WHOIS information for desired TLD exists in your account.\n\nSome TLDs require `additional_details` to be provided and these will be validated before completing purchase.\n\nUse this endpoint to register new domains for users.", Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(purchaseBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().DomainsPurchaseNewDomainV1WithBodyWithResponse(context.TODO(), "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var UpdateNameserversCmd = &cobra.Command{ Use: "update-nameservers <domain>", Short: "Update domain nameservers", Long: "Set nameservers for a specified domain.\n\nBe aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.\n\nUse this endpoint to configure custom DNS hosting for domains.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(updateNameserversBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().DomainsUpdateDomainNameserversV1WithBodyWithResponse(context.TODO(), args[0], "application/json", bytes.NewReader(payload)) 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.