Documentation ¶
Index ¶
- Variables
- type App
- type Form
- type FormImpl
- func (form FormImpl) AddEventHandler(evt string, f HandlerFunc) Form
- func (form FormImpl) Initialize(ws *action.WebSocket) Form
- func (form FormImpl) Name() string
- func (form FormImpl) Render(ws *action.WebSocket, app *App, params []string) error
- func (form FormImpl) Run(ws *action.WebSocket, app *App) error
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrProtocol is an error of WS Valente protocol ErrProtocol = errors.New("Protocol Error") //ErrEOFWS end of file of WS ErrEOFWS = errors.New("EOF Error") )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { WS *action.WebSocket Forms map[string]Form Data map[string]interface{} CurrentForm Form LastAccess time.Time }
App is a Web Application representation
type Form ¶
type Form interface { Name() string AddEventHandler(evt string, f HandlerFunc) Form Run(ws *action.WebSocket, app *App) error Initialize(ws *action.WebSocket) Form Render(ws *action.WebSocket, app *App, params []string) error }
Form represents the unit of user interaction
type FormImpl ¶
type FormImpl struct { FName string // contains filtered or unexported fields }
FormImpl its a simple Form
func (FormImpl) AddEventHandler ¶
func (form FormImpl) AddEventHandler(evt string, f HandlerFunc) Form
AddEventHandler add an f function to handle evt event
func (FormImpl) Initialize ¶
Initialize inits the form
Click to show internal directories.
Click to hide internal directories.