interfaces

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli interface {
	Init(opt Options)
	SetConfig(cfg interface{})
	GenerateConfig(cfg interface{}, output string)
	SetDefaultAction(callback func(ctx interface{}) (err error))
	SetCommand(subcommand []*Command)
	Run() (err error)
	RunWithBlock(gcpercent int, loop time.Duration) (err error)
}

type Command

type Command struct {
	EnvConfigName   string
	Config          interface{}
	Name            string
	Description     string
	Action          func(ctx interface{}) (err error)
	SubCommand      []*Command
	HideHelp        bool
	HideHelpCommand bool
}

type Options

type Options struct {
	Name        string
	Description string
	Version     string
	Logger      logger.Logger
}

Jump to

Keyboard shortcuts

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