4a0a055234
git-subtree-dir: faxmachine git-subtree-split: d23200bcfdedb9f8cc57e6a3c65b5ef93fcbfd19
22 lines
384 B
Go
22 lines
384 B
Go
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
|
|
}
|