handlers

package
v0.0.0-...-4ee4f08 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Archflag    string
	Versionflag string
)

Var - Two variables set by ldflags at build time.

Functions

func InfoHandler

func InfoHandler(res http.ResponseWriter, req *http.Request, r Renderer)

InfoHandler - Returns info.

func ScaleHandler

func ScaleHandler(res http.ResponseWriter, req *http.Request, r Renderer)

Types

type Application

type Application struct {
	GUID string `json:"guid"`
	Name string `json:"name"`
}

Application ---

type Applications

type Applications struct {
	Applications []Application
}

Applications ---

type CfMessage

type CfMessage struct {
	InstanceCount int `json:"instances"`
}

type Info

type Info struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Arch    string `json:"arch"`
}

Info - Struct to contain application information.

type Organization

type Organization struct {
	GUID string
	Name string
}

Organization ---

type Renderer

type Renderer interface {
	JSON(w http.ResponseWriter, status int, v interface{}) error
}

Renderer -- interface to define the required render object

type Resource

type Resource struct {
	Metadata map[string]string      `json:"metadata"`
	Entity   map[string]interface{} `json:"entity"`
}

Resource ---

type Response

type Response struct {
	Resources []Resource `json:"resources"`
}

Response ---

type ResponseMessage

type ResponseMessage struct {
	Status string `json:"status"`
}

type ScaleMessage

type ScaleMessage struct {
	LoginURL    string  `json:"loginurl"`
	Apiurl      string  `json:"apiurl"`
	Org         string  `json:"org"`
	Space       string  `json:"space"`
	Appname     string  `json:"appname"`
	ScaleFactor float32 `json:"scalefactor"`
}
var (
	Smessage ScaleMessage
)

Smessage - variable to hold json deserialized

type Space

type Space struct {
	GUID string `json:"guid"`
	Name string `json:"name"`
}

Space ---

type SummaryResponse

type SummaryResponse struct {
	Instances int `json:"running_instances"`
}

SummaryResponse ---

Jump to

Keyboard shortcuts

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