websh

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenNewTerminal

func OpenNewTerminal(ac *client.AlpaconClient, sessionResponse SessionResponse) error

Handles graceful termination of the websh terminal. Exits on error without further error handling.

Types

type JoinRequest

type JoinRequest struct {
	Password string `json:"password"`
}

type SessionRequest

type SessionRequest struct {
	Rows      int    `json:"rows"`
	Cols      int    `json:"cols"`
	Server    string `json:"server"` // server id
	Username  string `json:"username"`
	Groupname string `json:"groupname"`
}

type SessionResponse

type SessionResponse struct {
	ID           string              `json:"id"`
	Rows         int                 `json:"rows"`
	Cols         int                 `json:"cols"`
	Server       types.ServerSummary `json:"server"`
	User         types.UserSummary   `json:"user"`
	Username     string              `json:"username"`
	Groupname    string              `json:"groupname"`
	UserAgent    string              `json:"user_agent"`
	RemoteIP     string              `json:"remote_ip"`
	WebsocketURL string              `json:"websocket_url"`
}

func CreateWebshSession

func CreateWebshSession(ac *client.AlpaconClient, serverName, username, groupname string, share, readOnly bool) (SessionResponse, error)

Create new websh session

func JoinWebshSession

func JoinWebshSession(ac *client.AlpaconClient, sharedURL, password string) (SessionResponse, error)

type ShareRequest

type ShareRequest struct {
	ReadOnly bool `json:"read_only"`
}

type ShareResponse

type ShareResponse struct {
	SharedURL  string    `json:"shared_url"`
	Password   string    `json:"password"`
	ReadOnly   bool      `json:"read_only"`
	Expiration time.Time `json:"expiration"`
}

type WebsocketClient

type WebsocketClient struct {
	Header http.Header

	Done chan error
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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