Documentation ¶
Index ¶
- Constants
- func NewApplication(name, usage, usageText, version string, artisan ...bool) console.Artisan
- type Application
- type CliContext
- func (r *CliContext) Argument(index int) string
- func (r *CliContext) Arguments() []string
- func (r *CliContext) Ask(question string, option ...console.AskOption) (string, error)
- func (r *CliContext) Choice(question string, choices []console.Choice, option ...console.ChoiceOption) (string, error)
- func (r *CliContext) Comment(message string)
- func (r *CliContext) Confirm(question string, option ...console.ConfirmOption) (bool, error)
- func (r *CliContext) CreateProgressBar(total int) console.Progress
- func (r *CliContext) Error(message string)
- func (r *CliContext) Info(message string)
- func (r *CliContext) Line(message string)
- func (r *CliContext) MultiSelect(question string, choices []console.Choice, option ...console.MultiSelectOption) ([]string, error)
- func (r *CliContext) NewLine(times ...int)
- func (r *CliContext) Option(key string) string
- func (r *CliContext) OptionBool(key string) bool
- func (r *CliContext) OptionFloat64(key string) float64
- func (r *CliContext) OptionFloat64Slice(key string) []float64
- func (r *CliContext) OptionInt(key string) int
- func (r *CliContext) OptionInt64(key string) int64
- func (r *CliContext) OptionInt64Slice(key string) []int64
- func (r *CliContext) OptionIntSlice(key string) []int
- func (r *CliContext) OptionSlice(key string) []string
- func (r *CliContext) Secret(question string, option ...console.SecretOption) (string, error)
- func (r *CliContext) Spinner(message string, option console.SpinnerOption) error
- func (r *CliContext) Warning(message string)
- func (r *CliContext) WithProgressBar(items []any, callback func(any) error) ([]any, error)
- type ProgressBar
- type ServiceProvider
Constants ¶
View Source
const Binding = "goravel.console"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) Call ¶ added in v0.1.0
func (c *Application) Call(command string)
Call Run an Artisan console command by name.
func (*Application) CallAndExit ¶ added in v0.4.1
func (c *Application) CallAndExit(command string)
CallAndExit Run an Artisan console command by name and exit.
func (*Application) Register ¶
func (c *Application) Register(commands []console.Command)
func (*Application) Run ¶ added in v0.1.2
func (c *Application) Run(args []string, exitIfArtisan bool)
Run a command. Args come from os.Args.
type CliContext ¶ added in v1.0.0
type CliContext struct {
// contains filtered or unexported fields
}
func NewCliContext ¶ added in v1.14.0
func NewCliContext(instance *cli.Context) *CliContext
func (*CliContext) Argument ¶ added in v1.0.0
func (r *CliContext) Argument(index int) string
func (*CliContext) Arguments ¶ added in v1.0.0
func (r *CliContext) Arguments() []string
func (*CliContext) Choice ¶ added in v1.14.0
func (r *CliContext) Choice(question string, choices []console.Choice, option ...console.ChoiceOption) (string, error)
func (*CliContext) Comment ¶ added in v1.14.0
func (r *CliContext) Comment(message string)
func (*CliContext) Confirm ¶ added in v1.14.0
func (r *CliContext) Confirm(question string, option ...console.ConfirmOption) (bool, error)
func (*CliContext) CreateProgressBar ¶ added in v1.14.0
func (r *CliContext) CreateProgressBar(total int) console.Progress
func (*CliContext) Error ¶ added in v1.14.0
func (r *CliContext) Error(message string)
func (*CliContext) Info ¶ added in v1.14.0
func (r *CliContext) Info(message string)
func (*CliContext) Line ¶ added in v1.14.0
func (r *CliContext) Line(message string)
func (*CliContext) MultiSelect ¶ added in v1.14.0
func (r *CliContext) MultiSelect(question string, choices []console.Choice, option ...console.MultiSelectOption) ([]string, error)
func (*CliContext) NewLine ¶ added in v1.14.0
func (r *CliContext) NewLine(times ...int)
func (*CliContext) Option ¶ added in v1.0.0
func (r *CliContext) Option(key string) string
func (*CliContext) OptionBool ¶ added in v1.12.0
func (r *CliContext) OptionBool(key string) bool
func (*CliContext) OptionFloat64 ¶ added in v1.12.0
func (r *CliContext) OptionFloat64(key string) float64
func (*CliContext) OptionFloat64Slice ¶ added in v1.12.0
func (r *CliContext) OptionFloat64Slice(key string) []float64
func (*CliContext) OptionInt ¶ added in v1.12.0
func (r *CliContext) OptionInt(key string) int
func (*CliContext) OptionInt64 ¶ added in v1.12.0
func (r *CliContext) OptionInt64(key string) int64
func (*CliContext) OptionInt64Slice ¶ added in v1.12.0
func (r *CliContext) OptionInt64Slice(key string) []int64
func (*CliContext) OptionIntSlice ¶ added in v1.12.0
func (r *CliContext) OptionIntSlice(key string) []int
func (*CliContext) OptionSlice ¶ added in v1.12.0
func (r *CliContext) OptionSlice(key string) []string
func (*CliContext) Secret ¶ added in v1.14.0
func (r *CliContext) Secret(question string, option ...console.SecretOption) (string, error)
func (*CliContext) Spinner ¶ added in v1.14.0
func (r *CliContext) Spinner(message string, option console.SpinnerOption) error
func (*CliContext) Warning ¶ added in v1.14.0
func (r *CliContext) Warning(message string)
func (*CliContext) WithProgressBar ¶ added in v1.14.0
type ProgressBar ¶ added in v1.14.0
type ProgressBar struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶ added in v1.14.0
func NewProgressBar(total int) *ProgressBar
func (*ProgressBar) Advance ¶ added in v1.14.0
func (r *ProgressBar) Advance(step ...int)
func (*ProgressBar) Finish ¶ added in v1.14.0
func (r *ProgressBar) Finish() error
func (*ProgressBar) SetTitle ¶ added in v1.14.0
func (r *ProgressBar) SetTitle(message string)
func (*ProgressBar) ShowElapsedTime ¶ added in v1.14.0
func (r *ProgressBar) ShowElapsedTime(b ...bool) console.Progress
func (*ProgressBar) ShowTitle ¶ added in v1.14.0
func (r *ProgressBar) ShowTitle(b ...bool) console.Progress
func (*ProgressBar) Start ¶ added in v1.14.0
func (r *ProgressBar) Start() error
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (receiver *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (receiver *ServiceProvider) Register(app foundation.Application)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.