Documentation ¶
Overview ¶
Package web serves a sample web server that hosts URLS to
serve various programs in The-GPL book. It is also invokes from the docker command line to be served on Google Cloud. logger prints log messages to standard output, whereas fmt.Printf outputs to http.ResponseWriter
Index ¶
Constants ¶
View Source
const ( // IndexPage entry point go HTML page IndexPage = "index.gohtml" // AboutPage shows about page AboutPage = "about.gohtml" // LisMandelPage shows Lissajous and Mandelbrot images LisMandelPage = "lismandel.gohtml" // SurfacesPage shows computed SVG images SurfacesPage = "surfaces.gohtml" // LisImageHanding image page Headings LisImageHanding = "Lissajous Surface" // MandelImageHanding Page Headings MandelImageHanding = "Mandelbrot Fractal Color" // MandelBWImageHanding Page Headings MandelBWImageHanding = "Mandelbrot Fractal in Black and White" // EggSurfaceHeading for egg surface page EggSurfaceHeading = "An Egg Surface" // SincSurfaceHeading for sinc page SincSurfaceHeading = "A Sinc Function" // ValleySurfaceHeading for valley surface page ValleySurfaceHeading = "A Valley" // SquareSurfaceHeading for square surface page SquareSurfaceHeading = "Squares" )
Template names and Page headings
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AboutPageData ¶
type AboutPageData struct { Active string Data []SocialCard }
AboutPageData contains Active Page name and Data for the index page
type Active ¶
type Active string
Active defines current active page, one of enums
const ( // Post is index page Post Active = "post" // Lis page draws Lissajous images Lis Active = "lis" // Mandel page draws Mandelbrot fractals images Mandel Active = "mandel" // MandelBW page draws Mandelbrot fractals black and white images MandelBW Active = "mandelbw" // Sinc drawn on a 3D surface Sinc Active = "sinc" // Egg drawn on a 3D surface Egg Active = "egg" // Valley drawn on a 3D surface Valley Active = "valley" // Square drawn on a 3D surface Square Active = "sq" // About page About Active = "about" )
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
func (CLI) DisplayHelp ¶
func (s CLI) DisplayHelp()
DisplayHelp prints help on command line for lissajous module
type ImagesPageData ¶
type ImagesPageData struct {
Active, ImageName, Heading string
}
ImagesPageData defines data for templates
type IndexPageData ¶
IndexPageData contains Active Page name and Data for the index page
type SVGPageData ¶
SVGPageData contains Active Page name and Data for the index page
type SVGSurfacePath ¶
type SVGSurfacePath string
SVGSurfacePath lists URL paths for SVG surfaces
func (SVGSurfacePath) String ¶
func (s SVGSurfacePath) String() string
String converts SVGSurfacePath to string
type SocialCard ¶
type SocialCard struct {
Image, ImageAlt string
Title string
SocialMessage, SocialLink, SocialHandle string
}
SocialCard defines data on a social card
Click to show internal directories.
Click to hide internal directories.