app

package
v0.0.0-...-eae9aad Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatListSuccess

func FormatListSuccess(apps []types.App) (secondaryText []string)

FormatListSuccess formats details about the list of project apps

func FormatRequestSuccess

func FormatRequestSuccess(appID string, teamNames map[string]string, requests []api.AppsApprovalsRequest) (secondaryText []string)

FormatRequestSuccess formats the install request of each team for an app. Teams found in teamNames are titled by name while others are titled by ID.

func LinkAppHeaderSection

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

LinkAppHeaderSection displays a section explaining how to find existing apps.

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) (err error)

LinkExistingApp resolves app details, validates the app, and saves it to the project. It produces no output — callers handle their own display.

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 NewRequestCommand

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

NewRequestCommand 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