handlers

package
v0.0.0-...-922036a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(w http.ResponseWriter, r *http.Request)

Code returns the content of a source file.

func ExportToPDF

func ExportToPDF(w http.ResponseWriter, r *http.Request)

ExportToPDF generates a pdf that contains one page per slide.

func Grid

func Grid(w http.ResponseWriter, r *http.Request)

Grid displays a grid view of all steps as iframes.

This has the nice side-effect of warming the browser cache with all necessary resources. Otherwise the speaker and their audience may experience a lag between each step, while image resources are loading, especially if the DemoIt server is remote (not localhost).

func LastStep

func LastStep(w http.ResponseWriter, r *http.Request)

LastStep redirects to the latest page.

func Ping

func Ping(w http.ResponseWriter, r *http.Request)

Ping does http HEAD on a URL and returns its status.

func QRCode

func QRCode(w http.ResponseWriter, r *http.Request)

QRCode generated QR Code images.

func Shell

func Shell(w http.ResponseWriter, r *http.Request)

Shell redirects to the url of a shell running in the given folder.

func SpeakerNotes

func SpeakerNotes(w http.ResponseWriter, r *http.Request)

SpeakerNotes provides the presenter view, which depends on the main window to be able to display the "current" slide with notes.

func Static

func Static(w http.ResponseWriter, r *http.Request)

Static renders static files.

func Step

func Step(w http.ResponseWriter, r *http.Request)

Step renders a given page.

func VSCode

func VSCode(w http.ResponseWriter, r *http.Request)

VSCode redirects to the url of a VSCode session running with https://github.com/cdr/code-server.

func VerifyConfiguration

func VerifyConfiguration() error

VerifyConfiguration runs a couple of verifications on the configuration.

Types

type Page

type Page struct {
	WorkingDir  string
	HTML        template.HTML
	URL         string
	PrevURL     string
	NextURL     string
	CurrentStep int
	StepCount   int
	DevMode     bool
}

Page describes a page of the demo.

Jump to

Keyboard shortcuts

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