Documentation
¶
Overview ¶
Package api provides the functions to work with SiteHost API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
models.ClientBase
// contains filtered or unexported fields
}
Client is a wrapper around the http client to manages communication with SiteHost API.
type ClientOpt ¶
ClientOpt function parameters to configure a Client.
func SetBaseURL ¶
SetBaseURL change the default BaseURL (Include the API version).
func SetCustomImageGitHost ¶ added in v0.7.0
SetCustomImageGitHost overrides the GitLab host used by custom image helpers when constructing repository clone URLs. Default is "gitlab-clients.sitehost.co.nz".
Directories
¶
| Path | Synopsis |
|---|---|
|
accounts
|
|
|
client
Package client wraps the /accounts/client API endpoints — currently just /accounts/client/list_sub_accounts.json, the paginated list of sub-accounts under the calling client_id (reseller / parent-account view).
|
Package client wraps the /accounts/client API endpoints — currently just /accounts/client/list_sub_accounts.json, the paginated list of sub-accounts under the calling client_id (reseller / parent-account view). |
|
Package bandwidth represents the SiteHost `/bandwidth` API endpoint.
|
Package bandwidth represents the SiteHost `/bandwidth` API endpoint. |
|
cloud
|
|
|
db
Package db provides access to the `/cloud/db` API endpoint.
|
Package db provides access to the `/cloud/db` API endpoint. |
|
db/grant
Package grant is used for interacting with the SiteHost `/cloud/db/grant` API endpoint.
|
Package grant is used for interacting with the SiteHost `/cloud/db/grant` API endpoint. |
|
db/user
Package user represents the SiteHost `/cloud/db/user` API endpoint.
|
Package user represents the SiteHost `/cloud/db/user` API endpoint. |
|
image
Package image provides access to the `/cloud/image` API endpoint.
|
Package image provides access to the `/cloud/image` API endpoint. |
|
image/version
Package version provides access to the /cloud/image/version endpoints — listing build history for a custom image, fetching build logs, and deleting individual versions.
|
Package version provides access to the /cloud/image/version endpoints — listing build history for a custom image, fetching build logs, and deleting individual versions. |
|
server
Package server provides access to the `/cloud/stack/server` API endpoint.
|
Package server provides access to the `/cloud/stack/server` API endpoint. |
|
ssh/user
Package user provides access to the `/cloud/ssh/user` API endpoint.
|
Package user provides access to the `/cloud/ssh/user` API endpoint. |
|
stack
Package stack represents a cloud stack operations under the `/cloud/stack` API endpoint.
|
Package stack represents a cloud stack operations under the `/cloud/stack` API endpoint. |
|
stack/environment
Package environment represents a cloud stack environment operations under the `/cloud/stack/environment` API endpoint.
|
Package environment represents a cloud stack environment operations under the `/cloud/stack/environment` API endpoint. |
|
stack/image
Package image provides access to the `/cloud/stack/image` API endpoint.
|
Package image provides access to the `/cloud/stack/image` API endpoint. |
|
stack/ssl/letsencrypt
Package letsencrypt wraps SiteHost's Cloud-Container Let's Encrypt endpoints under /cloud/stack/ssl/lets_encrypt.
|
Package letsencrypt wraps SiteHost's Cloud-Container Let's Encrypt endpoints under /cloud/stack/ssl/lets_encrypt. |
|
volume
Package volume represents our SiteHost `/cloud/volume` API endpoint — persistent volumes that can be attached to cloud containers.
|
Package volume represents our SiteHost `/cloud/volume` API endpoint — persistent volumes that can be attached to cloud containers. |
|
Package dns represents our SiteHost `/dns` API endpoint.
|
Package dns represents our SiteHost `/dns` API endpoint. |
|
template
Package template represents our SiteHost `/dns/domain_templates` API endpoint.
|
Package template represents our SiteHost `/dns/domain_templates` API endpoint. |
|
Package info wraps SiteHost's /api/* endpoints.
|
Package info wraps SiteHost's /api/* endpoints. |
|
Package job represents our SiteHost `/job` endpoint
|
Package job represents our SiteHost `/job` endpoint |
|
Package mail represents our SiteHost `/mail` API endpoint — shared mail service inspection (server info, domains, accounts, aliases, forwarders).
|
Package mail represents our SiteHost `/mail` API endpoint — shared mail service inspection (server info, domains, accounts, aliases, forwarders). |
|
Package redirect wraps the /redirect API endpoint — currently just /redirect/list_redirects.json, the per-account inventory of HTTP redirect rules grouped by domain.
|
Package redirect wraps the /redirect API endpoint — currently just /redirect/list_redirects.json, the per-account inventory of HTTP redirect rules grouped by domain. |
|
Package server wraps the SiteHost /server API endpoints — the VPS / Cloud Container Server lifecycle: provision, get, list, upgrade, snapshot, etc.
|
Package server wraps the SiteHost /server API endpoints — the VPS / Cloud Container Server lifecycle: provision, get, list, upgrade, snapshot, etc. |
|
firewall
Package firewall represents our SiteHost `/server/firewall` API endpoint.
|
Package firewall represents our SiteHost `/server/firewall` API endpoint. |
|
firewall/securitygroups
Package securitygroups represents our SiteHost `/server/firewall/security_groups` API endpoint.
|
Package securitygroups represents our SiteHost `/server/firewall/security_groups` API endpoint. |
|
snapshot
Package snapshot represents our SiteHost `/server/snapshot` API endpoint — server-level disk snapshot management (list, create, delete, restore, lifetime).
|
Package snapshot represents our SiteHost `/server/snapshot` API endpoint — server-level disk snapshot management (list, create, delete, restore, lifetime). |
|
Package srs wraps the SiteHost /srs API — domain registration, transfer, contacts, and lifecycle ops via the Shared Registry System.
|
Package srs wraps the SiteHost /srs API — domain registration, transfer, contacts, and lifecycle ops via the Shared Registry System. |
|
ssh
|
|
|
key
Package key represents our SiteHost `/ssh/key` API endpoint.
|
Package key represents our SiteHost `/ssh/key` API endpoint. |
|
Package ssl represents our SiteHost `/ssl` API endpoint.
|
Package ssl represents our SiteHost `/ssl` API endpoint. |
Click to show internal directories.
Click to hide internal directories.