prompt

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCD

func CreateCD(directories []string, environment string) error

func CreateInfra

func CreateInfra(directories []string, cloudProvider string, environment string) error

CreateInfra execute all the functionalities of infra setup.

func DeployStacks

func DeployStacks(stacks []string, environment string) error

DeployStacks will deploy the infrastructure.

func DisplayMultipleStackWarningMessage

func DisplayMultipleStackWarningMessage(service string) bool

DisplayMultipleStackWarningMessage prints message if the selected service is already exists.

func Exit

func Exit()

func GenerateDockerCompose

func GenerateDockerCompose() error

GenerateDockerCompose generates docker-compose file for all the existing stacks as a monorepo in the root directory.

func GitInit

func GitInit() error

func InstallDependenciesAndDeploy

func InstallDependenciesAndDeploy(configStacks []string, environment string) error

InstallDependenciesAndDeploy install dependencies of each file, then deploy.

func PrintGitHubSecretsInfo

func PrintGitHubSecretsInfo(backendExist, webExist bool)

func PromptAlertMessage

func PromptAlertMessage()

func PromptAllDatabases

func PromptAllDatabases() string

func PromptAlreadyExist

func PromptAlreadyExist(existingFile string) bool

func PromptBuildSST

func PromptBuildSST(pkgManager string) error

PromptBuildSST runs 'yarn build'

func PromptCICD

func PromptCICD()

func PromptCloudProvider

func PromptCloudProvider() string

PromptCloudProvider is a prompt for selecting a cloud provider.

func PromptConfirm

func PromptConfirm() bool

func PromptCreateDockerCompose

func PromptCreateDockerCompose()

PromptCreateDockerCompose is a prompt function for create docker-compose.

func PromptCreateInfraStacksWhenDeploy

func PromptCreateInfraStacksWhenDeploy(directories []string, environment string) error

PromptCreateInfraStacksWhenDeploy will setup the infra of stacks which are not already set up.

func PromptDeploy

func PromptDeploy()

PromptDeploy is the prompt for the deploy option of Home prompt.

func PromptDeployAfterInfra

func PromptDeployAfterInfra(configStacks []string, environment string) error

PromptDeployAfterInfra will come up after setting up the infrastructure.

func PromptDeployNow

func PromptDeployNow() (string, int)

func PromptDockerCompose

func PromptDockerCompose()

func PromptEnvironment

func PromptEnvironment() string

PromptEnvironment is a prompt for selecting an environment.

func PromptExit

func PromptExit()

func PromptGitInit

func PromptGitInit()

func PromptHome

func PromptHome()

func PromptRemoveDeploy

func PromptRemoveDeploy()

PromptRemoveDeploy is the prompt for the remove deploy option of Home prompt.

func PromptRunDockerCompose

func PromptRunDockerCompose()

PromptRunDockerCompose is a prompt function for run docker-compose.

func PromptSelectExistingStacks

func PromptSelectExistingStacks() []string

PromptSelectExistingStacks is a prompt function will ask for selecting available stacks.

func PromptSelectService

func PromptSelectService()

func PromptSetupInfra

func PromptSetupInfra()

PromptSetupInfra is the prompt for the setup infra option of Home prompt.

func RemoveDeploy

func RemoveDeploy(environment string) error

func ResetItems

func ResetItems(items []string, index *int) []string

ResetItems reset the values of items. index means last selected item's index.

func RunDockerCompose

func RunDockerCompose() error

RunDockerCompose runs 'docker-compose up' from the root directory.

func ShowPromptGitInit

func ShowPromptGitInit() bool

func ShowRemoveDeploy

func ShowRemoveDeploy() bool

func WriteDotGitignoreFile

func WriteDotGitignoreFile(file string) error

Types

type InitInfo

type InitInfo struct {
	Service  string
	Stack    string
	Database string
	DirName  string
}

func (*InitInfo) GetDetailsTemplatesOfStacks

func (i *InitInfo) GetDetailsTemplatesOfStacks() string

GetDetailsTemplatesOfStacks return the details template for the given service.

func (*InitInfo) Init

func (i *InitInfo) Init()

func (*InitInfo) PromptGetDirectoryName

func (i *InitInfo) PromptGetDirectoryName() string

func (*InitInfo) PromptSelectInit

func (i *InitInfo) PromptSelectInit()

func (*InitInfo) PromptSelectStack

func (i *InitInfo) PromptSelectStack()

func (*InitInfo) PromptSelectStackDatabase

func (i *InitInfo) PromptSelectStackDatabase()

func (*InitInfo) PromptStack

func (i *InitInfo) PromptStack() string

PromptStack is prompt for selecting stack. It will come up after user selecting the service.

func (*InitInfo) SelectDatabase

func (i *InitInfo) SelectDatabase()

func (InitInfo) StackInitialize

func (i InitInfo) StackInitialize() error

type Label

type Label struct {
	InvalidPrefix string
	ValidPrefix   string
	Question      string
	Suffix        string
}

type PromptInput

type PromptInput struct {
	Label  string
	Items  []string
	GoBack func()
}

func (PromptInput) PromptGetInput

func (p PromptInput) PromptGetInput() string

func (PromptInput) PromptMultiSelect

func (p PromptInput) PromptMultiSelect() ([]string, []int)

func (PromptInput) PromptPlatform

func (p PromptInput) PromptPlatform() string

func (PromptInput) PromptSelect

func (p PromptInput) PromptSelect() (string, int)

func (PromptInput) PromptYesOrNoConfirm

func (p PromptInput) PromptYesOrNoConfirm() bool

func (PromptInput) PromptYesOrNoSelect

func (p PromptInput) PromptYesOrNoSelect() bool

Jump to

Keyboard shortcuts

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