apiFunc

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostOSGet

func HostOSGet() string

HostOSGet returns basic information about the host system operating system and/or architecture

func HostSettingGet

func HostSettingGet() (string, error)

HostSettingGet uses the os package to return the system's hostname

func InstallUniversal

func InstallUniversal(src string) (string, error)

InstallUniversal is the currently used method to install plugins ditching windows powershell scripts of earlier versions

func Ping

func Ping(domain string) (int, error)

Ping mimics the command line utility ping while just returning the HTTP Status Code and nothing else

func PingNoSSL

func PingNoSSL(domain string) (int, error)

PingNoSSL mimics the command line utility ping, returning the HTTP Status Code, but ignoring certificates, to aide self-hosted status checks

func UninstallUniversal

func UninstallUniversal(pluginNameRaw string) (string, error)

UninstallUniversal uses Go functions and libraries to uninstall plugins rather than powershell scripts and is the currently used method

func UniversalAvailableUpdate

func UniversalAvailableUpdate() (string, error)

UniversalAvailableUpdate is the Go function reliant method to update available plugins directly from the Github repo without a feature update needed.

func Unzip

func Unzip(src string, dest string) ([]string, error)

Unzip is used during InstallUniversal to unpack the plugin zip files and install them

Types

type UniversalDualPluginList

type UniversalDualPluginList struct {
	Available *UniversalPluginList
	Installed *UniversalPluginList
}

UniversalDualPluginList holds two arrays of UniversalPluginItem's. One named available and the other named installed

func GetDualPluginList

func GetDualPluginList() (au *UniversalDualPluginList)

GetDualPluginList will return a UniversalDualPluginList item with both installed and available plugins

type UniversalPluginIcon

type UniversalPluginIcon struct {
	Available bool   `json:"available"`
	Type      string `json:"type"`
	Src       string `json:"src"`
	Style     string `json:"style"`
	Symbol    string `json:"symbol"`
}

UniversalPluginIcon is a child of UniversalPluginItem the attempt at de-duplication of plugin item models

type UniversalPluginItem

type UniversalPluginItem struct {
	Name         string                 `json:"name"`
	FriendlyName string                 `json:"friendlyName"`
	Version      string                 `json:"version"`
	Description  string                 `json:"description"`
	Type         string                 `json:"type"`
	Author       string                 `json:"author"`
	License      string                 `json:"license"`
	InfoLink     string                 `json:"infoLink"`
	DownloadLink string                 `json:"downloadLink"`
	Installed    bool                   `json:"installed"`
	Config       bool                   `json:"config"`
	MainDir      string                 `json:"mainDir"`
	Main         string                 `json:"main"`
	Options      UniversalPluginOptions `json:"options"`
	Icon         UniversalPluginIcon    `json:"icon"`
}

UniversalPluginItem is the attempt at de-duplication of plugin item models

type UniversalPluginList

type UniversalPluginList struct {
	UniversalPluginItem []*UniversalPluginItem
}

UniversalPluginList holds the array of UniversalPluginItem 's as the attempt of de-duplication of plugin item models

func GetPluginList

func GetPluginList(source string) (au *UniversalPluginList)

GetPluginList takes the target string plugin list, and returns it as a UniversalPluginList item

type UniversalPluginOptions

type UniversalPluginOptions struct {
	Explain  string `json:"explain"`
	Autofill string `json:"autofill"`
}

UniversalPluginOptions is a child of UniversalPluginItem the attempt at de-duplication of plugin Item models

Jump to

Keyboard shortcuts

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