Versions in this module Expand all Collapse all v0 v0.1.0 Feb 4, 2022 Changes in this version + const ContextBindingName + const ReadyFuncName + var ChromeBinary string + func BasicAuth(auth func(user string, pass string) bool) func(http.HandlerFunc) http.HandlerFunc + func NewHtmlRoot(html string) *simpleRoot + func NewSimpleRoot(files map[string]string) *simpleRoot + type Bindable interface + Bind func(b Bindings) + BindFunc func(name string, fn interface{}) + BindMap func(m map[string]interface{}) + BindObject func(obj interface{}) + BindPrefix func(name string, b Bindings) + GetBindings func() []Bindings + type Binder interface + Bind func(b Bindings) error + type BindingFunc interface + type Bindings interface + Error func() error + Map func(*UIContext) map[string]BindingFunc + Names func() []string + func Delay(names []string, factory func(*UIContext) Bindings) Bindings + func DelayMap(prototype map[string]interface{}, factory func(*UIContext) Bindings) Bindings + func DelayObject(prototype interface{}, factory func(*UIContext) Bindings) Bindings + func Func(name string, fn interface{}) Bindings + func Map(m map[string]interface{}) Bindings + func Object(obj interface{}) Bindings + func Prefix(name string, b Bindings) Bindings + type ClientOptions struct + BlurOnClose bool + type Context struct + Seq int + func (c *Context) Deadline() (deadline time.Time, ok bool) + func (c *Context) Done() <-chan struct{} + func (c *Context) Err() error + func (c *Context) Value(key interface{}) interface{} + func (c *Context) WithCancel() context.CancelFunc + type FileServer struct + Addr string + Auth func(http.HandlerFunc) http.HandlerFunc + ClientOptions *ClientOptions + HistoryMode bool + Listener net.Listener + Prefix string + ServerPath string + func NewFileServer(root http.FileSystem) *FileServer + func (s *FileServer) Bind(b Bindings) error + func (s *FileServer) Close() error + func (s *FileServer) Done() <-chan struct{} + func (s *FileServer) ListenAndServe() error + func (s *FileServer) ListenAndServeTLS(certFile, keyFile string) error + func (s *FileServer) ServeExistingServer(server HTTPServer) + func (s *FileServer) ServeExistingServerTLS(server HTTPServer) + func (s *FileServer) Shutdown(ctx context.Context) error + type Function struct + BindingName string + Seq int + func (c *Function) Call(args ...interface{}) Value + type HTTPServer interface + Handle func(pattern string, handler http.Handler) + type HTTPServerFunc func(pattern string, handler http.Handler) + func (f HTTPServerFunc) Handle(pattern string, handler http.Handler) + type NativeWindow interface + Close func() + Open func(url string) error + type ObjectFactory func(*UIContext) interface + type Option func(*uiConfig) error + func AppChromeArgs(args ...string) Option + func AppChromeBinary(path string) Option + func AppFullScreen() Option + func AppWindow(x, y, width, height int) Option + func BlurOnClose(blur bool) Option + func HistoryMode(enable bool) Option + func LocalExitDelay(d time.Duration) Option + func LocalMapURL(mapURL func(net.Listener) string) Option + func Mode(mod string) Option + func OnlineAddr(addr string) Option + func OnlineAttach(existingServer HTTPServer, tls bool) Option + func OnlineAuth(auth func(http.HandlerFunc) http.HandlerFunc) Option + func OnlineListener(listener net.Listener) Option + func OnlinePort(port int) Option + func OnlinePrefix(prefix string) Option + func OnlineTLS(certFile, keyFile string) Option + func Quiet() Option + func Root(root http.FileSystem) Option + func RootFiles(files map[string]string) Option + func RootHtml(html string) Option + func RootVueHtml(html string) Option + type Page interface + Bind func(name string, f interface{}) error + Close func() + Done func() <-chan struct{} + Eval func(js string) Value + SetReady func() error + type RunMode interface + IsApp func() bool + IsLocal func() bool + IsOnline func() bool + IsPage func() bool + type UI interface + Add func(name string, child UI) + Run func() error + func New(ops ...Option) UI + type UIContext struct + Done <-chan bool + Request *http.Request + type Value interface + Array func() []Value + Bool func() bool + Err func() error + Float func() float32 + Int func() int + Object func() map[string]Value + String func() string + To func(interface{}) error + type Window interface + Bind func(b Bindings) error + Close func() error + Done func() <-chan struct{} + Eval func(js string) Value + Open func() error + Server func() *FileServer + SetExitDelay func(d time.Duration) + func NewApp(root http.FileSystem, x, y int, width, height int, chromeArgs ...string) Window + func NewAppMapURL(root http.FileSystem, x, y int, width, height int, ...) Window + func NewChromePage(root http.FileSystem) Window + func NewNativeWindow(root http.FileSystem, win NativeWindow, mapURL func(net.Listener) string) Window + func NewPage(root http.FileSystem) Window + func NewPageMapURL(root http.FileSystem, mapURL func(net.Listener) string) Window