api

package
v0.0.0-...-4448a72 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: BSD-3-Clause Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewAlertsApi

func NewAlertsApi(loginProvider alogin.Login, configProvider alerts.ConfigProvider, alertStore alerts.Store, notifier notify.Notifier, subStore subscription.Store, dryRunRequests *dryrun.Requests) alertsApi

NewAlertsApi returns a new instance of the alertsApi struct.

func NewAnomaliesApi

func NewAnomaliesApi(loginProvider alogin.Login, chromeperfClient chromeperf.ChromePerfClient) anomaliesApi

func NewFavoritesApi

func NewFavoritesApi(loginProvider alogin.Login, favoritesStore favorites.Store) favoritesApi

NewFavoritesApi returns a new instance of favoritesApi.

func NewGraphApi

func NewGraphApi(numParamSetsForQueries int, loginProvider alogin.Login, dfBuilder dataframe.DataFrameBuilder, perfGit perfgit.Git, traceStore tracestore.TraceStore, shortcutStore shortcut.Store, anomalyStore anomalies.Store, progressTracker progress.Tracker, ingestedFS fs.FS) graphApi

NewGraphApi returns a new instance of the graphApi struct.

func NewPinpointApi

func NewPinpointApi(loginProvider alogin.Login, pinpointClient *pinpoint.Client) pinpointApi

NewPinpointApi returns a new instance of the pinpointApi struct.

func NewQueryApi

func NewQueryApi(paramsetRefresher psrefresh.ParamSetRefresher) queryApi

NewQueryApi returns a new instance of queryApi struct.

func NewRegressionsApi

func NewRegressionsApi(loginProvider alogin.Login, configProvider alerts.ConfigProvider, alertStore alerts.Store, regStore regression.Store, perfGit perfgit.Git, anomalyApiClient chromeperf.AnomalyApiClient, urlProvider *urlprovider.URLProvider, graphsShortcutStore graphsshortcut.Store, alertGroupClient chromeperf.AlertGroupApiClient, progressTracker progress.Tracker, shortcutStore shortcut.Store, dfBuilder dataframe.DataFrameBuilder, paramsetRefresher psrefresh.ParamSetRefresher) regressionsApi

NewRegressionsApi returns a new instance of regressionsApi.

func NewSheriffConfigApi

func NewSheriffConfigApi(loginProvider alogin.Login) sheriffConfigApi

NewSheriffConfigApi returns a new instance of the sheriffConfigApi struct.

func NewShortCutsApi

func NewShortCutsApi(shortcutStore shortcut.Store, graphsShortcutStore graphsshortcut.Store) shortcutsApi

NewShortCutsApi returns a new instance of the shortcutsApi struct.

func NewTriageApi

func NewTriageApi(loginProvider alogin.Login, chromeperfClient chromeperf.ChromePerfClient, anomalyStore anomalies.Store) triageApi

Types

type AlertUpdateResponse

type AlertUpdateResponse struct {
	IDAsString string
}

AlertUpdateResponse is the JSON response when an Alert is created or udpated.

type CIDHandlerResponse

type CIDHandlerResponse struct {
	// CommitSlice describes all the commits requested.
	CommitSlice []provider.Commit `json:"commitSlice"`

	// LogEntry is the full git log entry for the first commit in the
	// CommitSlice.
	LogEntry string `json:"logEntry"`
}

CIDHandlerResponse is the form of the response from the /_/cid/ endpoint.

type ChromeperfAssociateBugResponse

type ChromeperfAssociateBugResponse struct {
	Error string `json:"error,omitempty"`
}

Response object from the chromeperf associate alerts to existing bug response.

type ChromeperfFileBugResponse

type ChromeperfFileBugResponse struct {
	BugId int    `json:"bug_id"`
	Error string `json:"error"`
}

Response object from the chromeperf file bug response.

type ClusterStartResponse

type ClusterStartResponse struct {
	ID string `json:"id"`
}

ClusterStartResponse is serialized as JSON for the response in clusterStartHandler.

type CommitDetailsRequest

type CommitDetailsRequest struct {
	CommitNumber types.CommitNumber `json:"cid"`
	TraceID      string             `json:"traceid"`
}

CommitDetailsRequest is for deserializing incoming POST requests in detailsHandler.

type CountHandlerRequest

type CountHandlerRequest struct {
	Q     string `json:"q"`
	Begin int    `json:"begin"`
	End   int    `json:"end"`
}

CountHandlerRequest is the JSON format for the countHandler request.

type CountHandlerResponse

type CountHandlerResponse struct {
	Count    int                         `json:"count"`
	Paramset paramtools.ReadOnlyParamSet `json:"paramset"`
}

CountHandlerResponse is the JSON format if the countHandler response.

type CreateFavRequest

type CreateFavRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Url         string `json:"url"`
}

CreateFavRequest is the request to create a new Favorite

type DeleteFavRequest

type DeleteFavRequest struct {
	Id string `json:"id"`
}

DeleteFavRequest is a request to delete an existing Favorite

type EditAnomaliesRequest

type EditAnomaliesRequest struct {
	Keys          []int    `json:"keys"`
	Action        string   `json:"action"`
	StartRevision int      `json:"start_revision,omitempty"`
	EndRevision   int      `json:"end_revision,omitempty"`
	TraceNames    []string `json:"trace_names"`
}

Request object for the request from the following triage actions:

  • Ignore
  • X button (untriage the anomaly)
  • Nudge (move the anomaly position to adjacent datapoints)

type EditAnomaliesResponse

type EditAnomaliesResponse struct {
	Error string `json:"error"`
}

Response object from the chromeperf edit anomaly request.

type FileBugRequest

type FileBugRequest struct {
	Keys        []int    `json:"keys"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Component   string   `json:"component"`
	Assignee    string   `json:"assignee,omitempty"`
	Ccs         []string `json:"ccs,omitempty"`
	Labels      []string `json:"labels,omitempty"`
	TraceNames  []string `json:"trace_names,omitempty"`
}

Request object for the request from new bug UI.

type FrontendApi

type FrontendApi interface {
	// RegisterHandlers registers the api handlers for their respective routes.
	RegisterHandlers(*chi.Mux)
}

FrontendApi provides an interface for frontend apis to implement.

type GetAnomaliesRequest

type GetAnomaliesRequest struct {
	Sheriff             string `json:"sheriff"`
	IncludeTriaged      bool   `json:"triaged"`
	IncludeImprovements bool   `json:"improvements"`
	QueryCursor         string `json:"anomaly_cursor"`
	Host                string `json:"host"`
}

Request object for the request from the anomaly table UI.

type GetAnomaliesResponse

type GetAnomaliesResponse struct {
	// The list of anomalies.
	Anomalies []chromeperf.Anomaly `json:"anomaly_list"`
	// The cursor of the current query. It will be used to 'Load More' for the next query.
	QueryCursor string `json:"anomaly_cursor"`
	// Error message if any.
	Error string `json:"error"`
}

Request object for the request from the anomaly table UI.

type GetGraphsShortcutRequest

type GetGraphsShortcutRequest struct {
	ID string `json:"id"`
}

type GetMetadataResponse

type GetMetadataResponse struct {
	Version    string     `json:"version"`
	Validation Validation `json:"validation"`
}

type GetSheriffListResponse

type GetSheriffListResponse struct {
	SheriffList []string `json:"sheriff_list"`
	Error       string   `json:"error"`
}

Response object for the request from sheriff list UI.

type Message

type Message struct {
	Path     string `json:"path"`
	Severity string `json:"severity"`
	Text     string `json:"text"`
}

type NextParamListHandlerRequest

type NextParamListHandlerRequest struct {
	Query string `json:"q"`
}

NextParamListHandlerRequest is the JSON format for NextParamListHandler request.

type NextParamListHandlerResponse

type NextParamListHandlerResponse struct {
	Count    int                         `json:"count"`
	Paramset paramtools.ReadOnlyParamSet `json:"paramset"`
}

NextParamListHandlerResponse is the JSON format for NextParamListHandler response.

type Pattern

type Pattern struct {
	ConfigSet string `json:"config_set"`
	Path      string `json:"path"`
}

type RangeRequest

type RangeRequest struct {
	Offset types.CommitNumber `json:"offset"`
	Begin  int64              `json:"begin"`
	End    int64              `json:"end"`
}

RangeRequest is used in cidRangeHandler and is used to query for a range of cid.CommitIDs that include the range between [begin, end) and include the explicit CommitID of "Source, Offset".

type RegressionRangeRequest

type RegressionRangeRequest struct {
	Begin       int64  `json:"begin"`
	End         int64  `json:"end"`
	Subset      Subset `json:"subset"`
	AlertFilter string `json:"alert_filter"` // Can be an alertfilter constant, or a category prefixed with "cat:".
}

RegressionRangeRequest is used in regressionRangeHandler and is used to query for a range of of Regressions.

Begin and End are Unix timestamps in seconds.

type RegressionRangeResponse

type RegressionRangeResponse struct {
	Header     []*alerts.Alert  `json:"header"`
	Table      []*RegressionRow `json:"table"`
	Categories []string         `json:"categories"`
}

RegressionRangeResponse is the response from regressionRangeHandler.

type RegressionRow

type RegressionRow struct {
	Commit  provider.Commit          `json:"cid"`
	Columns []*regression.Regression `json:"columns"`
}

RegressionRow are all the Regression's for a specific commit. It is used in RegressionRangeResponse.

The Columns have the same order as RegressionRangeResponse.Header.

type ShiftRequest

type ShiftRequest struct {
	// Begin is the commit number at the beginning of the range.
	Begin types.CommitNumber `json:"begin"`

	// End is the commit number at the end of the range.
	End types.CommitNumber `json:"end"`
}

ShiftRequest is a request to find the timestamps of a range of commits.

type ShiftResponse

type ShiftResponse struct {
	Begin int64 `json:"begin"` // In seconds from the epoch.
	End   int64 `json:"end"`   // In seconds from the epoch.
}

ShiftResponse are the timestamps from a ShiftRequest.

type SkiaAssociateBugRequest

type SkiaAssociateBugRequest struct {
	BugId      int      `json:"bug_id"`
	Keys       []int    `json:"keys"`
	TraceNames []string `json:"trace_names"`
}

Existing bug request object to asscociate alerts from new bug UI.

type SkiaAssociateBugResponse

type SkiaAssociateBugResponse struct {
	BugId int `json:"bug_id,omitempty"`
}

Existing bug response object for Skia UI.

type SkiaFileBugResponse

type SkiaFileBugResponse struct {
	BugId int `json:"bug_id,omitempty"`
}

Response object for Skia UI.

type Subset

type Subset string

Subset is the Subset of regressions we are querying for.

const (
	SubsetAll         Subset = "all"         // Include all regressions in a range.
	SubsetRegressions Subset = "regressions" // Only include regressions in a range that are alerting.
	SubsetUntriaged   Subset = "untriaged"   // All untriaged alerting regressions regardless of range.
)

type TriageRequest

type TriageRequest struct {
	Cid         types.CommitNumber      `json:"cid"`
	Alert       alerts.Alert            `json:"alert"`
	Triage      regression.TriageStatus `json:"triage"`
	ClusterType string                  `json:"cluster_type"`
}

TriageRequest is used in triageHandler.

type TriageResponse

type TriageResponse struct {
	Bug string `json:"bug"` // URL to bug reporting page.
}

TriageResponse is used in triageHandler.

type TryBugRequest

type TryBugRequest struct {
	BugURITemplate string `json:"bug_uri_template"`
}

TryBugRequest is a request to try a bug template URI.

type TryBugResponse

type TryBugResponse struct {
	URL string `json:"url"`
}

TryBugResponse is response to a TryBugRequest.

type UpdateFavRequest

type UpdateFavRequest struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Url         string `json:"url"`
}

UpdateFavRequest is a request to update an existing Favorite

type ValidateConfigRequest

type ValidateConfigRequest struct {
	Path    string `json:"path"`
	Content string `json:"content"`
}

type ValidateConfigResponse

type ValidateConfigResponse struct {
	Messages []Message `json:"messages"`
}

type Validation

type Validation struct {
	Patterns []Pattern `json:"patterns"`
	Url      string    `json:"url"`
}

Jump to

Keyboard shortcuts

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