Documentation ¶
Index ¶
- Variables
- func CheckInputValidity(entries []*widget.Entry) error
- func ConfigureForm(w fyne.Window, alive bool, mailConnection string, mailUser string, ...) *widget.Form
- func ConfigureInputValidation(server *widget.Entry, username *widget.Entry, password *widget.Entry)
- func ConfigureSubmitButton(w fyne.Window, alive bool, server *widget.Entry, username *widget.Entry, ...)
- func InputValidater(entry *widget.Entry, regex string, maxLen int, failure string)
- func MapMailBooleans(b bool) string
- func ReturnForm(w fyne.Window) *widget.Form
- func ReturnHeader(pageTitle string) *fyne.Container
- func ReturnMailSettings() (string, string, string)
- func UpdateSetting(w fyne.Window, key string, value string)
- type FrontendMain
- type Setting
Constants ¶
This section is empty.
Variables ¶
var ( SettingPages = map[string]Setting{ "email": {"Email", emailScreen, true}, "wiki": {"WIKI", wikiScreen, true}, "impressum": {"Impressum", impressumScreen, true}, } SettingPagesIndex = map[string][]string{ "": {"email", "wiki", "impressum"}, } )
Defines the actual Mapping from each Setting struct to it's respective index
Functions ¶
func CheckInputValidity ¶
CheckInputValidity checks the validity of each entry before Updating the setting, passing all the entries as []*widget.Entry
func ConfigureForm ¶
func ConfigureForm(w fyne.Window, alive bool, mailConnection string, mailUser string, mailPassword string, serverStatus *fyne.Container) *widget.Form
ConfigureForm configures the mailForm regarding input as well as functionalities passing mailConnection, mailUser, mailPassword, serverStatus returning the fully configure form.
func ConfigureInputValidation ¶
ConfigureInputValidation takes every widget.Entry and assigns a specific Inputvalidater reducing the max input as well as the input regarding syntax passing all entries
func ConfigureSubmitButton ¶
func ConfigureSubmitButton(w fyne.Window, alive bool, server *widget.Entry, username *widget.Entry, password *widget.Entry, submitButton *widget.Button)
ConfigureSubmitButton configures the submitButton responsible for udpating the settings DB passing sever(Entry),username(Entry),password(Entry)as well as the sumbitButton itself. returning the fully configure form.
func InputValidater ¶
InputValidater defines the actual Vaildatorfunctions for ConfigureInputValidation passing the entry, the regex matching schema, the maxLen as well as a message for failure.
func MapMailBooleans ¶
func ReturnForm ¶
ReturnForm returns the fully configured Email Form responsible for managing and updating mail settings
func ReturnHeader ¶
func ReturnHeader(pageTitle string) *fyne.Container
ReturnHeader will return the canvas.Text objet of each page
func ReturnMailSettings ¶
ReturnMailSettings makes a lookup in the setting DB to assign each key to it's respective value returning all assigned values
func UpdateSetting ¶
UpdateSetting collects the currently selected setting values, intialize a Setting Object for each and updates the changes on the database
Types ¶
type FrontendMain ¶
func New ¶
func New(mvvm shared.MVVM) *FrontendMain