fakeapi

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

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

func CreateFakeServer() *httptest.Server

CreateFakeServer instantiates a new httptest.Server hooked the the correct routes and returning the expected fixture data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL