Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBaseURL = "https://api.infomaniak.com"
DefaultBaseURL Default API endpoint.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIErrorResponse ¶
type APIErrorResponse struct { Code string `json:"code"` Description string `json:"description,omitempty"` Context map[string]string `json:"context,omitempty"` Errors []APIErrorResponse `json:"errors,omitempty"` }
func (APIErrorResponse) Error ¶ added in v4.3.0
func (a APIErrorResponse) Error() string
type APIResponse ¶
type APIResponse[T any] struct { Result string `json:"result"` Data T `json:"data,omitempty"` ErrResponse *APIErrorResponse `json:"error,omitempty"` }
func (APIResponse[T]) GetError ¶ added in v4.12.0
func (a APIResponse[T]) GetError() *APIErrorResponse
func (APIResponse[T]) GetResult ¶ added in v4.12.0
func (a APIResponse[T]) GetResult() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client the Infomaniak client.
func (*Client) CreateDNSRecord ¶
func (*Client) DeleteDNSRecord ¶
type Record ¶
type Record struct { ID string `json:"id,omitempty"` Source string `json:"source,omitempty"` Type string `json:"type,omitempty"` TTL int `json:"ttl,omitempty"` Target string `json:"target,omitempty"` }
Record a DNS record.
type Response ¶ added in v4.12.0
type Response interface { GetResult() string GetError() *APIErrorResponse }
Click to show internal directories.
Click to hide internal directories.