api

package
v0.0.170 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

TestGrid HTTP API

Valid responses are all in JSON. Error responses may not be in JSON. Replace things in curly braces.

Exact API definitions can be found on GitHub.

LIST

"List" methods use the GET HTTP verb. See https://cloud.google.com/apis/design/standard_methods for details.

  • /api/v1/dashboards - List dashboards
  • /api/v1/dashboard-groups - List dashboard groups
  • /api/v1/dashboards/{dashboard}/tabs - List a dashboard's tabs
  • /api/v1/dashboard-groups/{dashboard-group} - List the dashboards in a dashboard group
  • /api/v1/dashboards/{dashboard}/tab-summaries - List the tab summaries for the dashboard (data rendered in dashboard view)
  • /api/v1/dashboard-groups/{dashboard-group}/dashboard-summaries - List the dashboard summaries for the dashboard group (data rendered in dashboard group view)

GET

  • /api/v1/dashboards/{dashboard} - Returns a dashboard's configuration. Often empty; dashboard-level configuration is rare.
  • /api/v1/dashboards/{dashboard}/tabs/{tab}/headers - Returns the headers for a tab's grid result
  • /api/v1/dashboards/{dashboard}/tabs/{tab}/rows - Returns information on a tab's rows and the data within those rows.
  • /api/v1/dashboards/{dashboard}/tab-summaries/{tab} - Returns the summary for a particular tab in the given dashboard
  • /api/v1/dashboards/{dashboard}/summary - Returns the aggregated summary for a particular dashboard.

Documentation

Overview

Package api provides code to host an API displaying TestGrid data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouters added in v0.0.148

func GetRouters(options RouterOptions, storageClient *storage.Client) (http.Handler, *grpc.Server, error)

GetRouters returns an http router and gRPC server that both serve TestGrid's API It also instantiates necessary caching and i/o objects

func GetServer added in v0.0.148

func GetServer(options RouterOptions, storageClient *storage.Client) (*v1.Server, error)

GetServer returns a server that serves TestGrid's API It also instantiates necessary caching and i/o objects

Types

type RouterOptions

type RouterOptions struct {
	GcsCredentials           string
	HomeBucket               string
	TabPathPrefix            string
	SummaryPathPrefix        string
	AccessControlAllowOrigin string
	Timeout                  time.Duration
}

RouterOptions are the options needed to GetRouter

Directories

Path Synopsis
Package v1 (api/v1) is the first versioned implementation of the API
Package v1 (api/v1) is the first versioned implementation of the API

Jump to

Keyboard shortcuts

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