applist

package
v0.0.0-...-7c9d587 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name       string
	UpdatedAt  string
	Buildpack  Buildpack
	IsStale    bool
	Foundation string
	Org        string
	Space      string
	Instances  int
	MemoryMB   int
	State      string
}

App contains app information and its buildpack

func BuildAppList

func BuildAppList(foundation Foundation, now time.Time, foundationName string) ([]App, error)

BuildAppList takes a list of apps from the go cfclient and a map buildpackGUID to buildpack information, and it returns a list of apps

func (App) IsHappy

func (app App) IsHappy() bool

IsHappy returns true if the app is neither stale nor deprecated

type AppData

type AppData struct {
	Apps    []App
	Summary Summary
}

func BuildAppData

func BuildAppData(cfClients map[string]cf.IClient, now time.Time) (AppData, error)

BuildAppData returns App Data

type Buildpack

type Buildpack struct {
	Name         string
	Version      string
	Freshness    int // corresponds to the number of versions out of date (0 = latest)
	IsDeprecated bool
}

Buildpack contains buildpack name and version

func (Buildpack) SupportStatus

func (buildpack Buildpack) SupportStatus() string

SupportStatus is the inverse of deprecation status

type Foundation

type Foundation struct {
	GoCFApps       []gocf.App
	GoCFBuildpacks map[string]gocf.Buildpack
	GoCFOrgs       map[string]gocf.Org
	GoCFSpaces     map[string]gocf.Space
}

type Summary

type Summary struct {
	TotalApps      int
	StaleApps      int
	DeprecatedApps int
}

func BuildSummary

func BuildSummary(apps []App) Summary

BuildSummary returns a new summary of an app list

Jump to

Keyboard shortcuts

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