server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	BaseURL string
	// SendURL is the URL used to send the file
	SendURL string
	// ReceiveURL is the URL used to Receive the file
	ReceiveURL string
	// contains filtered or unexported fields
}

Server is the server

func New

func New(cfg *config.Config) (*Server, error)

New instance of the server

func (*Server) DisplayQR

func (s *Server) DisplayQR(url string)

DisplayQR creates a handler for serving the QR code in the browser

func (*Server) ReceiveTo

func (s *Server) ReceiveTo(dir string) error

ReceiveTo sets the output directory

func (*Server) Send

func (s *Server) Send(p payload.Payload)

Send adds a handler for sending the file

func (Server) Shutdown

func (s Server) Shutdown()

Shutdown the server

func (Server) Wait

func (s Server) Wait() error

Jump to

Keyboard shortcuts

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