interfaces

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 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
}

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