freedesktop

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRequest

func HandleRequest(conn net.Conn, req Request, manager *Manager)

Types

type AccountsState

type AccountsState struct {
	Available     bool   `json:"available"`
	UserPath      string `json:"userPath"`
	IconFile      string `json:"iconFile"`
	RealName      string `json:"realName"`
	UserName      string `json:"userName"`
	AccountType   int32  `json:"accountType"`
	HomeDirectory string `json:"homeDirectory"`
	Shell         string `json:"shell"`
	Email         string `json:"email"`
	Language      string `json:"language"`
	Location      string `json:"location"`
	Locked        bool   `json:"locked"`
	PasswordMode  int32  `json:"passwordMode"`
	UID           uint64 `json:"uid"`
}

type FreedeskState

type FreedeskState struct {
	Accounts AccountsState `json:"accounts"`
	Settings SettingsState `json:"settings"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() (*Manager, error)

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) GetState

func (m *Manager) GetState() FreedeskState

func (*Manager) GetUserIconFile

func (m *Manager) GetUserIconFile(username string) (string, error)

func (*Manager) NotifySubscribers added in v0.3.3

func (m *Manager) NotifySubscribers()

func (*Manager) SetEmail

func (m *Manager) SetEmail(email string) error

func (*Manager) SetIconFile

func (m *Manager) SetIconFile(iconPath string) error

func (*Manager) SetIconTheme added in v0.1.13

func (m *Manager) SetIconTheme(iconTheme string) error

func (*Manager) SetLanguage

func (m *Manager) SetLanguage(language string) error

func (*Manager) SetLocation

func (m *Manager) SetLocation(location string) error

func (*Manager) SetRealName

func (m *Manager) SetRealName(name string) error

func (*Manager) Subscribe added in v0.3.3

func (m *Manager) Subscribe(id string) chan FreedeskState

func (*Manager) Unsubscribe added in v0.3.3

func (m *Manager) Unsubscribe(id string)

type Request

type Request struct {
	ID     int                    `json:"id,omitempty"`
	Method string                 `json:"method"`
	Params map[string]interface{} `json:"params,omitempty"`
}

type SettingsState

type SettingsState struct {
	Available   bool   `json:"available"`
	ColorScheme uint32 `json:"colorScheme"`
}

type SuccessResult

type SuccessResult struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Value   string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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