Documentation
¶
Overview ¶
Package wishlist provides a library and binary to list and connect to SSH apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Listen string `yaml:"listen"` // Address to listen on.
Port int64 `yaml:"port"` // Port to start the first server on.
Endpoints []*Endpoint `yaml:"endpoints"` // Endpoints to list.
Factory func(Endpoint) (*ssh.Server, error) `yaml:"-"` // Factory used to create the SSH server for the given endpoint.
Users []User `yaml:"users"` // Users allowed to access the list.
// contains filtered or unexported fields
}
Config represents the wishlist configuration.
type Endpoint ¶
type Endpoint struct {
Name string `yaml:"name"` // Endpoint name.
Address string `yaml:"address"` // Endpoint address in the `host:port` format, if empty, will be the same address as the list, increasing the port number.
User string `yaml:"user"` // User to authenticate as.
ForwardAgent bool `yaml:"forward_agent"` // ForwardAgent defines wether to forward the current agent. Anologous to SSH's config ForwardAgent.
RequestTTY bool `yaml:"request_tty"` // RequestTTY defines wether to request a TTY. Anologous to SSH's config RequestTTY.
RemoteCommand string `yaml:"remote_command"` // RemoteCommand defines wether to request a TTY. Anologous to SSH's config RemoteCommand.
IdentityFiles []string `yaml:"-"` // IdentityFiles is only set when parsing from a SSH Config file, and used only on local mode.
Middlewares []wish.Middleware `yaml:"-"` // wish middlewares you can use in the factory method.
}
Endpoint represents an endpoint to list. If it has a Handler, wishlist will start an SSH server on the given address.
func (*Endpoint) Description ¶
Description to abide the list.Item interface.
func (*Endpoint) FilterValue ¶
FilterValue to abide the list.Item interface.
func (Endpoint) ShouldListen ¶
ShouldListen returns true if we should start a server for this endpoint.
type HandoffModel ¶ added in v0.2.0
HandoffModel is a tea.Model that can tell where it should ssh into.
func LocalListing ¶ added in v0.2.0
func LocalListing(endpoints []*Endpoint) HandoffModel
LocalListing creates a new listing model for local usage only.
type SSHClient ¶ added in v0.2.0
SSHClient is a SSH client.
func NewLocalSSHClient ¶ added in v0.2.0
func NewLocalSSHClient() SSHClient
NewLocalSSHClient returns a SSH Client for local usage.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.

