param

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	*Config
	*Help
	*Banner
	*Code
	*Timeout

	// 合法性验证,包括
	// 启动器构造方法合法性验证
	// 构造方法合法性验证
	Verify bool
	// 应用描述
	Description string
	// 使用方式
	Usage string

	// 版权
	Copyright string
	// 作者
	Authors app.Authors
	// 元数据
	Metadata map[string]any
	Set      bool
}

func NewApplication

func NewApplication() *Application

func (*Application) Override

func (a *Application) Override(latest *Application)
type Banner struct {
	Data any
	Type banner.Type
	Set  bool
}

func (*Banner) Print

func (b *Banner) Print() (err error)

type Code

type Code struct {
	Success int
	Failed  int
	Panic   int
	Set     bool
}

type Config

type Config struct {
	config.Loader
	config.Watcher

	Paths      []string
	Extensions []string

	Default  bool
	Validate bool
	Nullable bool

	Tag               *Tag
	EnvironmentGetter getter.Environment
	Environments      app.Environments

	Set bool
}

type Dependency

type Dependency struct {
	Puts   []*Put
	Gets   []*Get
	Verify bool
}

func NewDependency added in v0.3.8

func NewDependency(verify bool) *Dependency

func (*Dependency) Clear added in v0.3.8

func (d *Dependency) Clear()

type Get added in v0.3.8

type Get struct {
	Getter runtime.Getter
}

func NewGet added in v0.3.8

func NewGet(getter runtime.Getter) *Get

type Help

type Help struct {
	// 帮助信息模板
	App string
	// 命令帮助信息模板
	Command string
	// 子命令帮助信息模板
	Subcommand string
	Set        bool
}

type Injection added in v0.4.9

type Injection struct {
	Name  string
	Group string
}

func NewInjection added in v0.4.9

func NewInjection() *Injection

type Put added in v0.3.8

type Put struct {
	Constructor runtime.Constructor
	Name        string
	Group       string
}

func NewPut added in v0.3.8

func NewPut(constructor runtime.Constructor) *Put

type Tag

type Tag struct {
	Default string
	Set     bool
}

func NewTag

func NewTag() *Tag

type Timeout added in v0.4.1

type Timeout struct {
	// 启动
	Boot time.Duration
	// 退出
	Quit time.Duration
	Set  bool
}

func NewTimeout added in v0.4.1

func NewTimeout() *Timeout

Jump to

Keyboard shortcuts

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