Documentation
¶
Overview ¶
Package handler implements HTTP server that handles requests to default module.
Index ¶
- Variables
- func FlushOldAlertsHandler(ctx context.Context) error
- func FlushOldAnnotationsHandler(ctx context.Context) error
- func GetAlerts(ctx context.Context, tree string, unresolved, resolved bool) (*messages.AlertsSummary, error)
- func GetAlertsCommonHandler(ctx *router.Context, unresolved bool, resolved bool) *messages.AlertsSummary
- func GetAlertsHandler(ctx *router.Context)
- func GetAnalyzeHandler(ctx *router.Context)
- func GetBQQueryHandler(ctx *router.Context)
- func GetLayoutTestsHandler(ctx *router.Context)
- func GetResolvedAlertsHandler(ctx *router.Context)
- func GetRevRangeHandler(ctx *router.Context)
- func GetTreeLogoHandler(ctx *router.Context)
- func GetTrees(c context.Context) ([]byte, error)
- func GetUnresolvedAlertsHandler(ctx *router.Context)
- func GetUserAutocompleteHandler(ctx *router.Context)
- func PostClientMonHandler(ctx *router.Context)
- func PostLayoutTestExpectationChangeHandler(ctx *router.Context)
- func WithAnalyzer(ctx context.Context, a *analyzer.Analyzer) context.Context
- type AnnotationHandler
- type AnnotationResponse
- type AnnotationsIssueClient
- type MonorailBugData
- type SettingsPage
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnrecognizedTree indicates that a request specified an unrecognized tree. ErrUnrecognizedTree = fmt.Errorf("unrecognized tree name") )
Functions ¶
func FlushOldAlertsHandler ¶
FlushOldAlertsHandler deletes old resolved alerts from datastore.
func FlushOldAnnotationsHandler ¶
FlushOldAnnotationsHandler culls obsolete annotations from the datastore. TODO (crbug.com/1079068): Perhaps we want to revisit flush annotation logic.
func GetAlerts ¶
func GetAlerts(ctx context.Context, tree string, unresolved, resolved bool) (*messages.AlertsSummary, error)
GetAlerts reads the alerts from datastore.
func GetAlertsCommonHandler ¶
func GetAlertsCommonHandler(ctx *router.Context, unresolved bool, resolved bool) *messages.AlertsSummary
GetAlertsCommonHandler handles API requests for alerts.
func GetAlertsHandler ¶
GetAlertsHandler handles API requests for all alerts and revision summaries.
func GetAnalyzeHandler ¶
GetAnalyzeHandler enqueues a request to run an analysis on a particular tree. This is usually hit by appengine cron rather than manually.
func GetBQQueryHandler ¶
GetBQQueryHandler queries BQ sheriffable_failures for a particular project, and caches the result. This is usually hit by appengine cron rather than manually.
func GetLayoutTestsHandler ¶
GetLayoutTestsHandler returns a JSON summary of webkit layout tests and their expected results.
func GetResolvedAlertsHandler ¶
GetResolvedAlertsHandler handles API requests for resolved alerts.
func GetRevRangeHandler ¶
GetRevRangeHandler returns a revision range queury for gitiles, given one or two commit positions.
func GetTreeLogoHandler ¶
GetTreeLogoHandler returns a signed URL to an image asset hosted on GCS.
func GetUnresolvedAlertsHandler ¶
GetUnresolvedAlertsHandler handles API requests for unresolved alerts and revision summaries.
func GetUserAutocompleteHandler ¶
GetUserAutocompleteHandler returns chromium developer email addresses that match the query string.
func PostClientMonHandler ¶
PostClientMonHandler handles uncaught javascript errors reported by the client.
func PostLayoutTestExpectationChangeHandler ¶
PostLayoutTestExpectationChangeHandler enqueues an asynchronous task to create a Gerrit changelist to change test expectations based on the fields POSTed to it.
Types ¶
type AnnotationHandler ¶
type AnnotationHandler struct { }
AnnotationHandler handles annotation-related requests.
func (*AnnotationHandler) GetAnnotationsHandler ¶
func (ah *AnnotationHandler) GetAnnotationsHandler(ctx *router.Context, activeKeys map[string]interface{})
GetAnnotationsHandler retrieves a set of annotations.
func (*AnnotationHandler) PostAnnotationsHandler ¶
func (ah *AnnotationHandler) PostAnnotationsHandler(ctx *router.Context)
PostAnnotationsHandler handles updates to annotations.
type AnnotationResponse ¶
type AnnotationResponse struct { model.Annotation BugData map[string]MonorailBugData `json:"bug_data"` }
AnnotationResponse ... The Annotation object extended with cached bug data.
type AnnotationsIssueClient ¶
type AnnotationsIssueClient interface {
SearchIssues(context.Context, *monorailv3.SearchIssuesRequest, ...grpc.CallOption) (*monorailv3.SearchIssuesResponse, error)
}
AnnotationsIssueClient is for testing purpose
type MonorailBugData ¶
type MonorailBugData struct { BugID string `json:"id,omitempty"` ProjectID string `json:"projectId,omitempty"` Summary string `json:"summary,omitempty"` Status string `json:"status,omitempty"` }
MonorailBugData wrap around monorailv3.Issue to send to frontend.
type SettingsPage ¶
SettingsPage is the SoM admin settings page.
func (SettingsPage) ReadSettings ¶
ReadSettings converts query parameters and POST body into settings values.
func (SettingsPage) Title ¶
func (SettingsPage) Title(c context.Context) (string, error)
Title returns the settings page title.
func (SettingsPage) WriteSettings ¶
WriteSettings persists the settings values.