Documentation
¶
Index ¶
- Constants
- Variables
- func AuthGetConsumerKey(ak, region string) (ck string, link string, err error)
- func RegionEndpoint(region string) string
- type APIResponse
- type DateTime
- type DateTime2
- type OVHClient
- func (c *OVHClient) DELETE(ressource string, expectedHTTPCode ...int) (response APIResponse, err error)
- func (c *OVHClient) GET(ressource string, expectedHTTPCode ...int) (response APIResponse, err error)
- func (c *OVHClient) POST(ressource, payload string, expectedHTTPCode ...int) (APIresponse APIResponse, err error)
- func (c *OVHClient) PUT(ressource, payload string, expectedHTTPCode ...int) (response APIResponse, err error)
- func (c *OVHClient) Query(method string, ressource string, payload string, expectedHTTPCode []int) (response APIResponse, err error)
Constants ¶
View Source
const ( //API_HOST = "api.ovh.com" API_ENDPOINT_EU = "https://api.ovh.com" API_ENDPOINT_CA = "https://ca.api.ovh.com" API_ENDPOINT_SYS_EU = "https://eu.api.soyoustart.com" API_ENDPOINT_SYS_CA = "https://ca.api.soyoustart.com" API_VERSION = "1.0" )
Variables ¶
View Source
var ( ErrInvalidkey = errors.New("INVALID_KEY") ErrInvalidCredential = errors.New("INVALID_CREDENTIAL") )
Functions ¶
func AuthGetConsumerKey ¶
AuthGetConsumerKey returns the consumer key
func RegionEndpoint ¶
Types ¶
type APIResponse ¶
APIResponse represents a response from OVH API
type DateTime ¶
Datetimes DateTime represents date as returned by OVH
func (DateTime) MarshalJSON ¶
func (*DateTime) UnmarshalJSON ¶
type DateTime2 ¶
DateTime2 represents an other date as returned by OVH don't ask me why but OVH use differents TZ for datetime...
func (DateTime2) MarshalJSON ¶
func (*DateTime2) UnmarshalJSON ¶
type OVHClient ¶
OVHClient API client
func (*OVHClient) DELETE ¶
func (c *OVHClient) DELETE(ressource string, expectedHTTPCode ...int) (response APIResponse, err error)
DELETE do a GET query
func (*OVHClient) GET ¶
func (c *OVHClient) GET(ressource string, expectedHTTPCode ...int) (response APIResponse, err error)
GET do a GET query
func (*OVHClient) POST ¶
func (c *OVHClient) POST(ressource, payload string, expectedHTTPCode ...int) (APIresponse APIResponse, err error)
POST do a POST query
Click to show internal directories.
Click to hide internal directories.