ocr

package
v0.0.0-...-dd2df95 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const EventTypeOcr = events.EventType("ocr")

EventTypeOcr states ocr event type

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

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

func NewEventHandler

func NewEventHandler(dbPath string, d events.Dispatcher) *EventHandler

func (*EventHandler) Handle

func (h *EventHandler) Handle(e events.Event) error

type Item

type Item struct {
	Name     string  `json:"name"`
	Quantity float64 `json:"quantity"`
	Price    float64 `json:"price"`
}

type OCRHttpHandler

type OCRHttpHandler struct{}

OCRHttpHandler handles ocr http calls

func (*OCRHttpHandler) ServeHTTP

func (h *OCRHttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler interface

type Receipt

type Receipt struct {
	ID        uuid.UUID `json:"id"`
	Items     []Item    `json:"items"`
	Store     string    `json:"store"`
	DateTime  time.Time `json:"date_time"`
	Timestamp time.Time `json:"timestamp"`
}

func Parse

func Parse(ctx context.Context, r io.Reader) Receipt

Jump to

Keyboard shortcuts

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