Documentation
¶
Overview ¶
This file contains methods intended to be called in frontend
this file contains types to serve as wrappers since wails supports only up to two function return values: (data, error) or (data) https://wails.io/docs/howdoesitwork#method-binding:~:text=The%20generated%20methods,passed%20to%20it.
Index ¶
- Constants
- func GetAppMenu(app *App) *menu.Menu
- func GetFileAsBytes(path string) []byte
- func OpenUrlInBrowser(url string) error
- type App
- func (app *App) GoConnectToNetwork(networkName string) (any, error)
- func (app *App) GoDisconnectFromNetwork(networkName string) (any, error)
- func (app *App) GoGetKnownNetworks() ([]Network, error)
- func (app *App) GoGetNetclientConfig() (NcConfig, error)
- func (app *App) GoGetNetwork(networkName string) (Network, error)
- func (app *App) GoGetNodePeers(node config.Node) ([]wgtypes.PeerConfig, error)
- func (app *App) GoGetRecentServerNames() ([]string, error)
- func (app *App) GoJoinNetworkByBasicAuth(serverName, username, networkName, password string) (any, error)
- func (app *App) GoJoinNetworkBySso(serverName, networkName string) (any, error)
- func (app *App) GoJoinNetworkByToken(token string) (any, error)
- func (app *App) GoLeaveNetwork(networkName string) (any, error)
- func (app *App) GoOpenDialogue(dialogueType runtime.DialogType, msg, title string) (string, error)
- func (app *App) GoParseAccessToken(token string) (*models.AccessToken, error)
- func (app *App) GoPullLatestNodeConfig(network string) (Network, error)
- func (app *App) GoRegisterWithEnrollmentKey(key string) (any, error)
- func (app *App) GoUninstall() (any, error)
- func (app *App) GoUpdateNetclientConfig(updatedConfig config.Config) (any, error)
- func (app *App) GoWriteToClipboard(data string) (any, error)
- func (a *App) Startup(ctx context.Context)
- type NcConfig
- type Network
Constants ¶
const EV_OPEN_NETWORKS_PAGE = "open-networks-page"
const EV_OPEN_SETTINGS_PAGE = "open-settings-page"
const NETMAKER_DOCS_LINK = "https://docs.netmaker.org/"
Variables ¶
This section is empty.
Functions ¶
func GetAppMenu ¶
GetAppMenu builds and returns the application menu
func GetFileAsBytes ¶
GetFileAsBytes returns the byte array form files It can be used to return the app icon
func OpenUrlInBrowser ¶
Opens the user's browser with the given URL
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App struct
func (*App) GoConnectToNetwork ¶
App.goConnectToNetwork connects to the given network
func (*App) GoDisconnectFromNetwork ¶
App.goDisconnectFromNetwork disconnects from the given network
func (*App) GoGetKnownNetworks ¶
App.GoGetKnownNetworks returns all known network configs (node, server)
func (*App) GoGetNetclientConfig ¶
App.GoGetNetclientConfig retrieves the netclient config (params the remain constant regardless the networks nc is connected to)
func (*App) GoGetNetwork ¶
App.GoGetNetwork returns node, server configs for the given network
func (*App) GoGetNodePeers ¶
App.GoGetNodePeers returns the peers for the given node
func (*App) GoGetRecentServerNames ¶
App.GoGetRecentServerNames returns names of all known (joined) servers
func (*App) GoJoinNetworkByBasicAuth ¶
func (app *App) GoJoinNetworkByBasicAuth(serverName, username, networkName, password string) (any, error)
App.GoJoinNetworkByBasicAuth joins a network by basic auth
func (*App) GoJoinNetworkBySso ¶
App.GoJoinNetworkBySso joins a network by SSO
func (*App) GoJoinNetworkByToken ¶
App.GoJoinNetworkByToken joins a network with the given token
func (*App) GoLeaveNetwork ¶
App.GoLeaveNetwork leaves a known network
func (*App) GoOpenDialogue ¶
App.GoOpenDialogue opens a dialogue box with title and message. Type of dialogue box is based on the type passed
func (*App) GoParseAccessToken ¶
func (app *App) GoParseAccessToken(token string) (*models.AccessToken, error)
App.GoParseAccessToken parses a valid access token and returns the deconstructed parts
func (*App) GoPullLatestNodeConfig ¶
App.GoPullLatestNodeConfig pulls the latest node config from the server and returns the network config
func (*App) GoRegisterWithEnrollmentKey ¶ added in v0.18.3
func (*App) GoUninstall ¶
App.GoUninstall uninstalls netclient form the machine
func (*App) GoUpdateNetclientConfig ¶
App.GoUpdateNetclientConfig updates netclient/host configs
func (*App) GoWriteToClipboard ¶
App.GoWriteToClipboard writes given data to clipboard