tools

package
v0.0.0-...-154c265 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Tools Tray for Systray

Index

Constants

View Source
const APP_SERVICE = "KasaSysTray"
View Source
const KEYRING_KEY = "passphrase"

Variables

This section is empty.

Functions

func DisplayErrorGUI

func DisplayErrorGUI(err error)

func Notify

func Notify(title string, message string, icon zenity.DialogIcon) error

func ResetAll

func ResetAll(config *Configuration) error

func ResetKeyring

func ResetKeyring() error

func SetAuthGUI

func SetAuthGUI() (username string, password string, err error)

func SetPassphraseGUI

func SetPassphraseGUI() (passphrase string, err error)

Types

type Auth

type Auth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Configuration

type Configuration struct {
	Passphrase    string `json:"passphrase"`
	EncryptedAuth string `json:"encrypted_auth"`
	AutoConnect   bool   `json:"auto_connect"`
}

func SetupConfiguration

func SetupConfiguration() *Configuration

func (*Configuration) DeleteConfig

func (config *Configuration) DeleteConfig() error

func (*Configuration) ReadAuth

func (config *Configuration) ReadAuth(useGUI bool) (*Auth, bool, error)

func (*Configuration) SetAuth

func (config *Configuration) SetAuth(username string, password string) error

func (*Configuration) SetPassphrase

func (config *Configuration) SetPassphrase(passphrase string) error

func (*Configuration) WriteConfiguration

func (config *Configuration) WriteConfiguration() error

type Tray

type Tray interface {
	Run()
	// contains filtered or unexported methods
}

func NewTray

func NewTray(title string, tooltip string, config *Configuration) Tray

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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