ssh

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STDIO = "stdio"
	PS1   = "PS1"
	PS2   = "PS2"
)
View Source
const (
	SCRIPT = "script"
	SOURCE = "source"
	TARGET = "target"
	PROMPT = "prompt"
	PRINTF = "printf"
	SCREEN = "screen"
	RETURN = "return"
)
View Source
const (
	WELCOME = "welcome"
	GOODBYE = "goodbye"
	PRIVATE = "private"
	AUTHKEY = "authkey"
	REQUEST = "request"
)
View Source
const (
	TTY = "tty"
	ENV = "env"
	CMD = "cmd"
	ARG = "arg"
	RES = "res"
)
View Source
const (
	INPUT  = "input"
	OUTPUT = "output"
)
View Source
const CHANNEL = "channel"
View Source
const CONNECT = "connect"
View Source
const SERVICE = "service"
View Source
const SESSION = "session"
View Source
const SSH = "ssh"

Variables

View Source
var Index = &ice.Context{Name: SSH, Help: "终端模块", Commands: map[string]*ice.Command{
	ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
		m.Load()
		m.Richs(SESSION, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) {
			kit.Value(value, kit.Keym(kit.MDB_STATUS), tcp.CLOSE)
		})
		m.Richs(CHANNEL, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) {
			kit.Value(value, kit.Keym(kit.MDB_STATUS), tcp.CLOSE)
		})
	}},
	ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
		if f, ok := m.Target().Server().(*Frame); ok {
			f.close()
		}
		m.Save()
	}},
}}

Functions

func Render added in v0.1.21

func Render(msg *ice.Message, cmd string, args ...interface{}) string

func Script added in v0.2.9

func Script(m *ice.Message, name string) io.Reader

Types

type Frame

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

func (*Frame) Begin

func (f *Frame) Begin(m *ice.Message, arg ...string) ice.Server

func (*Frame) Close

func (f *Frame) Close(m *ice.Message, arg ...string) bool

func (*Frame) Spawn

func (f *Frame) Spawn(m *ice.Message, c *ice.Context, arg ...string) ice.Server

func (*Frame) Start

func (f *Frame) Start(m *ice.Message, arg ...string) bool

type Winsize added in v0.2.8

type Winsize struct {
	Height, Width uint16
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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