jawsboot

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files added in v0.80.0

func Files() (files []*staticserve.StaticServe, err error)

Files returns the staticserve.StaticServe entries for the embedded Bootstrap JS and CSS.

func GenerateHeadHTML added in v0.80.0

func GenerateHeadHTML(jw *jaws.Jaws, prefix string, files []*staticserve.StaticServe, extra ...string) (err error)

GenerateHeadHTML calls jw.GenerateHeadHTML with URL's for the staticserve files prefixed with the given path prefix and any extra URL's you provide.

func Setup

func Setup(jw *jaws.Jaws, handleFn HandleFunc, extra ...string) (err error)

Setup calls SetupUsing with a prefix of "/static".

func SetupUsing

func SetupUsing(jw *jaws.Jaws, prefix string, handleFn HandleFunc, extra ...string) (err error)

SetupUsing sets up Jaws to serve the Bootstrap files from the prefix path, calling handleFn for each URI and staticserve.StaticServe. If handleFn is nil, http.DefaultServeMux.Handle is used instead. Any extra URL's given are passed to GenerateHeadHTML.

Types

type HandleFunc added in v0.80.0

type HandleFunc = func(uri string, handler http.Handler)

HandleFunc matches the signature of http.ServeMux.Handle(), but is called without method or parameters for the pattern. E.g. ("/static/filename.1234567.js").

Jump to

Keyboard shortcuts

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