alias

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package alias provides utility functions related to alias configuration file management.

The alias configuration files are stored on `$HOME/.mole` on files named after the alias name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(alias *Alias) error

Add persists an tunnel alias to the disk

func Delete

func Delete(alias string) error

Delete destroys a alias configuration file.

func Show

func Show(aliasName string) (string, error)

Show displays the configuration parameters for the given alias name.

func ShowAll

func ShowAll() (string, error)

ShowAll displays the configuration parameters for all persisted aliases.

Types

type Alias

type Alias struct {
	Name              string   `toml:"name"`
	TunnelType        string   `toml:"type"`
	Verbose           bool     `toml:"verbose"`
	Insecure          bool     `toml:"insecure"`
	Detach            bool     `toml:"detach"`
	Source            []string `toml:"source"`
	Destination       []string `toml:"destination"`
	Server            string   `toml:"server"`
	Key               string   `toml:"key"`
	KeepAliveInterval string   `toml:"keep-alive-interval"`
	ConnectionRetries int      `toml:"connection-retries"`
	WaitAndRetry      string   `toml:"wait-and-retry"`
	SshAgent          string   `toml:"ssh-agent"`
	Timeout           string   `toml:"timeout"`
	SshConfig         string   `toml:"config"`
	Rpc               bool     `toml:"rpc"`
	RpcAddress        string   `toml:"rpc-address"`
}

Alias holds all attributes required to start a ssh port forwarding tunnel.

func Get

func Get(aliasName string) (*Alias, error)

Get returns an alias previously created

func (Alias) String

func (a Alias) String() string

String parses a Alias object to a string representation.

Jump to

Keyboard shortcuts

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