package ui import ( "time" "git.morlana.online/f.weber/vault-tui/internal/auth" "git.morlana.online/f.weber/vault-tui/internal/token" "git.morlana.online/f.weber/vault-tui/internal/vault" ) // Every Vault/auth call the TUI makes is issued as a tea.Cmd and reported // back as one of these typed messages — Update never blocks on I/O itself. type mountsMsg struct { mounts []vault.Mount err error } type listMsg struct { listing vault.Listing mount vault.Mount path string err error } type secretMsg struct { secret *vault.Secret mount vault.Mount path string err error } type versionsMsg struct { versions []vault.VersionMeta err error } type writeAckMsg struct { ack *vault.WriteAck err error } type deleteAckMsg struct { ack *vault.DeleteAck err error } type rollbackAckMsg struct { ack *vault.WriteAck err error } type undeleteAckMsg struct { ack *vault.DeleteAck err error } type profileSwitchMsg struct { profile string err error } type logoutDoneMsg struct{ err error } // clipboardClearMsg fires Settings.ClipboardClear after a copy, so a // secret value doesn't linger in the system clipboard indefinitely. type clipboardClearMsg struct{ seq int } type tokenInfoMsg struct { info *token.Info err error } // loginEventMsg/loginDoneMsg drive the OIDC/Okta progress pump: Login runs // in a goroutine and reports each auth.Event plus a final result, exactly // mirroring the channel-pump pattern used by internal/cli's drainEvents. type loginEventMsg auth.Event type loginDoneMsg struct { result *auth.Result err error storeWarn string // non-empty if login succeeded but token persistence failed } type errMsg struct{ err error } type statusMsg struct{ text string } // tickMsg drives the token-TTL countdown in the status bar. type tickMsg time.Time