bridge

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserDownloadsFolder

func UserDownloadsFolder() string

UserDownloadsFolder returns the downloads folder corresponding to the current user.

Types

type Bridge

type Bridge struct {
	// PassPhraseComponentLength is the number of words to use when generating a passprase.
	ComponentLength int

	// DownloadPath holds the download path used for saving recvieved files.
	DownloadPath string
}

Bridge holds settings and other meathods specific to the bridge using wormhole-willam.

func NewBridge

func NewBridge() *Bridge

NewBridge creates a new bridge with the default values.

func (*Bridge) EnterSendText

func (b *Bridge) EnterSendText(a fyne.App, text chan string)

EnterSendText opens a new window for setting up text to send.

func (*Bridge) RecieveData

func (b *Bridge) RecieveData(code string, fileName chan string, a fyne.App) error

RecieveData runs a receive using wormhole-william and handles types accordingly.

func (*Bridge) SendFile

func (b *Bridge) SendFile(file fyne.URIReadCloser, code chan string, progress wormhole.SendOption) error

SendFile takes the chosen file and sends it using wormhole-william.

func (*Bridge) SendText

func (b *Bridge) SendText(text string, code chan string) error

SendText takes a text input and sends the text using wormhole-william.

type SendProgress

type SendProgress struct {
	widget.ProgressBar

	// Update is the SendOption that should be passed to the wormhole client.
	Update wormhole.SendOption
	// contains filtered or unexported fields
}

SendProgress is contains a widget for displaying wormhole send progress.

func NewSendProgress

func NewSendProgress() *SendProgress

NewSendProgress creates a new fyne progress bar and update function for wormhole send.

func (*SendProgress) UpdateProgress

func (p *SendProgress) UpdateProgress(sent int64, total int64)

UpdateProgress is the function that runs when updating the progress.

Jump to

Keyboard shortcuts

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