websh

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 16 Imported by: 0

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       string          `json:"server"`
	User         iam.UserSummary `json:"user"`
	UserName     string          `json:"user_name"`
	GroupName    string          `json:"group_name"`
	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