Documentation
¶
Overview ¶
Package onboarding provides the onboarding flow for new users.
Index ¶
- type Model
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetOrgPreferences(prefs preferences.OrgPreferences)
- func (m *Model) SetSize(width, height int)
- func (m *Model) ShortHelp() []key.Binding
- func (m *Model) StartFromOrgSelect() tea.Cmd
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the onboarding orchestrator.
func New ¶
func New( ctx context.Context, theme styles.Theme, services api.APIServices, userPrefs preferences.UserPreferences, orgPrefs preferences.OrgPreferences, authService iauth.Auth, syncer powersync.Syncer, scope log.Scope, ) *Model
New creates a new onboarding model.
func (*Model) SetOrgPreferences ¶ added in v1.11.0
func (m *Model) SetOrgPreferences(prefs preferences.OrgPreferences)
SetOrgPreferences replaces the org preferences used by subsequent onboarding steps. Called by the app when switching to a different organization.
func (*Model) StartFromOrgSelect ¶
StartFromOrgSelect starts the onboarding flow at the organization selection step, skipping auth check and role selection. Used when switching orgs or accounts — the caller clears the relevant preferences so onboarding prompts for selection instead of auto-selecting.
type Step ¶
type Step interface {
// Init returns the initial command for the step.
Init() tea.Cmd
// Update handles a message and returns a command.
// Steps emit completion messages (from msgs package) when done.
Update(msg tea.Msg) tea.Cmd
// View renders the step.
View() string
// SetSize updates the step's dimensions.
SetSize(width, height int)
// ShortHelp returns the key bindings for the short help view.
ShortHelp() []key.Binding
}
Step represents a single step in the onboarding flow.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package accounts provides account selection and creation steps.
|
Package accounts provides account selection and creation steps. |
|
Package auth provides authentication steps for onboarding.
|
Package auth provides authentication steps for onboarding. |
|
Package datadog provides Datadog configuration steps.
|
Package datadog provides Datadog configuration steps. |
|
Package msgs defines the messages emitted by onboarding steps.
|
Package msgs defines the messages emitted by onboarding steps. |
|
Package organizations provides organization selection and creation steps.
|
Package organizations provides organization selection and creation steps. |
|
Package role provides the role selection step for onboarding.
|
Package role provides the role selection step for onboarding. |
|
Package sync provides the sync step for onboarding.
|
Package sync provides the sync step for onboarding. |
|
Package workspaces provides workspace selection steps.
|
Package workspaces provides workspace selection steps. |
Click to show internal directories.
Click to hide internal directories.