shell

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Conn

type Conn interface {
	WriteBinary([]byte) (e error)
	WriteString(string) (e error)
	WriteInfo(id int64, name string, started int64, fontSize int32, fontFamily string) (e error)
	Close() (e error)
}

type Element

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

func (*Element) Attach

func (element *Element) Attach(conn Conn, username string, shellid int64, cols, rows uint16, newshell bool) (s *Shell, e error)

func (*Element) Kill

func (element *Element) Kill(shellid int64) (e error)

func (*Element) Rename

func (element *Element) Rename(shellid int64, name string) (e error)

func (*Element) Unattach

func (element *Element) Unattach(shellid int64) (ok bool)

type ListInfo

type ListInfo struct {
	ID       int64
	Name     string
	Attached bool
}

type Manager

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

func DefaultManager

func DefaultManager() *Manager

func (*Manager) Attach

func (m *Manager) Attach(conn Conn, username string, shellid int64, cols, rows uint16, newshell bool) (s *Shell, e error)

func (*Manager) Kill

func (m *Manager) Kill(username string, shellid int64) (e error)

func (*Manager) List

func (m *Manager) List(username string) (arrs []ListInfo)

func (*Manager) Rename

func (m *Manager) Rename(username string, shellid int64, name string) (e error)

func (*Manager) Unattach

func (m *Manager) Unattach(username string, shellid int64) (e error)

type Shell

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

func (*Shell) Attack

func (s *Shell) Attack(conn Conn, cols, rows uint16) (e error)

func (*Shell) IsAttack

func (s *Shell) IsAttack() (yes bool)

func (*Shell) Kill

func (s *Shell) Kill()

func (*Shell) Rename

func (s *Shell) Rename(name string)

func (*Shell) Run

func (s *Shell) Run(conn Conn, cols, rows uint16) (e error)

func (*Shell) SetFontFamily

func (s *Shell) SetFontFamily(val string) (e error)

func (*Shell) SetFontSize

func (s *Shell) SetFontSize(val int32) (e error)

func (*Shell) SetSize

func (s *Shell) SetSize(cols, rows uint16) (e error)

func (*Shell) Unattack

func (s *Shell) Unattack(conn Conn)

func (*Shell) Write

func (s *Shell) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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