label_printer/printjob/job.go

23 lines
384 B
Go
Raw Normal View History

package printjob
import (
"context"
"time"
"git.sr.ht/~guacamolie/faxmachine/escpos"
)
type Job interface {
Sender() string
Time() time.Time
Description() string
Print(ctx context.Context, p *escpos.Printer) error
OnPrinted(ctx context.Context)
OnShredded(ctx context.Context, err error)
}
type JobReplyer interface {
Job
Reply(ctx context.Context, msg string) error
}