Documentation ¶
Index ¶
- type Gandi
- func (g *Gandi) Delete(path string, params, recipient interface{}) (http.Header, error)
- func (g *Gandi) Get(path string, params, recipient interface{}) (http.Header, error)
- func (g *Gandi) GetBytes(path string, params interface{}) (http.Header, []byte, error)
- func (g *Gandi) Patch(path string, params, recipient interface{}) (http.Header, error)
- func (g *Gandi) Post(path string, params, recipient interface{}) (http.Header, error)
- func (g *Gandi) Put(path string, params, recipient interface{}) (http.Header, error)
- func (g *Gandi) SetEndpoint(endpoint string)
- type StandardError
- type StandardResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gandi ¶
type Gandi struct {
// contains filtered or unexported fields
}
Gandi is the handle used to interact with the Gandi API
func (*Gandi) Delete ¶
Delete issues a DELETE request. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) Get ¶
Get issues a GET request. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) GetBytes ¶
GetBytes issues a GET request but does not attempt to parse any response into JSON. It returns the response headers, a byteslice of the response, and any error
func (*Gandi) Patch ¶
Patch issues a PATCH request. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) Post ¶
Post issues a POST request. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) Put ¶
Put issues a PUT request. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) SetEndpoint ¶
SetEndpoint sets the URL to the endpoint. It takes a string defining the subpath under https://api.gandi.net/v5/
type StandardError ¶
type StandardError struct { Location string `json:"location"` Name string `json:"name"` Description string `json:"description"` }
StandardError is embedded in a standard error
type StandardResponse ¶
type StandardResponse struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` UUID string `json:"uuid,omitempty"` Object string `json:"object,omitempty"` Cause string `json:"cause,omitempty"` Status string `json:"status,omitempty"` Errors []StandardError `json:"errors,omitempty"` }
StandardResponse is a standard response