Documentation
¶
Index ¶
- Constants
- Variables
- func CalcTerminalColumnsCount() int
- func ExtractBasicAuthLoginAndPassFromRequest(r *http.Request) (login, pass string, err error)
- func ExtractPortAndHost(input string) (port int, host string)
- func GetPortByScheme(scheme string) int
- func GetSchemeByPort(port int) string
- func ReadPassword() ([]byte, error)
- func RemovePortFromURL(rawURL string) string
- func RunSSH(args []string) error
- type Auth
- type BaseClient
- type BearerAuth
- type FallbackAuth
- type Output
- type PasswordScanner
- type PortScheme
- type PromptReader
- type Scanner
- type StorageBasicAuth
- type WsClient
- type WsURLBuilder
Constants ¶
View Source
const ( SSH = "ssh" RDP = "rdp" VNC = "vnc" HTTP = "http" HTTPS = "https" )
View Source
const (
InterruptMessage = "command interrupted, exiting"
)
Variables ¶
View Source
var PortSchemesMap = []PortScheme{ { Port: 22, Scheme: SSH, }, { Port: 3389, Scheme: RDP, }, { Port: 5900, Scheme: VNC, }, { Port: 80, Scheme: HTTP, }, { Port: 443, Scheme: HTTPS, }, }
Functions ¶
func CalcTerminalColumnsCount ¶ added in v0.0.5
func CalcTerminalColumnsCount() int
func ExtractBasicAuthLoginAndPassFromRequest ¶ added in v0.2.7
func ExtractPortAndHost ¶ added in v0.0.14
func GetPortByScheme ¶ added in v0.0.14
func GetSchemeByPort ¶ added in v0.0.14
func ReadPassword ¶ added in v0.0.4
func RemovePortFromURL ¶
Types ¶
type BaseClient ¶ added in v0.0.6
type BaseClient struct {
// contains filtered or unexported fields
}
func (*BaseClient) WithAuth ¶ added in v0.0.6
func (c *BaseClient) WithAuth(a Auth)
type BearerAuth ¶ added in v0.0.10
func (*BearerAuth) AuthRequest ¶ added in v0.0.10
func (ba *BearerAuth) AuthRequest(req *http.Request) error
type FallbackAuth ¶ added in v0.0.10
func (*FallbackAuth) AuthRequest ¶ added in v0.0.10
func (fa *FallbackAuth) AuthRequest(req *http.Request) error
type PasswordScanner ¶ added in v0.0.6
type PortScheme ¶ added in v0.0.14
type PromptReader ¶ added in v0.0.6
type PromptReader struct { Sc Scanner SigChan chan os.Signal PasswordScanner PasswordScanner }
func (*PromptReader) Output ¶ added in v0.0.10
func (pr *PromptReader) Output(text string)
func (*PromptReader) ReadPassword ¶ added in v0.0.6
func (pr *PromptReader) ReadPassword() (string, error)
func (*PromptReader) ReadString ¶ added in v0.0.6
func (pr *PromptReader) ReadString() (string, error)
type StorageBasicAuth ¶ added in v0.0.6
func (*StorageBasicAuth) AuthRequest ¶ added in v0.0.6
func (sba *StorageBasicAuth) AuthRequest(req *http.Request) error
type WsClient ¶ added in v0.0.6
type WsClient struct { WsURLBuilder WsURLBuilder Conn *websocket.Conn }
func NewWsClient ¶ added in v0.0.6
func NewWsClient(ctx context.Context, wsURLBuilder WsURLBuilder) (wsc *WsClient, err error)
Click to show internal directories.
Click to hide internal directories.