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
Click to show internal directories.
Click to hide internal directories.