Documentation ¶
Index ¶
- func TTLRounder(ttl int) int
- type Base
- type Client
- func (c Client) CreateRecord(ctx context.Context, domainID int, record Record) (int, error)
- func (c Client) DeleteRecord(ctx context.Context, domainID int, recordID int) error
- func (c Client) GetDomainDetails(ctx context.Context, domainID int) (*DomainDetails, error)
- func (c Client) GetServiceDetails(ctx context.Context, serviceID int) (*ServiceDetails, error)
- func (c Client) ListServices(ctx context.Context) ([]int, error)
- type DomainDetails
- type IntOrString
- type Record
- type Response
- type ServiceDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TTLRounder ¶
TTLRounder rounds the given TTL in seconds to the next accepted value. Accepted TTL values are:
- 3600
- 14400
- 28800
- 57600
- 86400
Types ¶
type Client ¶
Client the Shellrent API client.
func (Client) CreateRecord ¶
CreateRecord created a record. https://api.shellrent.com/creazione-record-dns-di-un-dominio
func (Client) DeleteRecord ¶
DeleteRecord deletes a record. https://api.shellrent.com/eliminazione-record-dns-di-un-dominio
func (Client) GetDomainDetails ¶
GetDomainDetails gets domain details. https://api.shellrent.com/dettagli-dominio
func (Client) GetServiceDetails ¶
GetServiceDetails gets service details. https://api.shellrent.com/dettagli-servizio-acquistato
func (Client) ListServices ¶
ListServices lists service IDs. https://api.shellrent.com/elenco-dei-servizi-acquistati
type DomainDetails ¶
type IntOrString ¶
type IntOrString int
func (*IntOrString) UnmarshalJSON ¶
func (m *IntOrString) UnmarshalJSON(data []byte) error
func (*IntOrString) Value ¶
func (m *IntOrString) Value() int
type Record ¶
type Record struct { ID IntOrString `json:"id,omitempty"` Type string `json:"type,omitempty"` Host string `json:"host,omitempty"` TTL int `json:"ttl,omitempty"` // It can be set to the following values (number of seconds): 3600, 14400, 28800, 57600, 86400 Destination string `json:"destination,omitempty"` }
type ServiceDetails ¶
Click to show internal directories.
Click to hide internal directories.