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
|
|
}
|