Documentation ¶
Index ¶
- Constants
- Variables
- func Carousel(carouselId string, activeIndex int, items []*CarouselItem) HTMLComponent
- func CompositeComponentSample1Page(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingClearMergeQueryQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingEventFunc(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingFieldValue(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingLocation(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingMergeQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingPushState(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingPushStateURL(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingQueries(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingRaw(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingReload(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingScript(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingStringQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
- func EventHandlingURL(ctx *web.EventContext) (pr web.PageResponse, err error)
- func ExamplePage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func FormHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func HelloButton(ctx *web.EventContext) (pr web.PageResponse, err error)
- func HelloWorld(ctx *web.EventContext) (pr web.PageResponse, err error)
- func HelloWorldReload(ctx *web.EventContext) (pr web.PageResponse, err error)
- func MultiStatePage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func Mux(mux Muxer)
- func Navbar(title string, activeIndex int, items ...HTMLComponent) HTMLComponent
- func Page1(ctx *web.EventContext) (pr web.PageResponse, err error)
- func Page2(ctx *web.EventContext) (pr web.PageResponse, err error)
- func PartialReloadPage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func PartialUpdatePage(ctx *web.EventContext) (pr web.PageResponse, err error)
- func PrettyFormAsJSON(ctx *web.EventContext) HTMLComponent
- func ReloadWithFlash(ctx *web.EventContext) (pr web.PageResponse, err error)
- func ShortCutSample(ctx *web.EventContext) (pr web.PageResponse, err error)
- func TodoMVCExample(ctx *web.EventContext) (r web.PageResponse, err error)
- func TreeViewExample(cx *web.EventContext) (pr web.PageResponse, err error)
- func TypeSafeBuilderExample(ctx *web.EventContext) (pr web.PageResponse, err error)
- func URLPathByFunc(v interface{}) string
- func WebScopeUseForm(ctx *web.EventContext) (pr web.PageResponse, err error)
- func WebScopeUseLocals(ctx *web.EventContext) (pr web.PageResponse, err error)
- type CarouselItem
- type CreateTodoRequest
- type Data1
- type IndexMux
- type MemoryStorage
- type Muxer
- type MyData
- type NestForm2
- type Storage
- type Todo
- type TodoApp
- type TodoAppDep
- type TodoItem
- type TreeItem
- type TreeNode
- type Visibility
Constants ¶
View Source
const ( Page1Path = "/examples/page_1" Page2Path = "/examples/page_2" )
View Source
const NotifyTodosChanged = "NotifyTodosChanged"
Variables ¶
View Source
var ( EventHandlingPagePath = URLPathByFunc(EventHandlingPage) EventExamplePagePath = URLPathByFunc(ExamplePage) )
View Source
var ( TodoMVCExamplePB = web.Page(TodoMVCExample) TodoMVCExamplePath = URLPathByFunc(TodoMVCExample) InjectorTop = "top" InjectorSub = "top/sub" )
View Source
var ( WebScopeUseLocalsPath = URLPathByFunc(WebScopeUseLocals) WebScopeUseFormPath = URLPathByFunc(WebScopeUseForm) )
View Source
var CompositeComponentSample1PagePB = web.Page(CompositeComponentSample1Page)
View Source
var CompositeComponentSample1PagePath = URLPathByFunc(CompositeComponentSample1Page)
View Source
var ErrRecordNotFound = errors.New("record not found")
View Source
var EventHandlingPagePB = web.Page(EventHandlingPage). EventFunc("form", func(ctx *web.EventContext) (r web.EventResponse, err error) { r.RunScript = fmt.Sprintf(`alert("form data is %s")`, ctx.R.FormValue("name")) return }). EventFunc("hello", func(ctx *web.EventContext) (r web.EventResponse, err error) { r.RunScript = `alert("Hello World")` return })
View Source
var ExamplePagePB = web.Page(ExamplePage)
View Source
var FormHandlingPagePB = web.Page(FormHandlingPage).
EventFunc("checkvalue", checkvalue)
View Source
var FormHandlingPagePath = URLPathByFunc(FormHandlingPage)
View Source
var HelloButtonPB = web.Page(HelloButton).
EventFunc("reload", reload)
View Source
var HelloButtonPath = URLPathByFunc(HelloButton)
View Source
var HelloWorldPB = web.Page(HelloWorld) // this is already a http.Handler
View Source
var HelloWorldPath = URLPathByFunc(HelloWorld)
View Source
var HelloWorldReloadPB = web.Page(HelloWorldReload).
EventFunc(reloadEvent, update)
View Source
var HelloWorldReloadPath = URLPathByFunc(HelloWorldReload)
View Source
var MultiStatePagePB = web.Page(MultiStatePage).
EventFunc("openPanel", openPanel).
EventFunc("update5", update5)
View Source
var MultiStatePagePath = URLPathByFunc(MultiStatePage)
View Source
var Page1PB = web.Page(Page1)
View Source
var Page2PB = web.Page(Page2).
EventFunc("doAction1", doAction1).
EventFunc("doAction2", doAction2)
View Source
var PartialReloadPagePB = web.Page(PartialReloadPage).
EventFunc("related", related).
EventFunc("reload3", reload3).
EventFunc("autoReload", autoReload).
EventFunc("loadData", loadData)
View Source
var PartialReloadPagePath = URLPathByFunc(PartialReloadPage)
View Source
var PartialUpdatePagePB = web.Page(PartialUpdatePage).
EventFunc("edit1", edit1).
EventFunc("reload2", reload2)
View Source
var PartialUpdatePagePath = URLPathByFunc(PartialUpdatePage)
View Source
var ReloadWithFlashPB = web.Page(ReloadWithFlash).EventFunc("update2", update2)
View Source
var ReloadWithFlashPath = URLPathByFunc(ReloadWithFlash)
View Source
var ShortCutSamplePB = web.Page(ShortCutSample)
View Source
var ShortCutSamplePath = URLPathByFunc(ShortCutSample)
View Source
var TreeViewExamplePB = web.Page(TreeViewExample)
View Source
var TreeViewExamplePath = URLPathByFunc(TreeViewExample)
View Source
var TypeSafeBuilderSamplePFPB = web.Page(TypeSafeBuilderExample)
View Source
var TypeSafeBuilderSamplePath = URLPathByFunc(TypeSafeBuilderExample)
View Source
var UseLocalsPB = web.Page(WebScopeUseLocals)
View Source
var UsePlaidFormPB = web.Page(WebScopeUseForm).
EventFunc("updateValue", updateValue)
Functions ¶
func Carousel ¶
func Carousel(carouselId string, activeIndex int, items []*CarouselItem) HTMLComponent
func CompositeComponentSample1Page ¶
func CompositeComponentSample1Page(ctx *web.EventContext) (pr web.PageResponse, err error)
func EventHandlingClearMergeQueryQuery ¶
func EventHandlingClearMergeQueryQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingClearMergeQuerySample)
func EventHandlingEventFunc ¶
func EventHandlingEventFunc(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingEventFuncSample)
func EventHandlingFieldValue ¶
func EventHandlingFieldValue(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingFieldValueSample)
func EventHandlingLocation ¶
func EventHandlingLocation(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingLocationSample)
func EventHandlingMergeQuery ¶
func EventHandlingMergeQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingMergeQuerySample)
func EventHandlingPage ¶
func EventHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)
func EventHandlingPushState ¶
func EventHandlingPushState(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingPushStateSample)
func EventHandlingPushStateURL ¶
func EventHandlingPushStateURL(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingPushStateURLSample)
func EventHandlingQueries ¶
func EventHandlingQueries(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingQueriesSample)
func EventHandlingQuery ¶
func EventHandlingQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingQuerySample)
func EventHandlingRaw ¶
func EventHandlingRaw(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingRawSample)
func EventHandlingReload ¶
func EventHandlingReload(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingReloadSample)
func EventHandlingScript ¶
func EventHandlingScript(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingBeforeScriptSample)
func EventHandlingStringQuery ¶
func EventHandlingStringQuery(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingStringQuerySample)
func EventHandlingURL ¶
func EventHandlingURL(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(EventHandlingURLSample)
func ExamplePage ¶
func ExamplePage(ctx *web.EventContext) (pr web.PageResponse, err error)
func FormHandlingPage ¶
func FormHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)
func HelloButton ¶
func HelloButton(ctx *web.EventContext) (pr web.PageResponse, err error)
func HelloWorld ¶
func HelloWorld(ctx *web.EventContext) (pr web.PageResponse, err error)
func HelloWorldReload ¶
func HelloWorldReload(ctx *web.EventContext) (pr web.PageResponse, err error)
func MultiStatePage ¶
func MultiStatePage(ctx *web.EventContext) (pr web.PageResponse, err error)
func PartialReloadPage ¶
func PartialReloadPage(ctx *web.EventContext) (pr web.PageResponse, err error)
func PartialUpdatePage ¶
func PartialUpdatePage(ctx *web.EventContext) (pr web.PageResponse, err error)
func PrettyFormAsJSON ¶
func PrettyFormAsJSON(ctx *web.EventContext) HTMLComponent
func ReloadWithFlash ¶
func ReloadWithFlash(ctx *web.EventContext) (pr web.PageResponse, err error)
func ShortCutSample ¶
func ShortCutSample(ctx *web.EventContext) (pr web.PageResponse, err error)
func TodoMVCExample ¶
func TodoMVCExample(ctx *web.EventContext) (r web.PageResponse, err error)
func TreeViewExample ¶
func TreeViewExample(cx *web.EventContext) (pr web.PageResponse, err error)
func TypeSafeBuilderExample ¶
func TypeSafeBuilderExample(ctx *web.EventContext) (pr web.PageResponse, err error)
func URLPathByFunc ¶
func URLPathByFunc(v interface{}) string
func WebScopeUseForm ¶
func WebScopeUseForm(ctx *web.EventContext) (pr web.PageResponse, err error)
func WebScopeUseLocals ¶
func WebScopeUseLocals(ctx *web.EventContext) (pr web.PageResponse, err error)
@snippet_begin(WebScopeUseLocalsSample1)
Types ¶
type CarouselItem ¶
type CreateTodoRequest ¶
type CreateTodoRequest struct {
Title string `json:"title"`
}
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
func (*MemoryStorage) Create ¶
func (m *MemoryStorage) Create(todo *Todo) error
func (*MemoryStorage) Delete ¶
func (m *MemoryStorage) Delete(id string) error
func (*MemoryStorage) List ¶
func (m *MemoryStorage) List() ([]*Todo, error)
func (*MemoryStorage) Update ¶
func (m *MemoryStorage) Update(todo *Todo) error
type MyData ¶
type MyData struct { Text1 string Checkbox1 string Color1 string Email1 string Radio1 string Range1 int Url1 string Tel1 string Month1 string Time1 string Week1 string DatetimeLocal1 string File1 []*multipart.FileHeader HiddenValue1 string }
func (*MyData) File1Bytes ¶
type TodoApp ¶
type TodoApp struct { ID string `json:"id"` Visibility Visibility `json:"visibility" query:";cookie"` // contains filtered or unexported fields }
func (*TodoApp) CreateTodo ¶
func (c *TodoApp) CreateTodo(ctx context.Context, req *CreateTodoRequest) (r web.EventResponse, err error)
type TodoAppDep ¶
type TodoAppDep struct {
// contains filtered or unexported fields
}
type TodoItem ¶
type TodoItem struct { ID string `json:"id"` // contains filtered or unexported fields }
type TreeItem ¶
type TreeItem struct { ID string `json:"id"` Model *TreeNode `json:"model"` IsOpen bool `json:"is_open"` }
func (*TreeItem) ChangeType ¶
func (t *TreeItem) ChangeType()
type Visibility ¶
type Visibility string
const ( VisibilityAll Visibility = "all" VisibilityActive Visibility = "active" VisibilityCompleted Visibility = "completed" )
Source Files ¶
- composite-components.go
- event-handling.go
- form-handling.go
- hello-button.go
- hello-world-reload.go
- hello-world.go
- manipulate-page-url.go
- mux.go
- page-transition.go
- partial-reload.go
- partial-update.go
- reload-with-a-flash.go
- shortcut.go
- storage.go
- todomvc.go
- treeview.go
- type-safe-builder-sample.go
- utils.go
- web-scope.go
Click to show internal directories.
Click to hide internal directories.