hello

package
v0.6.160 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDevEnvName = "first-workspace-react"

Variables

This section is empty.

Functions

func CanWeOnboard

func CanWeOnboard(t *terminal.Terminal, user *entity.User, store HelloStore) error

func CompletedOnboarding

func CompletedOnboarding(user *entity.User, store HelloStore) error

func CompletedOnboardingIntro

func CompletedOnboardingIntro(user *entity.User, store HelloStore) error

func CompletedOnboardingLs

func CompletedOnboardingLs(user *entity.User, store HelloStore) error

func CompletedOnboardingOpen

func CompletedOnboardingOpen(user *entity.User, store HelloStore) error

func CompletedOnboardingShell

func CompletedOnboardingShell(user *entity.User, store HelloStore) error

func GetDevEnvOrStall

func GetDevEnvOrStall(t *terminal.Terminal, workspaces []entity.Workspace) *entity.Workspace

Return nil to exit the onboarding

func GetFirstName

func GetFirstName(name string) string

func GetOnboardingFilePath

func GetOnboardingFilePath() (string, error)

func GetTextBasedONStatus

func GetTextBasedONStatus(status string, t *terminal.Terminal) string

func MarkOnboardingStepCompleted

func MarkOnboardingStepCompleted(_ *terminal.Terminal, user *entity.User, store HelloStore)

func NewCmdHello

func NewCmdHello(t *terminal.Terminal, store HelloStore) *cobra.Command

func Poll

func Poll()

func RunOnboarding

func RunOnboarding(t *terminal.Terminal, user *entity.User, store HelloStore) error

func SetHasRunOpen

func SetHasRunOpen(hasRunOpen bool) error

func SetHasRunShell

func SetHasRunShell(hasRunShell bool) error

func SetOnboardingObject

func SetOnboardingObject(oo OnboardingObject) error

func SetOnboardingStep

func SetOnboardingStep(step int) error

func SetupDefaultOnboardingFile

func SetupDefaultOnboardingFile() error

func ShouldWeRunOnboarding

func ShouldWeRunOnboarding(s HelloStore) bool

func SkippedOnboarding

func SkippedOnboarding(user *entity.User, store HelloStore) error

func Step1

func Step1(t *terminal.Terminal, workspaces []entity.Workspace, user *entity.User, store HelloStore) error

Step 1:

The user just ran brev ls

func TypeItToMe

func TypeItToMe(s string)

func TypeItToMeUnskippable

func TypeItToMeUnskippable(s string)

Types

type HelloStore

type HelloStore interface {
	GetAllWorkspaces(options *store.GetWorkspacesOptions) ([]entity.Workspace, error)
	GetCurrentUser() (*entity.User, error)
	UpdateUser(userID string, updatedUser *entity.UpdateUser) (*entity.User, error)
	GetCurrentWorkspaceID() (string, error)
}

type OnboardingObject

type OnboardingObject struct {
	Step            int  `json:"step"`
	HasRunBrevShell bool `json:"hasRunBrevShell"`
	HasRunBrevOpen  bool `json:"hasRunBrevOpen"`
}

func GetOnboardingObject

func GetOnboardingObject() (*OnboardingObject, error)

Jump to

Keyboard shortcuts

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