printer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyAdd = errors.New("已经添加过该打印机了")

Functions

This section is empty.

Types

type DaQuError

type DaQuError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*DaQuError) Error

func (r *DaQuError) Error() string

type DaQuPrinter

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

func NewDaQu

func NewDaQu() *DaQuPrinter

func (*DaQuPrinter) AddPrinter

func (d *DaQuPrinter) AddPrinter(config *model.BeePrinter) error

func (*DaQuPrinter) DelPrinter

func (d *DaQuPrinter) DelPrinter(config *model.BeePrinter, codes []string) error

func (*DaQuPrinter) Print

func (d *DaQuPrinter) Print(config *model.BeePrinter, voice, content string) error

type DaQuRes

type DaQuRes struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

type FeiEPrinter

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

FeiEPrinter 飞蛾打印机

func NewFeiE

func NewFeiE() *FeiEPrinter

func (*FeiEPrinter) AddPrinter

func (d *FeiEPrinter) AddPrinter(config *model.BeePrinter) error

func (*FeiEPrinter) DelPrinter

func (d *FeiEPrinter) DelPrinter(config *model.BeePrinter, codes []string) error

func (*FeiEPrinter) Print

func (d *FeiEPrinter) Print(config *model.BeePrinter, voice, content string) error

type FeiERes

type FeiERes struct {
	Ret                int             `json:"ret"`
	Message            string          `json:"message"`
	Data               json.RawMessage `json:"data"`
	ServerExecutedTime int             `json:"serverExecutedTime"`
}

type Printer

type Printer interface {
	Print(config *model.BeePrinter, voice, content string) error
	AddPrinter(config *model.BeePrinter) error
	DelPrinter(config *model.BeePrinter, codes []string) error
}

func GetPrinter

func GetPrinter(config *model.BeePrinter) Printer

func GetPrinterByBrand

func GetPrinterByBrand(brand enum.PrinterBrand) Printer

Jump to

Keyboard shortcuts

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