cf_utils

package
v0.0.0-...-dd752a8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TOKEN_VALIDITY_DURATION int64 = 1800

Variables

View Source
var (
	DEBUG = false
)

Functions

func FindApp

func FindApp(orgName string, spaceName string, appName string) map[string]string

func ScaleApp

func ScaleApp(appName string, instances int)

func UAAToken

func UAAToken() string

Types

type AppDetail

type AppDetail struct {
	Guid                   string         `json:"guid"`
	Urls                   []string       `json:"urls"`
	Routes                 []GenericRoute `json:"routes"`
	Services               []string       `json:"service_names"`
	Running                int            `json:"running_instances"`
	Name                   string         `json:"name"`
	Detected_buildpack     string         `json:"detected_buildpack"`
	State                  string         `json:"state"`
	Memory                 int            `json:"memory"`
	Instances              int            `json:"instances"`
	Disk                   int            `json:"disk_quota"`
	Environment_json       string         `json:"environment_json"`
	Command                string         `json:"command"`
	Detected_start_command string         `json:"detected_start_command"`
}

type AppStat

type AppStat struct {
	Name         string       `json:"name"`
	Uris         []string     `json:"uris"`
	Host         string       `json:"host"`
	Port         int          `json:"port"`
	Uptime       int          `json:"uptime"`
	Memory_Quota int          `json:"mem_quota"`
	Disk_Quota   int          `json:"disk_quota"`
	Usage        GenericUsage `json:"usage"`
}

type AppStatsResponse

type AppStatsResponse struct {
	State string  `json:"state"`
	Stat  AppStat `json:"stats"`
}

type AppSummaryResponse

type AppSummaryResponse struct {
	Metadata struct {
		Guid string `json:"guid"`
		Url  string `json:"url"`
	} `json:"metadata"`
	Entity struct {
		Name string `json:"name"`
		//Urls []GenericUrl `json:"urls"`
		//Routes []GenericRoute `json:"routes"`
		//Running int `json:"running_instances"`
		Buildpack              string `json:"buildpack"`
		Detected_buildpack     string `json:"detected_buildpack"`
		Environment_json       string `json:"environment_json"`
		Memory                 int    `json:"memory"`
		Instances              int    `json:"instances"`
		Disk                   int    `json:"disk_quota"`
		State                  string `json:"state"`
		Command                string `json:"command"`
		Detected_start_command string `json:"detected_start_command"`
	} `json:"entity"`
}

type ErrorResponse

type ErrorResponse struct {
	Code        int    `json:"code"`
	Description string `json:"description"`
	Error_code  string `json:"error_code"`
}

type GenericDomain

type GenericDomain struct {
	Name string `json:"name"`
}

type GenericResponse

type GenericResponse struct {
	Metadata struct {
		Guid string `json:"guid"`
		Url  string `json:"url"`
	} `json:"metadata"`
	Entity struct {
		Name string `json:"name"`
	} `json:"entity"`
}

type GenericRoute

type GenericRoute struct {
	Host   string        `json:"host"`
	Domain GenericDomain `struct:"domain"`
}

type GenericUri

type GenericUri struct {
	Uri string `json:"uri"`
}

type GenericUsage

type GenericUsage struct {
	Time   string  `json:"time"`
	Cpu    float64 `json:"cpu"`
	Memory int     `json:"mem"`
	Disk   int     `json:"disk"`
}

type QueryResponse

type QueryResponse struct {
	Resources []GenericResponse `struct:"resources"`
}

type ServiceDetail

type ServiceDetail struct {
	Guid            string            `json:"guid"`
	Name            string            `json:"name"`
	Bound_App_Count int               `json:"bound_app_count"`
	Plan            ServicePlanDetail `json:"service_plan"`
}

type ServicePlanDetail

type ServicePlanDetail struct {
	Guid            string                    `json:"guid"`
	Name            string                    `json:"name"`
	ServiceProvider ServicePlanProviderDetail `json:"service"`
}

type ServicePlanProviderDetail

type ServicePlanProviderDetail struct {
	Label    string `json:"label"`
	Provider string `json:"provider"`
}

type SpaceAppQueryResponse

type SpaceAppQueryResponse struct {
	Resources []SpaceAppResponse `struct:"resources"`
}

type SpaceAppResponse

type SpaceAppResponse struct {
	Metadata struct {
		Guid string `json:"guid"`
		Url  string `json:"url"`
	} `json:"metadata"`
	Entity struct {
		Name      string `json:"name"`
		Instances int    `json:"instances"`
	} `json:"entity"`
}

type SpaceResponse

type SpaceResponse struct {
	Guid     string `json:"guid"`
	Name     string `json:"name"`
	Metadata struct {
		Guid string `json:"guid"`
		Url  string `json:"url"`
	} `json:"metadata"`
	Entity struct {
		Name string `json:"name"`
	} `json:"entity"`
}

type SpaceSummaryResponse

type SpaceSummaryResponse struct {
	Guid     string          `json:"guid"`
	Name     string          `json:"name"`
	Apps     []AppDetail     `struct:"apps"`
	Services []ServiceDetail `struct:"services"`
}

Jump to

Keyboard shortcuts

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