Documentation
¶
Index ¶
- Constants
- Variables
- func DisallowedPathsValidator(disallowedPaths []string) validation.StringValidator
- func PortInFlightValidators() []validation.StringValidator
- func PortValidators() []validation.StringValidator
- func WebsiteNameInFlightValidators() []validation.StringValidator
- func WebsiteNameValidators(existingNames []string) []validation.StringValidator
- func WebsiteURLPathInFlightValidators(disallowedPaths []string) []validation.StringValidator
- func WebsiteURLPathValidators(disallowedPaths []string) []validation.StringValidator
- type Args
- type CommandTemplate
- type CommandVars
- type Model
- type Tool
- func (f Tool) GetBuildCommand(packageManager string, path string) string
- func (f Tool) GetCreateCommand(packageManager string, path string) string
- func (f Tool) GetDevCommand(packageManager string, port string) string
- func (f Tool) GetDevURL(port string) string
- func (f Tool) GetItemDescription() string
- func (f Tool) GetItemValue() string
Constants ¶
View Source
const ( StepName step = iota StepPath StepTool StepPackageManager StepPort StepRunningToolCommand StepDone )
Variables ¶
View Source
var ( // WebsiteNameRegex matches valid characters for a website name WebsiteNameRegex = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`) // WebsiteNameStartRegex ensures the name starts with a letter or number WebsiteNameStartRegex = regexp.MustCompile(`^[a-zA-Z0-9]`) // WebsiteNameEndRegex ensures the name doesn't end with a hyphen WebsiteNameEndRegex = regexp.MustCompile(`[a-zA-Z0-9]$`) )
Functions ¶
func DisallowedPathsValidator ¶
func DisallowedPathsValidator(disallowedPaths []string) validation.StringValidator
func PortInFlightValidators ¶
func PortInFlightValidators() []validation.StringValidator
PortInFlightValidators returns a list of in-flight validators for the port field
func PortValidators ¶
func PortValidators() []validation.StringValidator
PortValidators returns a list of validators for the port field
func WebsiteNameInFlightValidators ¶
func WebsiteNameInFlightValidators() []validation.StringValidator
func WebsiteNameValidators ¶
func WebsiteNameValidators(existingNames []string) []validation.StringValidator
func WebsiteURLPathInFlightValidators ¶
func WebsiteURLPathInFlightValidators(disallowedPaths []string) []validation.StringValidator
func WebsiteURLPathValidators ¶
func WebsiteURLPathValidators(disallowedPaths []string) []validation.StringValidator
Types ¶
type CommandTemplate ¶
type CommandTemplate string
func (CommandTemplate) Format ¶
func (t CommandTemplate) Format(vars CommandVars) string
type CommandVars ¶
type Tool ¶
type Tool struct {
Name string
Value string
Description string
OutputDir string
InstallLink string
SkipPackageManagerPrompt bool
// contains filtered or unexported fields
}
func (Tool) GetBuildCommand ¶
func (Tool) GetCreateCommand ¶
func (Tool) GetItemDescription ¶
func (Tool) GetItemValue ¶
Click to show internal directories.
Click to hide internal directories.