migration

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package migration reads third-party session exports without modifying them.

Index

Constants

View Source
const MaxBytes int64 = 32 << 20
View Source
const MaxEntries = 10000
View Source
const MaxFiles = 1024
View Source
const MaxIssues = 10000

Variables

View Source
var (
	ErrFormat    = errors.New("unsupported or malformed migration format")
	ErrTooLarge  = errors.New("migration input exceeds limit")
	ErrNoEntries = errors.New("no SSH entries found")
	ErrRead      = errors.New("cannot read migration input")
	ErrEncrypted = errors.New("encrypted migration input is not supported")
)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID, Name, Address, User, Group   string
	Port                             int
	Password, PrivateKey, Passphrase []byte `json:"-" yaml:"-"`
	KeyPath                          string
	Jumps                            []Hop
	Issues                           []Issue
}

Secrets are transient bytes and must never be serialized to application metadata.

type Hop

type Hop struct {
	Ref, Name, Address, User string
	Port                     int
}

type Issue

type Issue struct{ Code, Name, Field string }

type Result

type Result struct {
	Entries []Entry
	Issues  []Issue
}

func ParseText added in v0.0.10

func ParseText(text string) (Result, error)

ParseText reads a host list typed or pasted for a text import, within the bounds Read keeps.

func Read

func Read(source Source, paths []string) (Result, error)

Read accepts selected files or directories; symbolic links are never followed.

type Source

type Source string
const (
	Xshell    Source = "Xshell"
	MobaXterm Source = "MobaXterm"
	PuTTY     Source = "PuTTY"
	WindTerm  Source = "WindTerm"
	Electerm  Source = "Electerm"
	Tabby     Source = "Tabby"
	Netcatty  Source = "Netcatty"
	Remmina   Source = "Remmina"
	MRemoteNG Source = "mRemoteNG"
	WinSCP    Source = "WinSCP"
	// Text is a host list of key=value lines, typed, pasted or read
	// from a file; it is not one of the clients Sources lists.
	Text Source = "Text"
	// CSV is a host table whose header names the columns with the keys
	// of a Text host list; it is not one of the clients Sources lists.
	CSV Source = "CSV"
)

func Sources

func Sources() []Source

Jump to

Keyboard shortcuts

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