Documentation ¶
Overview ¶
Package database provides methods for working with the bbolt DB.
Package database provides methods for working with the bbolt DB.
Index ¶
- type DB
- func (d *DB) FetchAll(hostname string) (map[string]Host, error)
- func (d *DB) FetchAllItemsString(hostname string) ([]string, error)
- func (d *DB) GetHostInfo(hostname string, host []byte) (Host, error)
- func (d *DB) RemoveHost(hostname string, host []byte) error
- func (d *DB) Write(hostname string, key, val []byte) error
- type DataStore
- type Host
- type Hosts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB is a wrapper around *bbolt.DB.
func (*DB) FetchAllItemsString ¶
FetchAllItemsString returns a slice of strings with all hosts in the DB.
func (*DB) GetHostInfo ¶
GetHostInfo returns information on a single host entry from the DB.
func (*DB) RemoveHost ¶
RemoveHost removes the named host from the DB.
type DataStore ¶
type DataStore interface { Write(string, []byte, []byte) error FetchAllItemsString(string) ([]string, error) GetHostInfo(string, []byte) (Host, error) FetchAll(string) (map[string]Host, error) RemoveHost(string, []byte) error }
DataStore provides an interface for working with the DB.
type Host ¶
type Host struct { // Hostname or alias for the server Host []string // Fully qualified hostname or IP address to connect HostName string // Port number that the SSH daemon is listening on Port int // The name of the remote user to connect as User string ProxyCommand string HostKeyAlgorithms string // Path the SSH key that should be used when connecting IdentityFile string // Interval that the ServerKeepAlive command should be passed to the server KeepAlive int8 }
Host contains the configuration details for a SSH Host.
Click to show internal directories.
Click to hide internal directories.