Documentation
¶
Overview ¶
Package transport handles sending and receiving using wormhole-william
Index ¶
- type Client
- func (c *Client) GenerateCodeCompletion(toComplete string) []string
- func (c *Client) NewDirSend(dir fyne.ListableURI, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
- func (c *Client) NewFileSend(file fyne.URIReadCloser, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
- func (c *Client) NewMultipleFileSend(uris []fyne.URI, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
- func (c *Client) NewReceive(code string) (*wormhole.IncomingMessage, error)
- func (c *Client) NewTextSend(text string, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
- func (c *Client) SaveToDisk(msg *wormhole.IncomingMessage, targetPath string, progress func(int64, int64)) (err error)
- func (c *Client) ShowNotification(title, content string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { wormhole.Client // App is a reference to the currently running Fyne application. App fyne.App // CustomCode defines if we should pass a custom code or let wormhole-william generate on for us. CustomCode bool // DownloadPath holds the download path used for saving received files. DownloadPath string // NoExtractDirectory specifies if we should extract directories or not. NoExtractDirectory bool // Notification holds the settings value for if we have notifications enabled or not. Notifications bool // OverwriteExisting holds the settings value for if we should overwrite already existing files. OverwriteExisting bool }
Client defines the client for handling sending and receiving using wormhole-william
func NewClient ¶
func NewClient(app fyne.App) *Client
NewClient returns a new client for sending and receiving using wormhole-william
func (*Client) GenerateCodeCompletion ¶ added in v3.6.0
GenerateCodeCompletion returns completion suggestions for the receiver code.
func (*Client) NewDirSend ¶
func (c *Client) NewDirSend(dir fyne.ListableURI, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
NewDirSend takes a listable URI and sends it using wormhole-william.
func (*Client) NewFileSend ¶
func (c *Client) NewFileSend(file fyne.URIReadCloser, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
NewFileSend takes the chosen file and sends it using wormhole-william.
func (*Client) NewMultipleFileSend ¶ added in v3.5.0
func (c *Client) NewMultipleFileSend(uris []fyne.URI, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
NewMultipleFileSend sends multiple files as a directory send using wormhole-william.
func (*Client) NewReceive ¶
func (c *Client) NewReceive(code string) (*wormhole.IncomingMessage, error)
NewReceive runs a receive using wormhole-william and handles types accordingly.
func (*Client) NewTextSend ¶
func (c *Client) NewTextSend(text string, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
NewTextSend takes a text input and sends the text using wormhole-william.
func (*Client) SaveToDisk ¶ added in v3.6.0
func (c *Client) SaveToDisk(msg *wormhole.IncomingMessage, targetPath string, progress func(int64, int64)) (err error)
SaveToDisk saves the incomming file or directory transfer to the disk.
func (*Client) ShowNotification ¶
ShowNotification sends a notification if c.Notifications is true.