privet

package
v0.0.0-...-244895d Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoPortsAvailable = errors.New("No ports available")

Functions

This section is empty.

Types

type Privet

type Privet struct {
	// contains filtered or unexported fields
}

Privet managers local discovery and printing.

func NewPrivet

func NewPrivet(jobs chan<- *lib.Job, portLow, portHigh uint16, gcpBaseURL string, getProximityToken func(string, string) ([]byte, int, error)) (*Privet, error)

NewPrivet constructs a new Privet object.

getProximityToken should be GoogleCloudPrint.ProximityToken()

func (*Privet) AddPrinter

func (p *Privet) AddPrinter(printer lib.Printer, getPrinter func(string) (lib.Printer, bool)) error

AddPrinter makes a printer available locally.

func (*Privet) DeletePrinter

func (p *Privet) DeletePrinter(cupsPrinterName string) error

DeletePrinter removes a printer from Privet.

func (*Privet) Quit

func (p *Privet) Quit()

func (*Privet) Size

func (p *Privet) Size() int

func (*Privet) UpdatePrinter

func (p *Privet) UpdatePrinter(diff *lib.PrinterDiff) error

UpdatePrinter updates a printer's TXT mDNS record.

Jump to

Keyboard shortcuts

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