app

package
v0.0.0-...-5ee9e10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const LinkAppConfirmPromptText = "Do you want to add an existing app?"

LinkAppConfirmPromptText is displayed when prompting to add an existing app

Variables

This section is empty.

Functions

func LinkAppFooterSection

func LinkAppFooterSection(ctx context.Context, clients *shared.ClientFactory, app *types.App)

LinkAppFooterSection displays the details of app that was added to the project.

func LinkAppHeaderSection

func LinkAppHeaderSection(ctx context.Context, clients *shared.ClientFactory, shouldConfirm bool)

LinkAppHeaderSection displays a section explaining how to find existing apps. External callers can use extraSecondaryText to show additional information. When shouldConfirm is true, additional information is included in the header explaining how to link apps, in case the user declines.

func LinkCommandRunE

func LinkCommandRunE(ctx context.Context, clients *shared.ClientFactory, app *types.App) (err error)

LinkCommandRunE saves details about the provided application

func LinkExistingApp

func LinkExistingApp(ctx context.Context, clients *shared.ClientFactory, app *types.App, shouldConfirm bool) (err error)

LinkExistingApp prompts for an existing App ID and saves the details to the project. When shouldConfirm is true, a confirmation prompt will ask the user if they want to link an existing app and additional information is included in the header. The shouldConfirm option is encouraged for third-party callers.

func NewAddCommand

func NewAddCommand(clients *shared.ClientFactory) *cobra.Command

NewAddCommand returns a new Cobra command

func NewCommand

func NewCommand(clients *shared.ClientFactory) *cobra.Command

NewCommand returns a new Cobra command for apps

func NewDeleteCommand

func NewDeleteCommand(clients *shared.ClientFactory) *cobra.Command

NewDeleteCommand returns a new Cobra command

func NewLinkCommand

func NewLinkCommand(clients *shared.ClientFactory) *cobra.Command

NewLinkCommand returns a new Cobra command for link

func NewListCommand

func NewListCommand(clients *shared.ClientFactory) *cobra.Command

NewListCommand returns a new Cobra command

func NewSettingsCommand

func NewSettingsCommand(clients *shared.ClientFactory) *cobra.Command

func NewUninstallCommand

func NewUninstallCommand(clients *shared.ClientFactory) *cobra.Command

NewUninstallCommand returns a new Cobra command

func NewUnlinkCommand

func NewUnlinkCommand(clients *shared.ClientFactory) *cobra.Command

NewUnlinkCommand returns a new Cobra command for unlinking apps

func RunAddCommand

func RunAddCommand(ctx context.Context, clients *shared.ClientFactory, selection *prompts.SelectedApp, orgGrantWorkspaceID string) (context.Context, types.InstallState, types.App, error)

RunAddCommand executes the workspace install command, prints output, and returns any errors.

func RunDeleteCommand

func RunDeleteCommand(ctx context.Context, clients *shared.ClientFactory, cmd *cobra.Command, args []string) (types.App, error)

RunDeleteCommand executes the workspace delete command, prints output, and returns any errors.

func RunUninstallCommand

func RunUninstallCommand(ctx context.Context, clients *shared.ClientFactory, cmd *cobra.Command, args []string) (types.App, error)

RunUninstallCommand executes the workspace uninstall command, prints output, and returns any errors.

func UnlinkCommandRunE

func UnlinkCommandRunE(ctx context.Context, clients *shared.ClientFactory, cmd *cobra.Command, args []string) (types.App, error)

UnlinkCommandRunE executes the unlink command, prints output, and returns any errors.

Types

type AppMock

type AppMock struct {
	mock.Mock
}

AppMock implementation mocks for the app package

func NewAppCommandMock

func NewAppCommandMock() *AppMock

NewAppCommandMock returns a mock of the Workspace prompts.

func (*AppMock) RunAddCommand

func (m *AppMock) RunAddCommand(ctx context.Context, clients *shared.ClientFactory, selectedApp *prompts.SelectedApp, orgGrant string) (context.Context, types.InstallState, types.App, error)

RunAddCommand mocks the app add (install) command

Jump to

Keyboard shortcuts

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