interfaces

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 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)
	Block(gcpercent int, loop time.Duration) (err error)
	ParsingContext(ctx interface{}) ParsingContext
}

type Command

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

type Options

type Options struct {
	Name                string
	Description         string
	Version             string
	Logger              logger.Logger
	ShowVersionFunction func()
}

type ParsingContext added in v0.0.6

type ParsingContext interface {
	ArgumentsFirst() (val string, err error)
}

type SecretEngine added in v0.0.8

type SecretEngine interface {
	Init() error
	Get(key string) string
}

Jump to

Keyboard shortcuts

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