report

package
v6.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package report implements the `report` commands: time series over the tenant, printed as the platform sends them.

Index

Constants

This section is empty.

Variables

View Source
var Kinds = []Kind{
	{Name: "users", Short: "Users in the tenant over time.", /* contains filtered or unexported fields */},
	{Name: "teams", Short: "Teams in the tenant over time.", /* contains filtered or unexported fields */},
	{Name: "environments", Short: "Environments in the tenant over time.", /* contains filtered or unexported fields */},
	{
		Name: "experiments-executed", Short: "Experiment runs over time.", Filters: Teams | Environments | Services,
		GroupBy: []string{"NONE", "STATE", "TRIGGER", "ACTION", "ISSUES_FIXED", "ISSUES_DISCOVERED"},
		// contains filtered or unexported fields
	},
	{
		Name: "experiments-created", Short: "Experiments created over time.", Filters: Teams | Environments,
		GroupBy: []string{"NONE", "CREATED_VIA", "ORIGIN"},
		// contains filtered or unexported fields
	},
	{Name: "services-distribution", Short: "Services per risk level (low, medium, high) over time.", Filters: serviceFilters, /* contains filtered or unexported fields */},
	{Name: "services-by-category", Short: "The average risk of services per category over time.", Filters: serviceFilters, /* contains filtered or unexported fields */},
	{Name: "services-average", Short: "The average risk of services, 0 to 100, over time.", Filters: serviceFilters, /* contains filtered or unexported fields */},
}
View Source
var Today = func() time.Time { return time.Now().UTC() }

Today is when a report ends by default. A variable, so that tests can fix it.

Functions

func Run

func Run(ctx context.Context, c *platform.Client, k Kind, o Options) error

Types

type Filter

type Filter int

Filter says which filters a report takes beyond the time range.

const (
	Teams Filter = 1 << iota
	Environments
	Services
	ServiceProperties
	Categories
)

type Kind

type Kind struct {
	Name, Short string
	Filters     Filter
	// The groupings the report offers; none means it cannot be grouped.
	GroupBy []string
	// contains filtered or unexported fields
}

func (Kind) Takes

func (k Kind) Takes(f Filter) bool

type Options

type Options struct {
	From, To, Rollup, GroupBy string
	// Teams by key and environments by name, as users know them; the platform takes ids.
	Teams, Environments, Services, Categories []string
	ServiceProperties                         []string
	File, Type                                string
}

Jump to

Keyboard shortcuts

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