Documentation ¶
Overview ¶
Package transport handles sending and receiving using wormhole-william
Index ¶
- type Client
- 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) NewReceive(code string, pathname chan string, progress *util.ProgressBar) (err error)
- func (c *Client) NewTextSend(text string, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)
- func (c *Client) ShowNotification(title, content string)
- func (c *Client) ShowTextSendWindow() chan string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { wormhole.Client // 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 // DownloadPath holds the download path used for saving received files. DownloadPath string // Defines if we should pass a custom code or let wormhole-william generate on for us. CustomCode bool // contains filtered or unexported fields }
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) 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) NewReceive ¶
func (c *Client) NewReceive(code string, pathname chan string, progress *util.ProgressBar) (err 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) ShowNotification ¶
ShowNotification sends a notification if c.Notifications is true.
func (*Client) ShowTextSendWindow ¶
ShowTextSendWindow opens a new window for setting up text to send.