Documentation ¶
Overview ¶
Package fakeapi contains canned API responses from the CenturyLink Cloud API, and helpers to start an httptest.Server that will return those responses appropriately. It is used primarily in clcgo's tests and you are unlikely to need it.
Index ¶
Constants ¶
View Source
const ( AuthenticationSuccessfulResponse = `{ "bearerToken": "1234ABCDEF", "accountAlias": "ACME" }` ServerResponse = `` /* 269-byte string literal not displayed */ ServerCredentialsResponse = `{"userName":"root","password":"p4ssw0rd"}` SuccessfulStatusResponse = `{ "status":"succeeded" }` ServerCreationSuccessfulResponse = `` /* 296-byte string literal not displayed */ ServerCreationMissingStatusResponse = `` /* 160-byte string literal not displayed */ ServerCreationInvalidResponse = `` /* 182-byte string literal not displayed */ PauseServersSuccessfulResponse = `` /* 169-byte string literal not displayed */ AddPublicIPAddressSuccessfulResponse = `{ "rel":"status", "href":"/path/to/status", "id":"id-for-status" }` DataCenterCapabilitiesResponse = `` /* 223-byte string literal not displayed */ DataCenterGroupResponse = `` /* 254-byte string literal not displayed */ GroupResponse = `` /* 191-byte string literal not displayed */ )
Fixture constants for the fakeapi's hardcoded responses, including for successful and unsuccessful requests.
Variables ¶
This section is empty.
Functions ¶
func CreateFakeServer ¶
CreateFakeServer instantiates a new httptest.Server hooked the the correct routes and returning the expected fixture data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.