cli

package
v0.0.0-...-f701b90 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ShellVersion float32 = 1.0

Variables

This section is empty.

Functions

func HOOKHandler

func HOOKHandler(cmd commands.Command)

Shell-specific HOOK handler. Listens constantly for incoming HOOK packets and performs the necessary shell operations.

func New

func New(static commands.StaticData, conn net.Conn, server db.Server) commands.Command

Creates a new shell and an option connection and server.

func Print

func Print(text string, outputType commands.OutputType)

Shell-specific output function that handles different input types accordingly.

func PrintPrompt

func PrintPrompt(data *commands.Data)

func RECIVHandler

func RECIVHandler(cmd commands.Command)

Shell-specific RECIV handler. Listens constantly for incoming RECIV packets and performs the necessary shell operations.

func Run

func Run(data commands.Command)

Starts a shell that allows the client to send packets to the gochat server, along with other functionalities.

func SHTDWNHandler

func SHTDWNHandler(cmd commands.Command)

Shell-specific SHTDWN handler. Listens constantly for incoming SHTDWN packets and prints a notice about them

Types

type ShellCommand

type ShellCommand struct {
	Run  func(ctx context.Context, cmd commands.Command, args ...[]byte) error
	Help string
}

Defines a shell command, including its function and its documentation

Jump to

Keyboard shortcuts

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