report

package
v0.0.0-...-fd13867 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client orchestrates generation and aggregation of report data

func NewClient

func NewClient(cli plugin.CliConnection) (*Client, error)

NewClient -

func (*Client) GetSummaryReportByOrgNames

func (r *Client) GetSummaryReportByOrgNames(orgNames ...string) (*SummaryReport, error)

GetSummaryReportByOrgNames -

type OrgReport

type OrgReport struct {
	OrgQuota v2client.OrgQuota `json:"org_quota"` // TODO unhappy with this

	Report
	SpaceReports []SpaceReport `json:"space_reports"`
	// contains filtered or unexported fields
}

OrgReport -

func NewOrgReport

func NewOrgReport(orgQuota v2client.OrgQuota, org v2client.Org, spaceReports ...SpaceReport) *OrgReport

NewOrgReport -

type Report

type Report struct {
	AppInstancesCount                    int    `json:"app_instances_count"`
	AppsCount                            int    `json:"apps_count"`
	BillableAppInstancesCount            int    `json:"billable_app_instances_count"`
	BillableServicesCount                int    `json:"billable_services_count"`
	MemoryQuota                          int    `json:"memory_quota"`
	MemoryUsage                          int    `json:"memory_usage"`
	Name                                 string `json:"name"`
	RunningAppInstancesCount             int    `json:"running_app_instances_count"`
	RunningAppsCount                     int    `json:"running_apps_count"`
	ServicesCount                        int    `json:"services_count"`
	ServicesSuiteForPivotalPlatformCount int    `json:"services_suite_for_pivotal_platform_count"`
	SpringCloudServicesCount             int    `json:"spring_cloud_services_count"`
	StoppedAppInstancesCount             int    `json:"stopped_app_instances_count"`
	StoppedAppsCount                     int    `json:"stopped_apps_count"`
}

Report should be present in all reports at all levels, e.g. summary level, org level, space level, etc. this allows us to calculate common data at discrete layers and be confident it'll be available when presenting the data

type SpaceReport

type SpaceReport struct {
	Report
	// contains filtered or unexported fields
}

SpaceReport -

func NewSpaceReport

func NewSpaceReport(space v2client.Space) *SpaceReport

NewSpaceReport -

type SummaryReport

type SummaryReport struct {
	OrgReports []OrgReport `json:"org_reports"`
	Report
}

SummaryReport holds an aggregated view of multiple OrgReports It effectively serves as the entrypoint into aggregating the data in preparation for it being presented

func NewSummaryReport

func NewSummaryReport(orgReports ...OrgReport) *SummaryReport

NewSummaryReport -

Jump to

Keyboard shortcuts

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