api

package
v0.0.0-...-352cdb8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	BaseURI string
	// contains filtered or unexported fields
}

API represents the footloose REST API.

func New

func New(baseURI string, keyStore *cluster.KeyStore) *API

New creates a new object able to answer footloose REST API.

func (*API) ClusterURI

func (a *API) ClusterURI(c *cluster.Cluster) string

ClusterURI returns the URI identifying a cluster in the REST API.

func (*API) MachineURI

func (a *API) MachineURI(c *cluster.Cluster, m *cluster.Machine) string

MachineURI returns the URI identifying a machine in the REST API.

func (*API) Router

func (a *API) Router() *mux.Router

Router returns the API request router.

type CreatedResponse

type CreatedResponse struct {
	URI string `json:"uri"`
}

CreatedResponse is the response POST entry points return when a resource has been successfully created.

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse is the response API entry points return when they encountered an error.

Jump to

Keyboard shortcuts

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