terminal

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FTPData

type FTPData struct {
	SessionID     string `json:"session_id" validate:"required"`
	URL           string `json:"url" validate:"required"`
	Username      string `json:"username" validate:"required"`
	Groupname     string `json:"groupname"`
	HomeDirectory string `json:"home_directory"`
}

FTPData contains data for FTP operations

type PTYData

type PTYData struct {
	SessionID     string `json:"session_id" validate:"required"`
	URL           string `json:"url" validate:"required"`
	Username      string `json:"username" validate:"required"`
	Groupname     string `json:"groupname"`
	HomeDirectory string `json:"home_directory"`
	Rows          int    `json:"rows"`
	Cols          int    `json:"cols"`
}

PTYData contains data for PTY operations

type RefreshPTYData

type RefreshPTYData struct {
	SessionID string `json:"session_id" validate:"required"`
}

RefreshPTYData contains data for refreshing PTY (sending SIGWINCH)

type ResizePTYData

type ResizePTYData struct {
	SessionID string `json:"session_id" validate:"required"`
	Rows      int    `json:"rows" validate:"required"`
	Cols      int    `json:"cols" validate:"required"`
}

ResizePTYData contains data for resizing PTY

type TerminalHandler

type TerminalHandler struct {
	*common.BaseHandler
	// contains filtered or unexported fields
}

TerminalHandler handles PTY and FTP terminal commands

func NewTerminalHandler

func NewTerminalHandler(cmdExecutor common.CommandExecutor, apiSession *scheduler.Session, manager *runner.TerminalManager) *TerminalHandler

NewTerminalHandler creates a new terminal handler

func (*TerminalHandler) Execute

func (h *TerminalHandler) Execute(_ context.Context, cmd string, args *common.CommandArgs) (int, string, error)

Execute runs the terminal command

func (*TerminalHandler) Validate

func (h *TerminalHandler) Validate(cmd string, args *common.CommandArgs) error

Validate checks if the arguments are valid for the command

Jump to

Keyboard shortcuts

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