Documentation ¶
Overview ¶
Package iland provides a basic API wrapper for accessing the iland cloud API.
The package handles API token retrieval and renewal behind the scenes.
There are methods for performing the following types of HTTP requests:
GET POST PUT DELETE
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { Error string `json:"error"` Message string `json:"message"` DetailMessage string `json:"detail_message"` }
APIError holds messages and details around errors from the iland cloud API.
type Client ¶
Client is an iland cloud SDK client.
func (*Client) Delete ¶
Delete performs a DELETE request to the iland cloud API to the given relative path.
type Config ¶
type Config struct { APIBaseURL string AccessURL string RefreshURL string ClientID string ClientSecret string Username string Password string }
Config object to hold properties related to API access. You pass this to the NewClient method to create a new iland cloud API client.
type RefreshTokenRequest ¶
type RefreshTokenRequest struct { ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` RefreshToken string `json:"refresh_token"` GrantType string `json:"grant_type"` }
RefreshTokenRequest object for holding params required for requesting a new iland cloud API token.
type Token ¶
type Token struct { AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` RefreshToken string `json:"refresh_token"` }
Token object for holding access token and expiration time of iland cloud API token.
type TokenRequest ¶
type TokenRequest struct { ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` Username string `json:"username"` Password string `json:"password"` GrantType string `json:"grant_type"` }
TokenRequest object for holding params required for requesting a new iland cloud API token.