metadata

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MEGABYTE = (1024 * 1024)

Variables

This section is empty.

Functions

func GetStringValueByFieldName added in v0.5.8

func GetStringValueByFieldName(n interface{}, field_name string) (string, bool)

func LoadOrgCache

func LoadOrgCache(cliConnection plugin.CliConnection)

func LoadSpaceCache

func LoadSpaceCache(cliConnection plugin.CliConnection)

func LoadStackCache added in v0.7.3

func LoadStackCache(cliConnection plugin.CliConnection)

Types

type App

type App struct {
	Guid      string `json:"guid"`
	Name      string `json:"name,omitempty"`
	SpaceGuid string `json:"space_guid,omitempty"`
	SpaceName string
	OrgGuid   string
	OrgName   string

	StackGuid   string  `json:"stack_guid,omitempty"`
	MemoryMB    float64 `json:"memory,omitempty"`
	DiskQuotaMB float64 `json:"disk_quota,omitempty"`

	Environment map[string]interface{} `json:"environment_json,omitempty"`
	Instances   float64                `json:"instances,omitempty"`
	State       string                 `json:"state,omitempty"`
	EnableSsh   bool                   `json:"enable_ssh,omitempty"`

	PackageState        string `json:"package_state,omitempty"`
	StagingFailedReason string `json:"staging_failed_reason,omitempty"`
	StagingFailedDesc   string `json:"staging_failed_description,omitempty"`
	DetectedStartCmd    string `json:"detected_start_command,omitempty"`
	//DockerCredentials string  `json:"docker_credentials_json,omitempty"`
	//audit.app.create event fields
	Console           bool   `json:"console,omitempty"`
	Buildpack         string `json:"buildpack,omitempty"`
	DetectedBuildpack string `json:"detected_buildpack,omitempty"`

	HealthcheckType    string  `json:"health_check_type,omitempty"`
	HealthcheckTimeout float64 `json:"health_check_timeout,omitempty"`
	Production         bool    `json:"production,omitempty"`
	//app.crash event fields
	//Index           float64 `json:"index,omitempty"`
	//ExitStatus      string  `json:"exit_status,omitempty"`
	//ExitDescription string  `json:"exit_description,omitempty"`
	//ExitReason      string  `json:"reason,omitempty"`
	// "package_updated_at": "2016-11-15T19:56:52Z",
	PackageUpdatedAt string `json:"package_updated_at,omitempty"`
}

type AppMetadata added in v0.7.3

type AppMetadata struct {
	*App
	// contains filtered or unexported fields
}

func NewAppMetadata added in v0.7.3

func NewAppMetadata(appStats App) *AppMetadata

func NewAppMetadataById added in v0.7.3

func NewAppMetadataById(appId string) *AppMetadata

type AppMetadataManager added in v0.7.3

type AppMetadataManager struct {
	// contains filtered or unexported fields
}

func NewAppMetadataManager added in v0.7.3

func NewAppMetadataManager() *AppMetadataManager

func (*AppMetadataManager) AllApps added in v0.7.3

func (mdMgr *AppMetadataManager) AllApps() []*AppMetadata

func (*AppMetadataManager) AppMetadataSize added in v0.7.3

func (mdMgr *AppMetadataManager) AppMetadataSize() int

func (*AppMetadataManager) FindAppMetadata added in v0.7.3

func (mdMgr *AppMetadataManager) FindAppMetadata(appId string) *AppMetadata

func (*AppMetadataManager) GetTotalDiskAllStartedApps added in v0.7.3

func (mdMgr *AppMetadataManager) GetTotalDiskAllStartedApps() float64

func (*AppMetadataManager) GetTotalMemoryAllStartedApps added in v0.7.3

func (mdMgr *AppMetadataManager) GetTotalMemoryAllStartedApps() float64

func (*AppMetadataManager) LoadAppCache added in v0.7.3

func (mdMgr *AppMetadataManager) LoadAppCache(cliConnection plugin.CliConnection)

type AppResource

type AppResource struct {
	Meta   Meta `json:"metadata"`
	Entity App  `json:"entity"`
}

type AppResponse

type AppResponse struct {
	Count     int           `json:"total_results"`
	Pages     int           `json:"total_pages"`
	NextUrl   string        `json:"next_url"`
	Resources []AppResource `json:"resources"`
}

type Manager added in v0.7.3

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.7.3

func NewManager(conn plugin.CliConnection) *Manager

func (*Manager) GetAppMdManager added in v0.7.3

func (mgr *Manager) GetAppMdManager() *AppMetadataManager

func (*Manager) LoadMetadata added in v0.7.3

func (mgr *Manager) LoadMetadata()

Load all the metadata. This is a blocking call.

func (*Manager) RequestRefreshAppMetadata added in v0.7.3

func (mgr *Manager) RequestRefreshAppMetadata(appId string)

Request a refresh of specific app metadata

type Meta

type Meta struct {
	Guid      string `json:"guid"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type Org

type Org struct {
	Guid string `json:"guid"`
	Name string `json:"name"`
}

func FindOrgMetadata

func FindOrgMetadata(orgGuid string) Org

type OrgResource

type OrgResource struct {
	Meta   Meta `json:"metadata"`
	Entity Org  `json:"entity"`
}

type OrgResponse

type OrgResponse struct {
	Count     int           `json:"total_results"`
	Pages     int           `json:"total_pages"`
	Resources []OrgResource `json:"resources"`
}

type Space

type Space struct {
	Guid    string `json:"guid"`
	Name    string `json:"name"`
	OrgGuid string `json:"organization_guid"`
	OrgName string
}

func FindSpaceMetadata

func FindSpaceMetadata(spaceGuid string) Space

type SpaceResource

type SpaceResource struct {
	Meta   Meta  `json:"metadata"`
	Entity Space `json:"entity"`
}

type SpaceResponse

type SpaceResponse struct {
	Count     int             `json:"total_results"`
	Pages     int             `json:"total_pages"`
	NextUrl   string          `json:"next_url"`
	Resources []SpaceResource `json:"resources"`
}

type Stack added in v0.7.3

type Stack struct {
	Guid        string `json:"guid"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

func AllStacks added in v0.7.3

func AllStacks() []Stack

func FindStackMetadata added in v0.7.3

func FindStackMetadata(stackGuid string) Stack

type StackResource added in v0.7.3

type StackResource struct {
	Meta   Meta  `json:"metadata"`
	Entity Stack `json:"entity"`
}

type StackResponse added in v0.7.3

type StackResponse struct {
	Count     int             `json:"total_results"`
	Pages     int             `json:"total_pages"`
	NextUrl   string          `json:"next_url"`
	Resources []StackResource `json:"resources"`
}

Jump to

Keyboard shortcuts

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