File tree Expand file tree Collapse file tree
internal/app/onboarding/msgs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/domain"
4+
5+ // AccountSelected is emitted when user selects an account.
6+ type AccountSelected struct {
7+ Org domain.Organization
8+ Account domain.Account
9+ }
10+
11+ // NoAccounts is emitted when no accounts exist for the org.
12+ type NoAccounts struct {
13+ Org domain.Organization
14+ }
15+
16+ // AccountCreated is emitted when a new account is created.
17+ type AccountCreated struct {
18+ Org domain.Organization
19+ Account domain.Account
20+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/auth"
4+
5+ // Authenticated is emitted when authentication succeeds.
6+ type Authenticated struct {
7+ User auth.User
8+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import (
4+ "github.com/usetero/cli/internal/auth"
5+ "github.com/usetero/cli/internal/domain"
6+ )
7+
8+ // OnboardingComplete is emitted to the root model when onboarding finishes.
9+ type OnboardingComplete struct {
10+ User * auth.User
11+ Org domain.Organization
12+ Account domain.Account
13+ Workspace domain.Workspace
14+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/domain"
4+
5+ // DatadogReady is emitted when datadog is already configured.
6+ type DatadogReady struct {}
7+
8+ // DatadogNeeded is emitted when datadog setup is required.
9+ type DatadogNeeded struct {}
10+
11+ // DatadogRegionSelected is emitted when user selects a datadog region.
12+ type DatadogRegionSelected struct {
13+ Site domain.DatadogSite
14+ }
15+
16+ // DatadogAPIKeyEntered is emitted when user enters API key.
17+ type DatadogAPIKeyEntered struct {
18+ APIKey string
19+ }
20+
21+ // DatadogAccountCreated is emitted when datadog account is created.
22+ type DatadogAccountCreated struct {
23+ DatadogAccountID domain.DatadogAccountID
24+ }
25+
26+ // DatadogDiscoveryComplete is emitted when discovery finishes.
27+ type DatadogDiscoveryComplete struct {}
Original file line number Diff line number Diff line change 1+ // Package msgs defines onboarding message contracts between steps and orchestrator.
2+ package msgs
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/domain"
4+
5+ // OrgSelected is emitted when user selects an organization.
6+ type OrgSelected struct {
7+ Org domain.Organization
8+ }
9+
10+ // NoOrgs is emitted when no organizations exist.
11+ type NoOrgs struct {}
12+
13+ // OrgCreated is emitted when a new organization is created.
14+ type OrgCreated struct {
15+ Org domain.Organization
16+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/domain"
4+
5+ // PreflightOutcome indicates confidence in preflight-derived routing.
6+ type PreflightOutcome string
7+
8+ const (
9+ PreflightOutcomeResolved PreflightOutcome = "resolved"
10+ PreflightOutcomeInconclusive PreflightOutcome = "inconclusive"
11+ PreflightOutcomeFailed PreflightOutcome = "failed"
12+ )
13+
14+ // PreflightState captures startup readiness signals used to choose the first gate.
15+ type PreflightState struct {
16+ Outcome PreflightOutcome
17+ HasValidAuth bool
18+ Role string
19+ ActiveOrgID domain.OrganizationID
20+ DefaultAccountID domain.AccountID
21+ DefaultWorkspaceID domain.WorkspaceID
22+ Org * domain.Organization
23+ Account * domain.Account
24+ Workspace * domain.Workspace
25+ HasDatadog bool
26+ Error string
27+ }
28+
29+ // PreflightResolved is emitted after startup preflight completes.
30+ type PreflightResolved struct {
31+ State PreflightState
32+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ // Role constants.
4+ const (
5+ RolePlatform = "platform"
6+ RoleEngineer = "engineer"
7+ )
8+
9+ // RoleSelected is emitted when user selects their role.
10+ type RoleSelected struct {
11+ Role string
12+ }
Original file line number Diff line number Diff line change 1+ package msgs
2+
3+ import "github.com/usetero/cli/internal/domain"
4+
5+ // EnsureRuntime requests runtime initialization for the selected account.
6+ type EnsureRuntime struct {
7+ Org domain.Organization
8+ Account domain.Account
9+ }
10+
11+ // RuntimeReady is emitted when account runtime is initialized.
12+ type RuntimeReady struct {
13+ Org domain.Organization
14+ Account domain.Account
15+ }
You can’t perform that action at this time.
0 commit comments