clish

package
v0.0.0-...-a9387a1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Help       *flagly.CmdHelp `flagly:"handler"`
	Ping       *ShellPing      `flagly:"handler"`
	Route      *ShellRoute     `flagly:"handler"`
	Dig        *ShellDig       `flagly:"handler"`
	Controller *Controller     `flagly:"handler"`
	Debug      *ShellDebug     `flagly:"handler"`
	Dchan      *Dchan          `flagly:"handler"`
}

type Client

type Client interface {
	GetDataChannelStat() (string, error)
	ShowControllerStage() ([]controller.StageInfo, error)
	GetController() (*controller.Client, error)
	GetDchan() (*dchan.Client, error)
	GetRoute() (*route.Route, error)
	SaveRoute() error
	Relogin()
}

type Controller

type Controller struct {
	Stage *ControllerStage `flagly:"handler"`
}

type ControllerStage

type ControllerStage struct{}

func (*ControllerStage) FlaglyHandle

func (*ControllerStage) FlaglyHandle(c Client) error

type Dchan

type Dchan struct {
	Useful *DchanUseful `flagly:"handler"`
	Close  *DchanClose  `flagly:"handler"`
	List   *DchanList   `flagly:"handler"`
	Speed  *DchanSpeed  `flagly:"handler"`
}

type DchanClose

type DchanClose struct {
	Name string `type:"[0]"`
}

func (*DchanClose) FlaglyHandle

func (d *DchanClose) FlaglyHandle(c Client) error

type DchanList

type DchanList struct{}

func (DchanList) FlaglyHandle

func (DchanList) FlaglyHandle(c Client) error

type DchanSpeed

type DchanSpeed struct{}

func (DchanSpeed) FlaglyHandle

func (DchanSpeed) FlaglyHandle(c Client) error

type DchanUseful

type DchanUseful struct{}

func (DchanUseful) FlaglyHandle

func (DchanUseful) FlaglyHandle(c Client) error

type DebugFlow

type DebugFlow struct {
	Name string `type:"[0]" select:"dchan.Client,controller"`
}

func (*DebugFlow) FlaglyHandle

func (d *DebugFlow) FlaglyHandle(c Client, h *flagly.Handler) error

type Flower

type Flower interface {
	GetFlow() *flow.Flow
}

type Login

type Login struct{}

func (Login) FlaglyHandle

func (Login) FlaglyHandle(c Client)

type ShellDebug

type ShellDebug struct {
	Goroutine *ShellDebugGoroutine `flagly:"handler"`
	Log       *ShellDebugLog       `flagly:"handler"`
	Login     *Login               `flagly:"handler"`
	Flow      *DebugFlow           `flagly:"handler"`
}

type ShellDebugGoroutine

type ShellDebugGoroutine struct {
	Find string `type:"[0]"`
}

func (ShellDebugGoroutine) FlaglyHandle

func (s ShellDebugGoroutine) FlaglyHandle(rl *readline.Instance) error

type ShellDebugLog

type ShellDebugLog struct {
	Level string `type:"[0]" select:"debug,info,warn,error"`
}

func (ShellDebugLog) FlaglyHandle

func (s ShellDebugLog) FlaglyHandle() error

type ShellDig

type ShellDig struct {
	Host string `type:"[0]"`
}

func (*ShellDig) FlaglyDesc

func (sh *ShellDig) FlaglyDesc() string

func (*ShellDig) FlaglyHandle

func (sh *ShellDig) FlaglyHandle(c Client, rl *readline.Instance) error

type ShellPing

type ShellPing struct{}

func (*ShellPing) FlaglyHandle

func (*ShellPing) FlaglyHandle(c *Client) error

type ShellRoute

type ShellRoute struct {
	Add       *ShellRouteAdd       `flagly:"handler"`
	AddDomain *ShellRouteAddDomain `flagly:"handler"`
	Show      *ShellRouteShow      `flagly:"handler"`
	Remove    *ShellRouteRemove    `flagly:"handler"`
	Get       *ShellRouteGet       `flagly:"handler"`
}

type ShellRouteAdd

type ShellRouteAdd struct {
	Duration time.Duration `name:"d" desc:"ephemeral node duration time"`

	Force   bool   `name:"f" desc:"force execute even comment is missing"`
	CIDR    string `type:"[0]"`
	Comment string `type:"[1]"`
}

func (*ShellRouteAdd) FlaglyHandle

func (arg *ShellRouteAdd) FlaglyHandle(c Client) (err error)

type ShellRouteAddDomain

type ShellRouteAddDomain struct {
	Duration time.Duration `name:"d" desc:"ephemeral node duration time" default:"6h"`
	Host     string        `type:"[0]"`
}

func (*ShellRouteAddDomain) FlaglyDesc

func (arg *ShellRouteAddDomain) FlaglyDesc() string

func (*ShellRouteAddDomain) FlaglyHandle

func (arg *ShellRouteAddDomain) FlaglyHandle(c Client, rl *readline.Instance) error

type ShellRouteGet

type ShellRouteGet struct {
	Host string `type:"[0]" name:"ip/host"`
}

-----------------------------------------------------------------------------

func (*ShellRouteGet) FlaglyHandle

func (s *ShellRouteGet) FlaglyHandle(c Client) error

type ShellRouteRemove

type ShellRouteRemove struct {
	CIDR string `type:"[0]"`
}

func (*ShellRouteRemove) FlaglyHandle

func (arg *ShellRouteRemove) FlaglyHandle(c Client) error

type ShellRouteShow

type ShellRouteShow struct{}

func (ShellRouteShow) FlaglyHandle

func (ShellRouteShow) FlaglyHandle(c Client, rl *readline.Instance) error

Jump to

Keyboard shortcuts

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