http

package
v0.0.0-...-9235d7d Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(ctx context.Context, core *cloudbrain.Core, authTokens []string) http.Handler

Handler returns an http.Handler for the API.

Types

type CreateInstanceRequest

type CreateInstanceRequest struct {
	Provider     string `json:"provider"`
	Image        string `json:"image"`
	InstanceType string `json:"instance_type"`
	PublicSSHKey string `json:"public_ssh_key"`
}

CreateInstanceRequest contains the data in the request body for a create instance request.

type ErrorResponse

type ErrorResponse struct {
	Errors []string `json:"errors"`
}

An ErrorResponse is returned by the HTTP API when an error occurs.

type InstanceResponse

type InstanceResponse struct {
	ID           string  `json:"id"`
	ProviderName string  `json:"provider"`
	Image        string  `json:"image"`
	IPAddress    *string `json:"ip_address"`
	UpstreamID   *string `json:"upstream_id"`
	ErrorReason  *string `json:"error_reason"`
	State        string  `json:"state"`
}

An InstanceResponse is returned by the HTTP API that contains information about an instance.

Jump to

Keyboard shortcuts

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