app

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolEnvFlag

func BoolEnvFlag(name string, usage string, envName ...string) cli.Flag

func BoolFlag

func BoolFlag(name string, usage string) cli.Flag

func DurationEnvFlag

func DurationEnvFlag(name string, defaultVal time.Duration, usage string, envName ...string) cli.Flag

func DurationFlag

func DurationFlag(name string, defaultVal time.Duration, usage string) cli.Flag

func Float64EnvFlag

func Float64EnvFlag(name string, defaultVal float64, usage string, envName ...string) cli.Flag

func Float64Flag

func Float64Flag(name string, defaultVal float64, usage string) cli.Flag

func IntEnvFlag

func IntEnvFlag(name string, defaultVal int, usage string, envName ...string) cli.Flag

func IntFlag

func IntFlag(name string, defaultVal int, usage string) cli.Flag

func IntSliceEnvFlag

func IntSliceEnvFlag(name string, defaultVal []int, usage string, envName ...string) cli.Flag

func IntSliceFlag

func IntSliceFlag(name string, defaultVal []int, usage string) cli.Flag

func MustRun

func MustRun(app *App)

func MustStart

func MustStart(version string, asyncRunnerCount int, init func(app *App) error)

func StringEnvFlag

func StringEnvFlag(name string, defaultVal string, usage string, envName ...string) cli.Flag

func StringFlag

func StringFlag(name string, defaultVal string, usage string) cli.Flag

func StringSliceEnvFlag

func StringSliceEnvFlag(name string, defaultVal []string, usage string, envName ...string) cli.Flag

func StringSliceFlag

func StringSliceFlag(name string, defaultVal []string, usage string) cli.Flag

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func Create

func Create(version string, asyncRunnerCount int) *App

func CreateAndInit

func CreateAndInit(version string, asyncRunnerCount int, init func(app *App) error) *App

func Default added in v1.1.1

func Default(version string) *App

func (*App) AddBoolFlag

func (app *App) AddBoolFlag(name string, usage string) *App

func (*App) AddDurationFlag

func (app *App) AddDurationFlag(name string, defaultVal time.Duration, usage string) *App

func (*App) AddFlags

func (app *App) AddFlags(flags ...cli.Flag) *App

AddFlags add flags to cli

func (*App) AddFloat64Flag

func (app *App) AddFloat64Flag(name string, defaultVal float64, usage string) *App

func (*App) AddIntFlag

func (app *App) AddIntFlag(name string, defaultVal int, usage string) *App

func (*App) AddIntSliceFlag

func (app *App) AddIntSliceFlag(name string, defaultVal []int, usage string) *App

func (*App) AddStringFlag

func (app *App) AddStringFlag(name string, defaultVal string, usage string) *App

func (*App) AddStringSliceFlag

func (app *App) AddStringSliceFlag(name string, defaultVal []string, usage string) *App

func (*App) Async

func (app *App) Async(asyncJobs ...interface{}) *App

func (*App) BeforeServerStop

func (app *App) BeforeServerStop(f func(cc infra.Resolver) error) *App

func (*App) Binder added in v1.1.1

func (app *App) Binder() infra.Binder

func (*App) Cli

func (app *App) Cli() *cli.App

func (*App) Container

func (app *App) Container() infra.Container

func (*App) Glacier

func (app *App) Glacier() infra.Glacier

Glacier glacierImpl return glacierImpl instance

func (*App) Graceful

func (app *App) Graceful(builder func() infra.Graceful) *App

func (*App) Init

func (app *App) Init(f func(c infra.FlagContext) error) *App

func (*App) MustResolve

func (app *App) MustResolve(resolver interface{})

func (*App) OnServerReady

func (app *App) OnServerReady(ffs ...interface{})

func (*App) PreBind

func (app *App) PreBind(fn func(binder infra.Binder)) *App

func (*App) Prototype

func (app *App) Prototype(ins ...interface{}) *App

func (*App) Provider

func (app *App) Provider(providers ...infra.Provider) *App

func (*App) Resolve added in v1.1.2

func (app *App) Resolve(resolver interface{}) error

func (*App) Resolver added in v1.1.1

func (app *App) Resolver() infra.Resolver

func (*App) Run

func (app *App) Run(args []string) error

Run start glacierImpl server

func (*App) Service

func (app *App) Service(services ...infra.Service) *App

func (*App) Singleton

func (app *App) Singleton(ins ...interface{}) *App

func (*App) Start

func (app *App) Start(cliCtx infra.FlagContext) error

func (*App) WithAuthor

func (app *App) WithAuthor(name, email string) *App

func (*App) WithAuthors

func (app *App) WithAuthors(authors ...*cli.Author) *App

func (*App) WithCLIOptions

func (app *App) WithCLIOptions(fn func(cliAPP *cli.App)) *App

func (*App) WithDescription

func (app *App) WithDescription(desc string) *App

func (*App) WithLogger

func (app *App) WithLogger(logger infra.Logger) *App

func (*App) WithName

func (app *App) WithName(name string) *App

func (*App) WithShutdownTimeoutFlag added in v1.1.1

func (app *App) WithShutdownTimeoutFlag(timeout time.Duration) *App

func (*App) WithUsage

func (app *App) WithUsage(usage string) *App

func (*App) WithUsageText

func (app *App) WithUsageText(usageText string) *App

func (*App) WithYAMLFlag

func (app *App) WithYAMLFlag(flagName string) *App

Jump to

Keyboard shortcuts

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