command

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CmdNmAuthorize is the command name.
	CmdNmAuthorize cli.CmdName = "authorize"
)
View Source
const (
	// CmdNmConnect is the command name.
	CmdNmConnect cli.CmdName = "connect"
)
View Source
const (
	// CmdNmHelp is the command name.
	CmdNmHelp cli.CmdName = "help"
)
View Source
const (
	// CmdNmOpen is the command name.
	CmdNmOpen cli.CmdName = "open"
)
View Source
const (
	// CmdNmRevoke is the command name.
	CmdNmRevoke cli.CmdName = "revoke"
)
View Source
const (
	// CmdNmState is the command name.
	CmdNmState cli.CmdName = "state"
)

Variables

This section is empty.

Functions

func NewAuthorize

func NewAuthorize() cli.Command

NewAuthorize constructs and initializes the command.

func NewConnect

func NewConnect() cli.Command

NewConnect constructs and initializes the command.

func NewHelp

func NewHelp() cli.Command

NewHelp constructs and initializes the command.

func NewOpen

func NewOpen() cli.Command

NewOpen constructs and initializes the command.

func NewRevoke

func NewRevoke() cli.Command

NewRevoke constructs and initializes the command.

func NewState

func NewState() cli.Command

NewState constructs and initializes the command.

func PrintSessionState added in v0.0.3

func PrintSessionState(
	ctx context.Context,
	disconnected bool,
	state warp.State,
)

func Setsize

func Setsize(f *os.File, rows, cols int) error

Types

type Authorize

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

Authorize authorizes write access to a warp client.

func (*Authorize) Execute

func (c *Authorize) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*Authorize) Help

func (c *Authorize) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*Authorize) Name

func (c *Authorize) Name() cli.CmdName

Name returns the command name.

func (*Authorize) Parse

func (c *Authorize) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

type Connect

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

Connect connects to a shared terminal.

func (*Connect) Execute

func (c *Connect) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*Connect) Help

func (c *Connect) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*Connect) Name

func (c *Connect) Name() cli.CmdName

Name returns the command name.

func (*Connect) Parse

func (c *Connect) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

type Help

type Help struct {
	Command cli.Command
}

Help a user

func (*Help) Execute

func (c *Help) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*Help) Help

func (c *Help) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*Help) Name

func (c *Help) Name() cli.CmdName

Name returns the command name.

func (*Help) Parse

func (c *Help) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

type Open

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

Open spawns a new shared terminal.

func (*Open) ConnLoop added in v0.0.3

func (c *Open) ConnLoop(
	ctx context.Context,
)

ReconnectLoop handles reconnecting the host to warpd. Each time the connection drops, the associated Session is destroyed and another one is created as a reconnection is attempted. Errors are returned during the first iteration of the reconnect loop. On subsequent reconnect, only warpd generated errors are returned.

func (*Open) Execute

func (c *Open) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*Open) Help

func (c *Open) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*Open) HostSession added in v0.0.3

func (c *Open) HostSession() *cli.Session

HostSession accessor is used by the local server to retrieve the current host session. The host session can be nil if the warp is currently disconnected from warpd. It is protected by a lock as the host session is set or unset by the ConnLoop.

func (*Open) ManageSession added in v0.0.3

func (c *Open) ManageSession(
	ctx context.Context,
	conn net.Conn,
	warpdErrOnly bool,
)

ManageSession creates an manage a session. It

func (*Open) Name

func (c *Open) Name() cli.CmdName

Name returns the command name.

func (*Open) Parse

func (c *Open) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

func (*Open) Warp added in v0.0.3

func (c *Open) Warp() string

Warp returns the warp name

func (*Open) WindowSize added in v0.0.3

func (c *Open) WindowSize() warp.Size

WindowSize returns the current window size for the host terminal.

type Revoke

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

Revoke authorizes write access to a warp client.

func (*Revoke) Execute

func (c *Revoke) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*Revoke) Help

func (c *Revoke) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*Revoke) Name

func (c *Revoke) Name() cli.CmdName

Name returns the command name.

func (*Revoke) Parse

func (c *Revoke) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

type State

type State struct {
}

State retrieve the state of the current warp (in-warp only).

func (*State) Execute

func (c *State) Execute(
	ctx context.Context,
) error

Execute the command or return a human-friendly error.

func (*State) Help

func (c *State) Help(
	ctx context.Context,
)

Help prints out the help message for the command.

func (*State) Name

func (c *State) Name() cli.CmdName

Name returns the command name.

func (*State) Parse

func (c *State) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error

Parse parses the arguments passed to the command.

Jump to

Keyboard shortcuts

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