webserver

package
v2.0.0-beta.34 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WebAssets is our single asset db instance.
	// It will be constructed by a dynamically generated method in this directory.
	WebAssets *assetdb.AssetDB = assetdb.NewAssetDB()
)

Functions

This section is empty.

Types

type WebClient

type WebClient struct {
	// contains filtered or unexported fields
}

WebClient represents an individual web session

func (*WebClient) CallResult

func (wc *WebClient) CallResult(message string)

CallResult sends the result of the Go function call back to the originator in the frontend

func (*WebClient) DarkModeEnabled

func (wc *WebClient) DarkModeEnabled(callbackID string)

func (*WebClient) DeleteTrayMenuByID

func (wc *WebClient) DeleteTrayMenuByID(id string)

func (*WebClient) MessageDialog

func (wc *WebClient) MessageDialog(dialogOptions runtime.MessageDialogOptions, callbackID string)

func (*WebClient) NotifyEvent

func (wc *WebClient) NotifyEvent(message string)

NotifyEvent sends the event

func (*WebClient) OpenDirectoryDialog

func (wc *WebClient) OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

func (*WebClient) OpenFileDialog

func (wc *WebClient) OpenFileDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

func (*WebClient) OpenMultipleFilesDialog

func (wc *WebClient) OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

func (*WebClient) Quit

func (wc *WebClient) Quit()

Quit terminates the webclient session

func (*WebClient) Run

func (wc *WebClient) Run(w *WebServer)

Run processes messages from the remote webclient

func (*WebClient) SaveDialog

func (wc *WebClient) SaveDialog(dialogOptions runtime.SaveDialogOptions, callbackID string)

func (*WebClient) SendMessage

func (wc *WebClient) SendMessage(message string)

SendMessage converts the string to a []byte and passes it to the connection's Writer to send to the remote client The Writer itself prevents multiple users at the same time.

func (*WebClient) SetApplicationMenu

func (wc *WebClient) SetApplicationMenu(menuJSON string)

func (*WebClient) SetTrayMenu

func (wc *WebClient) SetTrayMenu(trayMenuJSON string)

func (*WebClient) UpdateContextMenu

func (wc *WebClient) UpdateContextMenu(contextMenuJSON string)

func (*WebClient) UpdateMenu

func (wc *WebClient) UpdateMenu(menu *menu.Menu)

func (*WebClient) UpdateTray

func (wc *WebClient) UpdateTray(menu *menu.Menu)

func (*WebClient) UpdateTrayIcon

func (wc *WebClient) UpdateTrayIcon(name string)

func (*WebClient) UpdateTrayLabel

func (wc *WebClient) UpdateTrayLabel(label string)

func (*WebClient) UpdateTrayMenu

func (wc *WebClient) UpdateTrayMenu(trayMenuJSON string)

func (*WebClient) UpdateTrayMenuLabel

func (wc *WebClient) UpdateTrayMenuLabel(trayMenuJSON string)

func (*WebClient) WindowCenter

func (wc *WebClient) WindowCenter()

func (*WebClient) WindowFullscreen

func (wc *WebClient) WindowFullscreen()

WindowFullscreen is a noop in the webclient

func (*WebClient) WindowHide

func (wc *WebClient) WindowHide()

func (*WebClient) WindowMaximise

func (wc *WebClient) WindowMaximise()

func (*WebClient) WindowMinimise

func (wc *WebClient) WindowMinimise()

func (*WebClient) WindowPosition

func (wc *WebClient) WindowPosition(x int, y int)

func (*WebClient) WindowSetColour

func (wc *WebClient) WindowSetColour(colour int)

WindowSetColour is a noop in the webclient

func (*WebClient) WindowSetMaxSize

func (wc *WebClient) WindowSetMaxSize(width int, height int)

func (*WebClient) WindowSetMinSize

func (wc *WebClient) WindowSetMinSize(width int, height int)

func (*WebClient) WindowSetTitle

func (wc *WebClient) WindowSetTitle(title string)

WindowSetTitle is a noop in the webclient

func (*WebClient) WindowShow

func (wc *WebClient) WindowShow()

func (*WebClient) WindowSize

func (wc *WebClient) WindowSize(width int, height int)

func (*WebClient) WindowUnfullscreen

func (wc *WebClient) WindowUnfullscreen()

WindowUnfullscreen is a noop in the webclient

func (*WebClient) WindowUnmaximise

func (wc *WebClient) WindowUnmaximise()

func (*WebClient) WindowUnminimise

func (wc *WebClient) WindowUnminimise()

type WebServer

type WebServer struct {
	// contains filtered or unexported fields
}

WebServer serves the application over http

func NewWebServer

func NewWebServer(logger *logger.Logger) *WebServer

NewWebServer creates a new WebServer

func (*WebServer) SetBindings

func (w *WebServer) SetBindings(bindings *binding.Bindings)

SetBindings provides the webserver with the mapping of bindings to provide to a client

func (*WebServer) SetIP

func (w *WebServer) SetIP(ip string)

SetIP sets the server ip to listen on

func (*WebServer) SetPort

func (w *WebServer) SetPort(port int)

SetPort sets the server port to listen on

func (*WebServer) Start

func (w *WebServer) Start(dispatcher *messagedispatcher.Dispatcher, event *subsystem.Event) error

Start the webserver

func (*WebServer) URL

func (w *WebServer) URL() string

URL returns the URL that the server is serving from

Jump to

Keyboard shortcuts

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