entry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceSSHConfig = "ssh_config"
	SourceSSXStore  = "ssx_store"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID         uint64    `json:"id"`
	Host       string    `json:"host"`
	User       string    `json:"user"`
	Port       string    `json:"port"`
	VisitCount int       `json:"visit_count"` // Perhaps I will support sorting by VisitCount in the future
	KeyPath    string    `json:"key_path"`
	Passphrase string    `json:"passphrase"`
	Password   string    `json:"password"`
	Tags       []string  `json:"tags"`
	Source     string    `json:"source"` // Data source, used to distinguish that it is from ssx stored or local ssh configuration
	CreateAt   time.Time `json:"create_at"`
	UpdateAt   time.Time `json:"update_at"`
}

Entry represent a target server

func (*Entry) AuthMethods

func (e *Entry) AuthMethods(ctx context.Context) ([]ssh.AuthMethod, error)

AuthMethods all possible auth methods

func (*Entry) Copy added in v0.0.7

func (e *Entry) Copy() (*Entry, error)

func (*Entry) GenSSHConfig

func (e *Entry) GenSSHConfig(ctx context.Context) (*ssh.ClientConfig, error)

func (*Entry) JSON added in v0.0.7

func (e *Entry) JSON() ([]byte, error)

func (*Entry) Mask added in v0.0.7

func (e *Entry) Mask()

func (*Entry) String

func (e *Entry) String() string

func (*Entry) Tidy

func (e *Entry) Tidy() error

Jump to

Keyboard shortcuts

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