v1

package
v0.0.173 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Route added in v0.0.80

func Route(r *chi.Mux, s Server) *chi.Mux

Route applies all the v1 API functions provided by the Server to the Router given. If the router is nil, a new one is instantiated.

Types

type Server

type Server struct {
	Client                   gcs.ConditionalClient
	DefaultBucket            string
	TabPathPrefix            string
	SummaryPathPrefix        string
	AccessControlAllowOrigin string
	Timeout                  time.Duration
	// contains filtered or unexported fields
}

Server contains the necessary settings and i/o objects needed to serve this api

func (*Server) GetDashboard added in v0.0.91

GetDashboard returns a given dashboard

func (*Server) GetDashboardGroup added in v0.0.80

GetDashboardGroup returns a given dashboard group

func (Server) GetDashboardGroupHTTP added in v0.0.118

func (s Server) GetDashboardGroupHTTP(w http.ResponseWriter, r *http.Request)

GetDashboardGroupHTTP returns a given dashboard group Response json: GetDashboardGroupResponse

func (Server) GetDashboardHTTP added in v0.0.118

func (s Server) GetDashboardHTTP(w http.ResponseWriter, r *http.Request)

GetDashboardHTTP returns a given dashboard Response json: GetDashboardResponse

func (*Server) GetDashboardSummary added in v0.0.159

GetDashboardSummary returns the dashboard summary for the particular dashboard. Think of it as aggregated view of ListTabSummaries data. Dashboard name doesn't have to be normalized. Returns an error iff - dashboard name does not exist in config - the server can't read summary from GCS bucket - dashboard summary doesn't exist

func (Server) GetDashboardSummaryHTTP added in v0.0.160

func (s Server) GetDashboardSummaryHTTP(w http.ResponseWriter, r *http.Request)

GetDashboardSummaryHTTP returns the dashboard summary as a json. Response json: GetDashboardSummaryResponse

func (*Server) GetTabSummary added in v0.0.155

GetTabSummary returns the tab summary for the particular dashboard and tab. Dashboard and tab names don't have to be normalized. Returns an error iff - dashboard or tab does not exist - the server can't read summary from GCS bucket - tab summary for particular tab doesn't exist

func (Server) GetTabSummaryHTTP added in v0.0.155

func (s Server) GetTabSummaryHTTP(w http.ResponseWriter, r *http.Request)

GetTabSummaryHTTP returns the tab summary as a json. Response json: GetTabSummaryResponse

func (Server) Grid added in v0.0.92

func (s Server) Grid(ctx context.Context, scope string, dashboardName, tabName, testGroupNanme string) (*statepb.Grid, error)

Grid fetch tab and grid info (columns, rows, ..etc)

func (Server) ListDashboardGroupHTTP added in v0.0.118

func (s Server) ListDashboardGroupHTTP(w http.ResponseWriter, r *http.Request)

ListDashboardGroupHTTP returns every dashboard group in TestGrid Response json: ListDashboardGroupResponse

func (*Server) ListDashboardGroups

ListDashboardGroup returns every dashboard group in TestGrid

func (*Server) ListDashboardSummaries added in v0.0.159

ListDashboardSummaries returns the list of dashboard summaries for the particular dashboard group. Think of it as aggregated view of ListTabSummaries data. Dashboard group name doesn't have to be normalized. Returns an error iff - dashboard name does not exist in config - the server can't read summary from GCS bucket

func (Server) ListDashboardSummariesHTTP added in v0.0.160

func (s Server) ListDashboardSummariesHTTP(w http.ResponseWriter, r *http.Request)

ListDashboardSummariesHTTP returns the list of dashboard summaries as a json. Response json: ListDashboardSummariesResponse

func (*Server) ListDashboardTabs added in v0.0.91

ListDashboardTabs returns a given dashboard tabs

func (Server) ListDashboardTabsHTTP added in v0.0.118

func (s Server) ListDashboardTabsHTTP(w http.ResponseWriter, r *http.Request)

ListDashboardTabsHTTP returns a given dashboard tabs Response json: ListDashboardTabsResponse

func (*Server) ListDashboards added in v0.0.91

ListDashboard returns every dashboard in TestGrid

func (Server) ListDashboardsHTTP added in v0.0.118

func (s Server) ListDashboardsHTTP(w http.ResponseWriter, r *http.Request)

ListDashboardsHTTP returns every dashboard in TestGrid Response json: ListDashboardResponse

func (*Server) ListHeaders added in v0.0.92

ListHeaders returns dashboard tab headers

func (Server) ListHeadersHTTP added in v0.0.118

func (s Server) ListHeadersHTTP(w http.ResponseWriter, r *http.Request)

ListHeadersHTTP returns dashboard tab headers Response json: ListHeadersResponse

func (*Server) ListRows added in v0.0.92

ListRows returns dashboard tab rows

func (Server) ListRowsHTTP added in v0.0.118

func (s Server) ListRowsHTTP(w http.ResponseWriter, r *http.Request)

ListRowsHTTP returns dashboard tab rows Response json: ListRowsResponse

func (*Server) ListTabSummaries added in v0.0.155

ListTabSummaries returns the list of tab summaries for the particular dashboard. Dashboard name doesn't have to be normalized. Returns an error iff dashboard does not exist OR the server can't read summary from GCS bucket.

func (Server) ListTabSummariesHTTP added in v0.0.155

func (s Server) ListTabSummariesHTTP(w http.ResponseWriter, r *http.Request)

ListTabSummariesHTTP returns the list of tab summaries as a json. Response json: ListTabSummariesResponse

Jump to

Keyboard shortcuts

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