cups

package
v0.0.0-...-c875500 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: BSD-3-Clause Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateTicket

func TranslateTicket(printer *lib.Printer, ticket *cdd.CloudJobTicket) (map[string]string, error)

Types

type CUPS

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

Interface between Go and the CUPS API.

func NewCUPS

func NewCUPS(infoToDisplayName, prefixJobIDToJobTitle bool, displayNamePrefix string,
	printerAttributes, vendorPPDOptions []string, maxConnections uint, connectTimeout time.Duration,
	printerBlacklist, printerWhitelist []string, ignoreRawPrinters bool, ignoreClassPrinters bool,
	fcmNotificationsEnable bool) (*CUPS, error)

func (*CUPS) ConnQtyMax

func (c *CUPS) ConnQtyMax() uint

ConnQtyOpen gets the maximum quantity of open CUPS connections.

func (*CUPS) ConnQtyOpen

func (c *CUPS) ConnQtyOpen() uint

ConnQtyOpen gets the current quantity of open CUPS connections.

func (*CUPS) GetJobState

func (c *CUPS) GetJobState(_ string, jobID uint32) (*cdd.PrintJobStateDiff, error)

GetJobState gets the current state of the job indicated by jobID.

func (*CUPS) GetPrinters

func (c *CUPS) GetPrinters() ([]lib.Printer, error)

GetPrinters gets all CUPS printers found on the CUPS server.

func (*CUPS) Print

func (c *CUPS) Print(printer *lib.Printer, filename, title, user, gcpJobID string, ticket *cdd.CloudJobTicket) (uint32, error)

Print sends a new print job to the specified printer. The job ID is returned.

func (*CUPS) Quit

func (c *CUPS) Quit()

func (*CUPS) ReleaseJob

func (c *CUPS) ReleaseJob(printerName string, jobID uint32) error

func (*CUPS) RemoveCachedPPD

func (c *CUPS) RemoveCachedPPD(printername string)

RemoveCachedPPD removes a printer's PPD from the cache.

Jump to

Keyboard shortcuts

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