cli

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const APP object.Type = "cli.app"
View Source
const COMMAND object.Type = "cli.command"
View Source
const CTX object.Type = "cli.ctx"
View Source
const FLAG object.Type = "cli.flag"

Variables

This section is empty.

Functions

func AppFunc

func AppFunc(ctx context.Context, args ...object.Object) object.Object

func CommandFunc

func CommandFunc(ctx context.Context, args ...object.Object) object.Object

func FlagFunc

func FlagFunc(ctx context.Context, args ...object.Object) object.Object

func Module

func Module() *object.Module

Types

type App

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

func NewApp

func NewApp(opts *object.Map) (*App, error)

func (*App) Cost

func (app *App) Cost() int

func (*App) Equals

func (app *App) Equals(other object.Object) object.Object

func (*App) GetAttr

func (app *App) GetAttr(name string) (object.Object, bool)

func (*App) Inspect

func (app *App) Inspect() string

func (*App) Interface

func (app *App) Interface() interface{}

func (*App) IsTruthy

func (app *App) IsTruthy() bool

func (*App) MarshalJSON

func (app *App) MarshalJSON() ([]byte, error)

func (*App) RunOperation

func (app *App) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*App) SetAttr

func (app *App) SetAttr(name string, value object.Object) error

func (*App) Type

func (app *App) Type() object.Type

type Command

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

func NewCommand

func NewCommand(c *ucli.Command) *Command

func (*Command) Cost

func (c *Command) Cost() int

func (*Command) Equals

func (c *Command) Equals(other object.Object) object.Object

func (*Command) GetAttr

func (c *Command) GetAttr(name string) (object.Object, bool)

func (*Command) Inspect

func (c *Command) Inspect() string

func (*Command) Interface

func (c *Command) Interface() interface{}

func (*Command) IsTruthy

func (c *Command) IsTruthy() bool

func (*Command) MarshalJSON

func (c *Command) MarshalJSON() ([]byte, error)

func (*Command) RunOperation

func (c *Command) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Command) SetAttr

func (c *Command) SetAttr(name string, value object.Object) error

func (*Command) Type

func (c *Command) Type() object.Type

type Ctx

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

func NewCtx

func NewCtx(c *ucli.Context) *Ctx

func (*Ctx) Cost

func (c *Ctx) Cost() int

func (*Ctx) Equals

func (c *Ctx) Equals(other object.Object) object.Object

func (*Ctx) GetAttr

func (c *Ctx) GetAttr(name string) (object.Object, bool)

func (*Ctx) Inspect

func (c *Ctx) Inspect() string

func (*Ctx) Interface

func (c *Ctx) Interface() interface{}

func (*Ctx) IsTruthy

func (c *Ctx) IsTruthy() bool

func (*Ctx) MarshalJSON

func (c *Ctx) MarshalJSON() ([]byte, error)

func (*Ctx) RunOperation

func (c *Ctx) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Ctx) SetAttr

func (c *Ctx) SetAttr(name string, value object.Object) error

func (*Ctx) Type

func (c *Ctx) Type() object.Type

type Flag

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

func NewFlag

func NewFlag(f ucli.Flag) *Flag

func (*Flag) Cost

func (f *Flag) Cost() int

func (*Flag) Equals

func (f *Flag) Equals(other object.Object) object.Object

func (*Flag) GetAttr

func (f *Flag) GetAttr(name string) (object.Object, bool)

func (*Flag) Inspect

func (f *Flag) Inspect() string

func (*Flag) Interface

func (f *Flag) Interface() interface{}

func (*Flag) IsTruthy

func (f *Flag) IsTruthy() bool

func (*Flag) MarshalJSON

func (f *Flag) MarshalJSON() ([]byte, error)

func (*Flag) RunOperation

func (f *Flag) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Flag) SetAttr

func (f *Flag) SetAttr(name string, value object.Object) error

func (*Flag) Type

func (f *Flag) Type() object.Type

Jump to

Keyboard shortcuts

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