Documentation
¶
Overview ¶
Package systemd provides a TUI component that lists, inspects, and manages systemd --user services whose names start with "pcloud-sync-".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionsDialog ¶ added in v1.3.0
type ActionsDialog struct {
// contains filtered or unexported fields
}
ActionsDialog presents an action menu for a selected systemd unit.
func NewActionsDialog ¶ added in v1.3.0
func NewActionsDialog(unit Unit, width, height int) ActionsDialog
NewActionsDialog creates an action picker for the given unit. Actions that are not applicable to the unit's current state are disabled.
func (ActionsDialog) Init ¶ added in v1.3.0
func (m ActionsDialog) Init() tea.Cmd
func (ActionsDialog) View ¶ added in v1.3.0
func (m ActionsDialog) View() tea.View
type AddDaemonDialog ¶ added in v1.4.0
type AddDaemonDialog struct {
// contains filtered or unexported fields
}
AddDaemonDialog is a multi-step wizard for creating a new pcloud-sync systemd service. Steps: mode → pCloud path → local path → validate → install.
func NewAddDaemonDialog ¶ added in v1.4.0
func NewAddDaemonDialog(api pcloud.CloudAPI) *AddDaemonDialog
NewAddDaemonDialog creates the wizard dialog. api is used for pCloud path validation; it may be nil (validation is skipped).
func (*AddDaemonDialog) Init ¶ added in v1.4.0
func (m *AddDaemonDialog) Init() tea.Cmd
func (*AddDaemonDialog) View ¶ added in v1.4.0
func (m *AddDaemonDialog) View() tea.View
type ChangeModeDialog ¶ added in v1.4.0
type ChangeModeDialog struct {
// contains filtered or unexported fields
}
ChangeModeDialog lets the user pick a new sync mode for an existing unit.
func NewChangeModeDialog ¶ added in v1.4.0
func NewChangeModeDialog(unit Unit) *ChangeModeDialog
NewChangeModeDialog creates the dialog pre-selected on the unit's current mode.
func (*ChangeModeDialog) Init ¶ added in v1.4.0
func (m *ChangeModeDialog) Init() tea.Cmd
func (*ChangeModeDialog) View ¶ added in v1.4.0
func (m *ChangeModeDialog) View() tea.View
type LogsDialog ¶
type LogsDialog struct {
// contains filtered or unexported fields
}
LogsDialog is a tea.Model that renders journal output for a systemd unit in a scrollable viewport. It is shown via msgs.ShowDialogMsg and closes with msgs.CloseDialogMsg when the user presses esc.
func NewLogsDialog ¶
func NewLogsDialog(unit string, width, height int) LogsDialog
NewLogsDialog builds a LogsDialog for the given unit name. width and height are the current terminal dimensions.
func (LogsDialog) Init ¶
func (m LogsDialog) Init() tea.Cmd
func (LogsDialog) View ¶
func (m LogsDialog) View() tea.View
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the systemd daemon manager TUI component. It satisfies the same component interface as filebrowser.Model: Init/Update/(View string), not a full tea.Model.
type RemoveDialog ¶ added in v1.3.0
type RemoveDialog struct {
// contains filtered or unexported fields
}
RemoveDialog asks the user to confirm, then stops, disables, and deletes the systemd unit file for the selected sync daemon.
func NewRemoveDialog ¶ added in v1.3.0
func NewRemoveDialog(unit Unit, width, height int) *RemoveDialog
NewRemoveDialog creates a remove confirmation dialog for the given unit.
func (*RemoveDialog) Init ¶ added in v1.3.0
func (m *RemoveDialog) Init() tea.Cmd
func (*RemoveDialog) View ¶ added in v1.3.0
func (m *RemoveDialog) View() tea.View
type Unit ¶
type Unit struct {
Name string // full unit name, e.g. "pcloud-sync-Music.service"
ActiveState string // "active", "inactive", "failed", …
EnabledState string // "enabled", "disabled", "static", …
Mode string // sync direction: "down", "up", or "two-way"
CloudPath string // remote pCloud directory
LocalPath string // absolute local directory
Interval string // polling interval, e.g. "1m0s"
LocalSize int64 // local directory size in bytes
}
Unit represents a single pcloud-sync systemd user service.