apihelper

package
v0.0.0-...-396d0c3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHelper

type APIHelper struct{}

APIHelper implementation

func (*APIHelper) GetOrgMemoryUsage

func (api *APIHelper) GetOrgMemoryUsage(cli plugin.CliConnection, org Organization) (float64, error)

GetOrgMemoryUsage returns the amount of memory (in MB) that the org is consuming

func (*APIHelper) GetOrgSpaces

func (api *APIHelper) GetOrgSpaces(cli plugin.CliConnection, spacesURL string) ([]Space, error)

GetOrgSpaces returns the spaces in an org.

func (*APIHelper) GetOrgs

func (api *APIHelper) GetOrgs(cli plugin.CliConnection) ([]Organization, error)

GetOrgs returns a struct that represents critical fields in the JSON

func (*APIHelper) GetQuotaMemoryLimit

func (api *APIHelper) GetQuotaMemoryLimit(cli plugin.CliConnection, quotaURL string) (float64, error)

GetQuotaMemoryLimit retruns the amount of memory (in MB) that the org is allowed

func (*APIHelper) GetSpaceApps

func (api *APIHelper) GetSpaceApps(cli plugin.CliConnection, appsURL string) ([]App, error)

GetSpaceApps returns the apps in a space

type App

type App struct {
	Instances float64
	RAM       float64
	Running   bool
}

App representation

type CFAPIHelper

type CFAPIHelper interface {
	GetOrgs(plugin.CliConnection) ([]Organization, error)
	GetQuotaMemoryLimit(plugin.CliConnection, string) (float64, error)
	GetOrgMemoryUsage(plugin.CliConnection, Organization) (float64, error)
	GetOrgSpaces(plugin.CliConnection, string) ([]Space, error)
	GetSpaceApps(plugin.CliConnection, string) ([]App, error)
}

CFAPIHelper to wrap cf curl results

type Organization

type Organization struct {
	URL       string
	Name      string
	QuotaURL  string
	SpacesURL string
}

Organization representation

type Space

type Space struct {
	Name    string
	AppsURL string
}

Space representation

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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