Movatterモバイル変換


[0]ホーム

URL:


app

package
v0.0.0-...-35ef07fLatest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:17Imported by:0

Details

Repository

cs.opensource.google/go/x/build

Links

Documentation

Overview

Package app implements the performance data storage server. Combinean App with a database and filesystem to get an HTTP server.

Index

Constants

This section is empty.

Variables

View Source
var ErrResponseWritten =errors.New("response written")

ErrResponseWritten can be returned by App.Auth to abort the normal /upload handling.

Functions

This section is empty.

Types

typeApp

type App struct {DB *db.DBFSfs.FS// Auth obtains the username for the request.// If necessary, it can write its own response (e.g. a// redirect) and return ErrResponseWritten.Auth func(http.ResponseWriter, *http.Request) (string,error)// ViewURLBase will be used to construct a URL to return as// "viewurl" in the response from /upload. If it is non-empty,// the upload ID will be appended to ViewURLBase.ViewURLBasestring// BaseDir is the directory containing the "template" directory.// If empty, the current directory will be used.BaseDirstring}

App manages the storage server logic. Construct an App instanceusing a literal with DB and FS objects and call RegisterOnMux toconnect it with an HTTP server.

func (*App)RegisterOnMux

func (a *App) RegisterOnMux(mux *http.ServeMux)

RegisterOnMux registers the app's URLs on mux.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp