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) GetCollection(path string, params interface{}) (http.Header, []json.RawMessage, error)
- func (g *Gandi) GetEndpoint() string
- 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)
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 New ¶
func New(apikey string, pat string, apiurl string, sharingID string, debug bool, dryRun bool, timeout time.Duration) *Gandi
New instantiates a new Gandi client
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) GetCollection ¶
func (g *Gandi) GetCollection(path string, params interface{}) (http.Header, []json.RawMessage, error)
GetCollection supports pagination on GET requests. It takes a subpath rooted in the endpoint. Response data is written to the recipient. Returns the response headers and any error
func (*Gandi) GetEndpoint ¶
GetEndpoint gets the URL of the endpoint.
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/