Documentation
¶
Overview ¶
Package bespa is a UI framework for building single-page applications on the backend. BESPA = Backend Single Page Application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultFactory ¶
type DefaultFactory struct {
widget.WidgetFactory
basic.BasicFactory
form.FormFactory
table.TableFactory
}
DefaultFactory aggregates the factories of all the default widget libraries. It is intended for more conveniently instantiating widgets from multiple packages using a common prefix. It can be used inside a web handler:
function doMyPage(w http.ResponseWriter, r *http.Request) {
wf := bespa.DefaultFactory{}
page := wf.Page(
wf.AppBar("My page"),
...
)
}
or set globally for the package:
var wf = bespa.DefaultFactory{}
function doMyPage(w http.ResponseWriter, r *http.Request) {
page := wf.Page(
wf.AppBar("My page"),
...
)
}
The factory can be extended with third-party widget libraries like so:
wf := struct{
bespa.DefaultFactory
thirdparty.ThirdPartyFactory
}{}
Individual widget constructors can be overridden like so:
type MyFactory struct{
bespa.DefaultFactory
}
func (f MyFactory) Heading() *MyHeadingWidget
Directories
¶
| Path | Synopsis |
|---|---|
|
Package basic is a library of the basic widgets.
|
Package basic is a library of the basic widgets. |
|
Package chart is a library of Apache ECharts widgets.
|
Package chart is a library of Apache ECharts widgets. |
|
maps
Package maps registers a dynamic GeoJSON server for Apache ECharts maps.
|
Package maps registers a dynamic GeoJSON server for Apache ECharts maps. |
|
Package code provides syntax-highlighted source code widgets.
|
Package code provides syntax-highlighted source code widgets. |
|
Package css is responsible for the generation of CSS.
|
Package css is responsible for the generation of CSS. |
|
Package form is a library of form input widgets.
|
Package form is a library of form input widgets. |
|
Package hct is a Go port of Google's HCT Material color utility.
|
Package hct is a Go port of Google's HCT Material color utility. |
|
precalc
command
|
|
|
Package mermaid is a library of Mermaid diagram widgets.
|
Package mermaid is a library of Mermaid diagram widgets. |
|
Package nav is a library of navigation widgets.
|
Package nav is a library of navigation widgets. |
|
Package richedit wraps Quill 2 as a rich-text input widget.
|
Package richedit wraps Quill 2 as a rich-text input widget. |
|
Package table is a library of widgets used to render a table.
|
Package table is a library of widgets used to render a table. |
|
Package widget is the core of the framework.
|
Package widget is the core of the framework. |
Click to show internal directories.
Click to hide internal directories.