application

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type After added in v1.6.8

type After interface {
	After(ctx context.Context) error
}

type Argument

type Argument interface {
	Parameter

	// Target 绑定值
	Target() any
}

Argument 参数

type Before added in v1.6.8

type Before interface {
	Before(ctx context.Context) error
}

type Command

type Command interface {
	Parameter

	// Run 执行命令
	Run(ctx context.Context) error
}

Command 描述一个可以被执行的命令

type Flag

type Flag interface {
	fmt.Stringer

	// Apply 解析参数
	Apply(set *flag.FlagSet) error

	// Names 别名列表
	Names() []string

	// IsSet 是否可设置
	IsSet() bool
}

Flag 描述一个可以被解析的参数或者选项

type Initializer added in v1.6.8

type Initializer interface {
	Initialize(context.Context) error
}

type Parameter

type Parameter interface {
	// Name 名称
	Name() string
}

type Stopper

type Stopper interface {
	Stop(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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