wormhole

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package wormhole contains a widget that provides the UI for termshark's magic-wormhole pcap sending feature.

Index

Constants

View Source
const (
	NotStarted state = 0
	Sending    state = iota
	Complete   state = iota
)

Variables

View Source
var Goroutinewg *sync.WaitGroup

Functions

func UpperBoundOnLength

func UpperBoundOnLength(words int) int

XXX-word1-word2-... - max length of word in pgp word list is 11

Types

type ErrorFunc

type ErrorFunc func(err error, app gowid.IApp)

type Options

type Options struct {
	ErrorHandler        ErrorFunc
	CodeLength          int
	RendezvousURL       string
	TransitRelayAddress string
}

type Widget

type Widget struct {
	*holder.Widget
	// contains filtered or unexported fields
}

func New

func New(filename string, app gowid.IApp, opts ...Options) (*Widget, error)

func (*Widget) Close

func (w *Widget) Close() error

func (*Widget) CodeLength

func (w *Widget) CodeLength() int

Jump to

Keyboard shortcuts

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