connection

package
v0.0.0-...-bfa556d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Name     string `json:"-"`
	Host     string `json:"host"`
	Port     uint64 `json:"port"`
	CertPath string `json:"cert_path"`
	// contains filtered or unexported fields
}

func CurrentConnection

func CurrentConnection() (*Connection, error)

func Get

func Get(path, name string) (*Connection, error)

func (Connection) HostPort

func (c Connection) HostPort() string

func (Connection) Remove

func (c Connection) Remove() error

func (Connection) Render

func (c Connection) Render(format string) (string, error)

func (Connection) Save

func (c Connection) Save(path string, force bool) error

func (Connection) Use

func (c Connection) Use(filepath string) error

type Connections

type Connections []Connection

func List

func List(path string) (Connections, error)

func (Connections) FilterByHost

func (cs Connections) FilterByHost(host string) Connections

func (Connections) FilterByName

func (cs Connections) FilterByName(name string) (*Connection, error)

func (Connections) FilterBySecure

func (cs Connections) FilterBySecure(secure bool) Connections

func (Connections) Render

func (cs Connections) Render(format string) (string, error)

Jump to

Keyboard shortcuts

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