helpers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUpdates

func CheckForUpdates(logger wailsLogger.Logger, WailsConfigFile []byte)

func DownladAndInstallUpdate

func DownladAndInstallUpdate(logger wailsLogger.Logger, source string)

func IsAdmin

func IsAdmin(logger wailsLogger.Logger) bool

func PlantLatestAsaAPIRelease added in v0.1.2

func PlantLatestAsaAPIRelease(extractionPath string) error

Download the latest release of AsaApi from GitHub and extract it to the specified path

func RunMeElevated

func RunMeElevated(logger wailsLogger.Logger)

func SendToDiscord

func SendToDiscord(message string, webhookUrl string) error

SendToDiscord sends the given message to the webhook url

Types

type Asset

type Asset struct {
	Name        string `json:"name"`
	DownloadUrl string `json:"browser_download_url"`
}

type Env

type Env struct {
	Version     string `json:"version"`
	Environment string `json:"environment"`
	IsNightly   bool   `json:"isNightly"`
	Info        struct {
		ProductName string `json:"productName"`
	} `json:"info"`
}

type HelpersController

type HelpersController struct {
	WailsCfg *Env
	// contains filtered or unexported fields
}

func NewHelpersController

func NewHelpersController() *HelpersController

func (*HelpersController) GetVersion added in v0.1.0

func (c *HelpersController) GetVersion() string

func (*HelpersController) OpenDirectoryDialog

func (c *HelpersController) OpenDirectoryDialog() (string, error)

func (*HelpersController) OpenFileDialog added in v0.1.1

func (c *HelpersController) OpenFileDialog() (string, error)

func (*HelpersController) SendRconCommand

func (c *HelpersController) SendRconCommand(command string, ip string, port int, password string) (string, error)

func (*HelpersController) Startup

func (c *HelpersController) Startup(ctx context.Context, wailsCfgFile []byte)

type NetworkInterface

type NetworkInterface struct {
	Name string
	IP   net.IP
}

func GetNetworkInterfaces

func GetNetworkInterfaces() ([]NetworkInterface, error)

type Release

type Release struct {
	ID      int64   `json:"id"`
	Url     string  `json:"url"`
	TagName string  `json:"tag_name"`
	Name    string  `json:"name"`
	Assets  []Asset `json:"assets"`
}

Jump to

Keyboard shortcuts

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