Documentation
¶
Index ¶
- Variables
- func NewCmdAddFlag(p *props.Props) *cobra.Command
- func NewCmdCommand(p *props.Props) *cobra.Command
- func NewCmdDocs(p *props.Props) *cobra.Command
- func NewCmdGenerate(p *props.Props) *cobra.Command
- func NewCmdProtect(p *props.Props) *cobra.Command
- func NewCmdSkeleton(p *props.Props) *cobra.Command
- func NewCmdUnprotect(p *props.Props) *cobra.Command
- type AddFlagOptions
- type CommandOptions
- type DocsOptions
- type FlagFormInput
- type SkeletonOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCommandNameRequired = errors.New("command name is required") ErrFlagNameRequired = errors.New("flag name is required") ErrNameRequired = errors.New("name is required") ErrRepositoryRequired = errors.New("repository is required") ErrRepositoryInvalidFormat = errors.New("repository must contain at least one '/' (e.g. org/repo)") ErrHostRequired = errors.New("host is required") ErrEmptyCommandPath = errors.New("empty command path") ErrCommandNotFound = errors.New("command not found in manifest") ErrUpdateManifestFailed = errors.New("failed to update manifest") ErrNonInteractive = errors.New("non-interactive mode detected, missing required flags") ErrInvalidOverwriteValue = errors.New("invalid --overwrite value: must be allow, deny, or ask") )
Functions ¶
Types ¶
type AddFlagOptions ¶
type AddFlagOptions struct {
CommandName string
FlagName string
FlagType string
Description string
Persistent bool
Path string
}
func (*AddFlagOptions) ValidateOrPrompt ¶
func (o *AddFlagOptions) ValidateOrPrompt(p *props.Props) error
type CommandOptions ¶
type CommandOptions struct {
Name string
Short string
Long string
Path string
WithAssets bool
Parent string
Args string
Flags []string
AliasesInput string // For form input
Aliases []string
ScriptPath string
Prompt string
Agentless bool
PersistentPreRun bool
PreRun bool
Force bool
WithInitializer bool
Protected *bool
Options []string // For MultiSelect
AddFlags bool // Whether to show the flag entry stage
AddPrompt bool // Whether to show the AI prompt stage
}
func (*CommandOptions) ValidateOrPrompt ¶
func (o *CommandOptions) ValidateOrPrompt() error
type DocsOptions ¶
type FlagFormInput ¶ added in v1.0.6
type FlagFormInput struct {
Name string
Type string
Description string
Persistent bool
Shorthand string
Required bool
Default string
DefaultIsCode bool
AddAnother bool
}
FlagFormInput holds data for a single flag collected via the interactive form.
type SkeletonOptions ¶
type SkeletonOptions struct {
Name string
GitBackend string
Repo string
Host string
Private bool
Description string
Path string
GoVersion string
Features []string
HelpType string
Overwrite string
SlackChannel string
SlackTeam string
TeamsChannel string
TeamsTeam string
}
func (*SkeletonOptions) ValidateOrPrompt ¶
func (o *SkeletonOptions) ValidateOrPrompt(p *props.Props) error
Click to show internal directories.
Click to hide internal directories.