Documentation ¶
Index ¶
- func BoolEnvFlag(name string, usage string, envName string) cli.Flag
- func BoolFlag(name string, usage string) cli.Flag
- func DurationEnvFlag(name string, defaultVal time.Duration, usage string, envName string) cli.Flag
- func DurationFlag(name string, defaultVal time.Duration, usage string) cli.Flag
- func Float64EnvFlag(name string, defaultVal float64, usage string, envName string) cli.Flag
- func Float64Flag(name string, defaultVal float64, usage string) cli.Flag
- func IntEnvFlag(name string, defaultVal int, usage string, envName string) cli.Flag
- func IntFlag(name string, defaultVal int, usage string) cli.Flag
- func IntSliceEnvFlag(name string, defaultVal []int, usage string, envName string) cli.Flag
- func IntSliceFlag(name string, defaultVal []int, usage string) cli.Flag
- func MustRun(app *Application)
- func MustStart(version string, asyncRunnerCount int, init func(app *Application) error)
- func StringEnvFlag(name string, defaultVal string, usage string, envName string) cli.Flag
- func StringFlag(name string, defaultVal string, usage string) cli.Flag
- func StringSliceEnvFlag(name string, defaultVal []string, usage string, envName string) cli.Flag
- func StringSliceFlag(name string, defaultVal []string, usage string) cli.Flag
- type Application
- func (app *Application) AddBoolFlag(name string, usage string) *Application
- func (app *Application) AddDurationFlag(name string, defaultVal time.Duration, usage string) *Application
- func (app *Application) AddFlags(flags ...cli.Flag) *Application
- func (app *Application) AddFloat64Flag(name string, defaultVal float64, usage string) *Application
- func (app *Application) AddIntFlag(name string, defaultVal int, usage string) *Application
- func (app *Application) AddIntSliceFlag(name string, defaultVal []int, usage string) *Application
- func (app *Application) AddStringFlag(name string, defaultVal string, usage string) *Application
- func (app *Application) AddStringSliceFlag(name string, defaultVal []string, usage string) *Application
- func (app *Application) AfterInitialized(f func(resolver infra.Resolver) error) *Application
- func (app *Application) AfterProviderBooted(f interface{}) *Application
- func (app *Application) AfterServerStart(f func(cc infra.Resolver) error) *Application
- func (app *Application) Async(asyncJobs ...interface{}) *Application
- func (app *Application) BeforeInitialize(f func(c infra.FlagContext) error) *Application
- func (app *Application) BeforeServerStart(f func(cc container.Container) error) *Application
- func (app *Application) BeforeServerStop(f func(cc infra.Resolver) error) *Application
- func (app *Application) Cli() *cli.App
- func (app *Application) Container() container.Container
- func (app *Application) Glacier() infra.Glacier
- func (app *Application) Graceful(builder func() infra.Graceful) *Application
- func (app *Application) Main(cliCtx infra.FlagContext) error
- func (app *Application) MustResolve(resolver interface{})
- func (app *Application) PreBind(fn func(binder infra.Binder)) *Application
- func (app *Application) Prototype(ins ...interface{}) *Application
- func (app *Application) Provider(providers ...infra.Provider) *Application
- func (app *Application) ResolveWithError(resolver interface{}) error
- func (app *Application) Run(args []string) error
- func (app *Application) Service(services ...infra.Service) *Application
- func (app *Application) Singleton(ins ...interface{}) *Application
- func (app *Application) WithAuthor(name, email string) *Application
- func (app *Application) WithAuthors(authors ...cli.Author) *Application
- func (app *Application) WithCLIOptions(fn func(cliAPP *cli.App)) *Application
- func (app *Application) WithDescription(desc string) *Application
- func (app *Application) WithLogger(logger infra.Logger) *Application
- func (app *Application) WithName(name string) *Application
- func (app *Application) WithShutdownTimeoutFlagSupport(timeout time.Duration) *Application
- func (app *Application) WithUsage(usage string) *Application
- func (app *Application) WithUsageText(usageText string) *Application
- func (app *Application) WithYAMLFlag(flagName string) *Application
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationEnvFlag ¶
func Float64EnvFlag ¶
func IntEnvFlag ¶
func IntSliceEnvFlag ¶
func MustRun ¶
func MustRun(app *Application)
func MustStart ¶
func MustStart(version string, asyncRunnerCount int, init func(app *Application) error)
func StringEnvFlag ¶
func StringSliceEnvFlag ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(version string, asyncRunnerCount int) *Application
func CreateAndInit ¶
func CreateAndInit(version string, asyncRunnerCount int, init func(app *Application) error) *Application
func (*Application) AddBoolFlag ¶
func (app *Application) AddBoolFlag(name string, usage string) *Application
func (*Application) AddDurationFlag ¶
func (app *Application) AddDurationFlag(name string, defaultVal time.Duration, usage string) *Application
func (*Application) AddFlags ¶
func (app *Application) AddFlags(flags ...cli.Flag) *Application
AddFlags add flags to cli
func (*Application) AddFloat64Flag ¶
func (app *Application) AddFloat64Flag(name string, defaultVal float64, usage string) *Application
func (*Application) AddIntFlag ¶
func (app *Application) AddIntFlag(name string, defaultVal int, usage string) *Application
func (*Application) AddIntSliceFlag ¶
func (app *Application) AddIntSliceFlag(name string, defaultVal []int, usage string) *Application
func (*Application) AddStringFlag ¶
func (app *Application) AddStringFlag(name string, defaultVal string, usage string) *Application
func (*Application) AddStringSliceFlag ¶
func (app *Application) AddStringSliceFlag(name string, defaultVal []string, usage string) *Application
func (*Application) AfterInitialized ¶
func (app *Application) AfterInitialized(f func(resolver infra.Resolver) error) *Application
func (*Application) AfterProviderBooted ¶
func (app *Application) AfterProviderBooted(f interface{}) *Application
func (*Application) AfterServerStart ¶
func (app *Application) AfterServerStart(f func(cc infra.Resolver) error) *Application
func (*Application) Async ¶
func (app *Application) Async(asyncJobs ...interface{}) *Application
func (*Application) BeforeInitialize ¶
func (app *Application) BeforeInitialize(f func(c infra.FlagContext) error) *Application
func (*Application) BeforeServerStart ¶
func (app *Application) BeforeServerStart(f func(cc container.Container) error) *Application
func (*Application) BeforeServerStop ¶
func (app *Application) BeforeServerStop(f func(cc infra.Resolver) error) *Application
func (*Application) Cli ¶
func (app *Application) Cli() *cli.App
func (*Application) Container ¶
func (app *Application) Container() container.Container
func (*Application) Glacier ¶
func (app *Application) Glacier() infra.Glacier
Glacier glacierImpl return glacierImpl instance
func (*Application) Graceful ¶
func (app *Application) Graceful(builder func() infra.Graceful) *Application
func (*Application) Main ¶
func (app *Application) Main(cliCtx infra.FlagContext) error
func (*Application) MustResolve ¶
func (app *Application) MustResolve(resolver interface{})
func (*Application) PreBind ¶
func (app *Application) PreBind(fn func(binder infra.Binder)) *Application
func (*Application) Prototype ¶
func (app *Application) Prototype(ins ...interface{}) *Application
func (*Application) Provider ¶
func (app *Application) Provider(providers ...infra.Provider) *Application
func (*Application) ResolveWithError ¶
func (app *Application) ResolveWithError(resolver interface{}) error
func (*Application) Run ¶
func (app *Application) Run(args []string) error
Run start glacierImpl server
func (*Application) Service ¶
func (app *Application) Service(services ...infra.Service) *Application
func (*Application) Singleton ¶
func (app *Application) Singleton(ins ...interface{}) *Application
func (*Application) WithAuthor ¶
func (app *Application) WithAuthor(name, email string) *Application
func (*Application) WithAuthors ¶
func (app *Application) WithAuthors(authors ...cli.Author) *Application
func (*Application) WithCLIOptions ¶
func (app *Application) WithCLIOptions(fn func(cliAPP *cli.App)) *Application
func (*Application) WithDescription ¶
func (app *Application) WithDescription(desc string) *Application
func (*Application) WithLogger ¶
func (app *Application) WithLogger(logger infra.Logger) *Application
func (*Application) WithName ¶
func (app *Application) WithName(name string) *Application
func (*Application) WithShutdownTimeoutFlagSupport ¶
func (app *Application) WithShutdownTimeoutFlagSupport(timeout time.Duration) *Application
func (*Application) WithUsage ¶
func (app *Application) WithUsage(usage string) *Application
func (*Application) WithUsageText ¶
func (app *Application) WithUsageText(usageText string) *Application
func (*Application) WithYAMLFlag ¶ added in v1.0.1
func (app *Application) WithYAMLFlag(flagName string) *Application
Click to show internal directories.
Click to hide internal directories.