Versions in this module Expand all Collapse all v0 v0.0.0 Apr 27, 2018 Changes in this version + var ErrUnclaimed = fmt.Errorf("printer not yet claimed") + func RandomID() (string, error) + type Auth struct + APIClientID string + APIClientSecret string + ProxyID string + Token oauth.Token + TokenUser string + XMPPJID string + func AuthUser(auth Auth) (Auth, error) + type Client struct + func NewClient(auth Auth) (*Client, error) + func (c *Client) DeleteJob(j *Job) error + func (c *Client) Jobs(p *Printer) ([]*Job, error) + func (c *Client) Print(p *Printer, info *JobInfo, data []byte) (*Job, error) + func (c *Client) Printer(id string) (*Printer, error) + func (c *Client) Search(query string, all bool) ([]*Printer, error) + type Job struct + ContentType string + CreateTime time.Time + ErrorCode string + FileURL string + ID string + OwnerID string + Pages int64 + PrinterID string + PrinterName string + PrinterType string + Status string + Tags []string + TicketURL string + Title string + UpdateTime time.Time + type JobInfo struct + Capabilities []byte + Tags []string + Title string + type JobStatus string + const JobDone + const JobError + const JobInProgress + const JobQueued + type OpenPrinter struct + func CreateOpenPrinter(auth Auth, info *PrinterInfo) (*OpenPrinter, error) + func (p *OpenPrinter) Auth() Auth + func (p *OpenPrinter) ClaimPDF() ([]byte, error) + func (p *OpenPrinter) ClaimURL() string + func (p *OpenPrinter) ConfirmationPDF() ([]byte, error) + func (p *OpenPrinter) Printer() *Printer + func (p *OpenPrinter) Server() *Server + func (p *OpenPrinter) VerifyClaim() error + type Printer struct + AccessTime time.Time + CapsFormat string + CapsHash string + CreateTime time.Time + DefaultDisplayName string + Description string + DisplayName string + GCPVersion string + ID string + IsTOSAccepted bool + Name string + OwnerID string + Proxy string + Status string + Tags []string + Type string + UpdateTime time.Time + type PrinterInfo struct + Capabilities []byte + Name string + type PrinterStatus string + const PrinterDormant + const PrinterOffline + const PrinterOnline + const PrinterUnknown + type Server struct + func NewServer(auth Auth) (*Server, error) + func (s *Server) Auth() Auth + func (s *Server) CreatePrinter(info *PrinterInfo) (*Printer, error) + func (s *Server) DeletePrinter(p *Printer) error + func (s *Server) Jobs(p *Printer) ([]*Job, error) + func (s *Server) Printers() ([]*Printer, error) + func (s *Server) ReadFile(j *Job) ([]byte, error) + func (s *Server) UpdateJob(j *Job, status JobStatus, code int, message string) error