kingpinCli

package
v0.0.0-...-8035709 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func New

func New(app *kingpin.Application, name string) *Application

func (*Application) Arg

func (a *Application) Arg(p1, p2 string) clier.ArgClauser

func (*Application) Command

func (a *Application) Command(p1, p2 string) clier.CmdClauser

func (*Application) Flag

func (a *Application) Flag(p1, p2 string) clier.FlagClauser

func (*Application) IsNil

func (a *Application) IsNil() bool

func (*Application) Name

func (a *Application) Name() string

func (*Application) Parse

func (a *Application) Parse(args []string) (cmd string, err error)

func (*Application) ParseContext

func (a *Application) ParseContext(args []string) (p clier.ParseContexter, err error)

type ArgClause

type ArgClause struct {
	// contains filtered or unexported fields
}

func NewArg

func NewArg(arg *kingpin.ArgClause) (f *ArgClause)

NewArg creates a generic ArgClause from kingpin.ArgClause

func (*ArgClause) Bool

func (a *ArgClause) Bool() *bool

func (*ArgClause) Default

func (a *ArgClause) Default(p1 string) clier.ArgClauser

func (*ArgClause) Envar

func (a *ArgClause) Envar(p1 string) clier.ArgClauser

func (*ArgClause) GetArg

func (a *ArgClause) GetArg() *kingpin.ArgClause

func (*ArgClause) Required

func (a *ArgClause) Required() clier.ArgClauser

func (*ArgClause) SetValue

func (a *ArgClause) SetValue(p1 clier.Valuer) clier.ArgClauser

func (*ArgClause) String

func (a *ArgClause) String() *string

func (*ArgClause) Stringer

func (a *ArgClause) Stringer() string

type CmdClause

type CmdClause struct {
	// contains filtered or unexported fields
}

func (*CmdClause) Arg

func (c *CmdClause) Arg(p1, p2 string) clier.ArgClauser

func (*CmdClause) Command

func (c *CmdClause) Command(p1, p2 string) clier.CmdClauser

func (*CmdClause) Flag

func (c *CmdClause) Flag(p1, p2 string) clier.FlagClauser

func (*CmdClause) FullCommand

func (c *CmdClause) FullCommand() string

func (*CmdClause) GetCmd

func (c *CmdClause) GetCmd() *kingpin.CmdClause

func (*CmdClause) IsEqualTo

func (c *CmdClause) IsEqualTo(c_ref clier.CmdClauser) bool

type FlagClause

type FlagClause struct {
	// contains filtered or unexported fields
}

func NewFlag

func NewFlag(flag *kingpin.FlagClause) (f *FlagClause)

NewFlag creates a generic FlagClause from kingpin.FlagClause

func (*FlagClause) Bool

func (f *FlagClause) Bool() *bool

func (*FlagClause) Default

func (f *FlagClause) Default(p1 string) clier.FlagClauser

func (*FlagClause) Envar

func (f *FlagClause) Envar(p1 string) clier.FlagClauser

func (*FlagClause) GetFlag

func (f *FlagClause) GetFlag() *kingpin.FlagClause

func (*FlagClause) Hidden

func (f *FlagClause) Hidden() clier.FlagClauser

func (*FlagClause) Required

func (f *FlagClause) Required() clier.FlagClauser

func (*FlagClause) SetValue

func (f *FlagClause) SetValue(p1 clier.Valuer) clier.FlagClauser

func (*FlagClause) Short

func (f *FlagClause) Short(p1 rune) clier.FlagClauser

func (*FlagClause) String

func (f *FlagClause) String() *string

func (*FlagClause) Stringer

func (a *FlagClause) Stringer() string

type KArgClause

type KArgClause interface {
	GetArg() *kingpin.ArgClause
}

type KCmdClause

type KCmdClause interface {
	GetCmd() *kingpin.CmdClause
}

type KFlagClause

type KFlagClause interface {
	GetFlag() *kingpin.FlagClause
}

type ParseContext

type ParseContext struct {
	// contains filtered or unexported fields
}

func (*ParseContext) GetArgValue

func (p *ParseContext) GetArgValue(a clier.ArgClauser) (interface{}, bool)

GetArgValue get value from cli, or if missing, ENV or if missing, defaults

func (*ParseContext) GetFlagValue

func (p *ParseContext) GetFlagValue(f clier.FlagClauser) (interface{}, bool)

GetFlagValue get value from cli, or if missing, ENV or if missing, defaults

func (*ParseContext) GetParam

func (p *ParseContext) GetParam(param_name string) (ret interface{}, err string)

func (*ParseContext) IsInvalidContext

func (p *ParseContext) IsInvalidContext() bool

func (*ParseContext) SelectedCommands

func (p *ParseContext) SelectedCommands() (res []clier.CmdClauser)

type ParseContextTester

type ParseContextTester interface {
	GetContext() *ParseContext
}

type ParseContexter

type ParseContexter interface {
	GetContext() *ParseContext
}

Jump to

Keyboard shortcuts

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