cpanel

package
v0.4.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(serverUrl string, optFns ...OptionsFunc) (*Client, error)

func (*Client) SSLInstallSSL

func (c *Client) SSLInstallSSL(req *SSLInstallSSLRequest) (*SSLInstallSSLResponse, error)

func (*Client) SSLInstallSSLWithContext

func (c *Client) SSLInstallSSLWithContext(ctx context.Context, req *SSLInstallSSLRequest) (*SSLInstallSSLResponse, error)

func (*Client) SetTLSConfig

func (c *Client) SetTLSConfig(config *tls.Config) *Client

func (*Client) SetTimeout

func (c *Client) SetTimeout(timeout time.Duration) *Client

type Options added in v0.4.25

type Options struct {
	Username string
	ApiToken string
}

type OptionsFunc added in v0.4.25

type OptionsFunc func(*Options)

func WithApiToken added in v0.4.25

func WithApiToken(apiToken string) OptionsFunc

func WithUsername added in v0.4.25

func WithUsername(username string) OptionsFunc

type SSLInstallSSLRequest

type SSLInstallSSLRequest struct {
	Domain   *string `json:"domain,omitempty"   url:"domain,omitempty"`
	Cert     *string `json:"cert,omitempty"     url:"cert,omitempty"`
	Key      *string `json:"key,omitempty"      url:"key,omitempty"`
	CABundle *string `json:"cabundle,omitempty" url:"cabundle,omitempty"`
}

type SSLInstallSSLResponse

type SSLInstallSSLResponse struct {
	Data *struct {
		User                    string   `json:"user"`
		Domain                  string   `json:"domain"`
		ExtraCertificateDomains []string `json:"extra_certificate_domains,omitempty"`
		WarningDomains          []string `json:"warning_domains,omitempty"`
		WorkingDomains          []string `json:"working_domains,omitempty"`
		CertId                  string   `json:"cert_id"`
		KeyId                   string   `json:"key_id"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SSLInstallSSLResponse) GetErrors

func (r *SSLInstallSSLResponse) GetErrors() []string

func (*SSLInstallSSLResponse) GetMessages

func (r *SSLInstallSSLResponse) GetMessages() []string

func (*SSLInstallSSLResponse) GetStatus

func (r *SSLInstallSSLResponse) GetStatus() int

func (*SSLInstallSSLResponse) GetWarnings

func (r *SSLInstallSSLResponse) GetWarnings() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL