Documentation ¶
Index ¶
- Constants
- func InferVersion(defaultVersion model.WebVersion, h http.Handler) http.Handler
- func NewDevServer(packageDir PackageDir, devPort model.WebDevPort) (*devServer, error)
- func NewFakeServer() fakeServer
- func NewProdServer(bucket AssetBucket, version model.WebVersion) (prodServer, error)
- func RewriteContentURLs(req *http.Request, content []byte) []byte
- func StripPrefix(prefix string, h http.Handler) http.Handler
- type AssetBucket
- type PackageDir
- type PublicPathPrefixContextKey
- type Server
Constants ¶
View Source
const ProdAssetBucket = AssetBucket("https://storage.googleapis.com/tilt-static-assets/")
View Source
const WebVersionKey = "web_version"
Variables ¶
This section is empty.
Functions ¶
func InferVersion ¶ added in v0.10.16
Middleware that injects version information into the request. We rewrite the URL to contain the version.
If no default version is passed, and we can't find the version in the url path, we will write a 500 error.
func NewDevServer ¶ added in v0.10.14
func NewDevServer(packageDir PackageDir, devPort model.WebDevPort) (*devServer, error)
func NewFakeServer ¶
func NewFakeServer() fakeServer
func NewProdServer ¶ added in v0.10.14
func NewProdServer(bucket AssetBucket, version model.WebVersion) (prodServer, error)
func RewriteContentURLs ¶ added in v0.10.16
Types ¶
type AssetBucket ¶ added in v0.10.14
type AssetBucket string
A URL where assets live.
func (AssetBucket) String ¶ added in v0.10.14
func (b AssetBucket) String() string
type PackageDir ¶ added in v0.10.14
type PackageDir string
The directory where the package.json where our JS source code lives.
func (PackageDir) String ¶ added in v0.10.14
func (d PackageDir) String() string
type PublicPathPrefixContextKey ¶ added in v0.10.16
type PublicPathPrefixContextKey struct{}
Click to show internal directories.
Click to hide internal directories.