server

package
v0.0.0-...-9c76ea3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-2.0, GPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

uploader.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDriveHandlers

func RegisterDriveHandlers(mux *http.ServeMux)

func RegisterHandlers

func RegisterHandlers(mux *http.ServeMux)

func RegisterUploaderHandlers

func RegisterUploaderHandlers(mux *http.ServeMux)

Types

type DriveItem

type DriveItem struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Type string `json:"type"`
}

type DriveTemplateData

type DriveTemplateData struct {
	UserHost string
	SubPath  string
}

type FolderItem

type FolderItem struct {
	Name     string       `json:"name"`
	Path     string       `json:"path"`
	Type     string       `json:"type"` // "folder"
	Children []FolderItem `json:"children,omitempty"`
}

type SSHInfo

type SSHInfo struct {
	Host     string `json:"host"`
	User     string `json:"user"`
	Port     int    `json:"port"`
	Password string `json:"password"`
}

func (*SSHInfo) Address

func (info *SSHInfo) Address() string

type SSHManager

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

SSHManager manages SSH clients associated with session IDs

func NewSSHManager

func NewSSHManager() *SSHManager

NewSSHManager creates a new SSHManager

func (*SSHManager) AddClient

func (sm *SSHManager) AddClient(sessionID string, client *ssh.Client)

AddClient associates the SSH client with the given session ID

func (*SSHManager) GetClient

func (sm *SSHManager) GetClient(sessionID string) (*ssh.Client, bool)

GetClient retrieves the SSH client associated with the given session ID

func (*SSHManager) RemoveClient

func (sm *SSHManager) RemoveClient(sessionID string)

RemoveClient removes the SSH client associated with the given session ID

Jump to

Keyboard shortcuts

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