storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAll added in v0.3.0

func FindAll() (map[string]*Tunnel, error)

FindAll finds all the Tunnels in Store.

Types

type Store

type Store struct {
	Tunnels map[string]*Tunnel `toml:"tunnels"`
}

Store contains the map of tunnels, where key is string tunnel alias and value is Tunnel.

type Tunnel

type Tunnel struct {
	Local   string `toml:"local"`
	Remote  string `toml:"remote"`
	Server  string `toml:"server"`
	Key     string `toml:"key"`
	Verbose bool   `toml:"verbose"`
	Help    bool   `toml:"help"`
	Version bool   `toml:"version"`
	Detach  bool   `toml:"detach"`
}

Tunnel represents settings of the ssh tunnel.

func FindByName

func FindByName(name string) (*Tunnel, error)

FindByName finds the Tunnel in Store by name.

func Remove

func Remove(name string) (*Tunnel, error)

Remove deletes Tunnel from the Store by name.

func Save

func Save(name string, tunnel *Tunnel) (*Tunnel, error)

Save stores Tunnel to the Store.

func (Tunnel) String

func (t Tunnel) String() string

Jump to

Keyboard shortcuts

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