gaeapp

package
v0.0.0-...-f4b31ea Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package gaeapp contains helpers for working with GAE's app.yaml.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppYAML

type AppYAML struct {
	// Runtime defines what GAE runtime to use e.g. "go121".
	Runtime string
	// Entrypoint is a shell command to run to start the app.
	Entrypoint string
	// Handlers is a list of URL handlers.
	Handlers []*HandlerYAML
	// contains filtered or unexported fields
}

AppYAML is a loaded app.yaml.

See https://cloud.google.com/appengine/docs/standard/reference/app-yaml Only fields needed by cloudbuildhepler are exposed.

Note that loading and saving an app.yaml via this struct will drop all comments and custom formatting. Only significant YAML data will be preserved.

func LoadAppYAML

func LoadAppYAML(blob []byte) (*AppYAML, error)

LoadAppYAML parses app.yaml.

func (*AppYAML) Save

func (a *AppYAML) Save() ([]byte, error)

Save produces app.yaml in a serialized form.

type HandlerYAML

type HandlerYAML struct {
	// StaticDir is a directory with static files to upload.
	StaticDir string
	// StaticFiles is a regexp used to map URLs to static files to serve.
	StaticFiles string
	// Upload is a rgexp used to define what static files to upload.
	Upload string
	// contains filtered or unexported fields
}

HandlerYAML is a handle to a single "handlers" entry in an App YAML.

Do not construct it by hand, only take it from AppYAML struct.

Jump to

Keyboard shortcuts

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