tunnel

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseTunnelData

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

CloseTunnelData contains data for closing a tunnel

type OpenTunnelData

type OpenTunnelData struct {
	SessionID  string `json:"session_id" validate:"required"`
	URL        string `json:"url" validate:"required"`
	ClientType string `json:"client_type" validate:"required,oneof=cli web editor"`
	TargetPort int    `json:"target_port"` // Required for cli/web, ignored for editor
	Username   string `json:"username"`    // Required for editor
	Groupname  string `json:"groupname"`   // Optional for editor
}

OpenTunnelData contains data for opening a tunnel

type TunnelHandler

type TunnelHandler struct {
	*common.BaseHandler
}

TunnelHandler handles tunnel connection commands (opentunnel, closetunnel)

func NewTunnelHandler

func NewTunnelHandler(cmdExecutor common.CommandExecutor) *TunnelHandler

NewTunnelHandler creates a new tunnel handler

func (*TunnelHandler) Execute

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

Execute runs the tunnel command

func (*TunnelHandler) Validate

func (h *TunnelHandler) 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