handlers

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Overview

Package handlers contains the milo frontend handlers, including static HTML generation, HTTP routing, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleHandler

func ConsoleHandler(c *router.Context) error

ConsoleHandler renders the console page.

func ErrorHandler

func ErrorHandler(c *router.Context, err error)

ErrorHandler renders an error page for the user.

func GetBuildPage

func GetBuildPage(ctx *router.Context, br *buildbucketpb.GetBuildRequest, blamelistOpt buildbucket.BlamelistOption) (*ui.BuildPage, error)

GetBuildPage fetches the full set of information for a Milo build page from Buildbucket. Including the blamelist and other auxiliary information.

func GetLimit

func GetLimit(r *http.Request, def int) int

GetLimit extracts the "limit", "numbuilds", or "num_builds" http param from the request, or returns def implying no limit was specified.

func GetReload

func GetReload(r *http.Request, def int) int

GetReload extracts the "reload" http param from the request, or returns def implying no limit was specified.

func NewTreeStatusClient

func NewTreeStatusClient(ctx context.Context, luciTreeStatusHost string) (tspb.TreeStatusClient, error)
func ProjectLinks(c context.Context, project, group string) []ui.LinkGroup

ProjectLinks returns the navigation list surrounding a project and optionally group.

func Run

func Run(srv *server.Server, templatePath string)

Run sets up all the routes and runs the server.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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