domain

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotRecognized = NewError("number plate is not recognized")
)

Functions

This section is empty.

Types

type Error

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

func NewError

func NewError(text string) Error

func (Error) Error

func (e Error) Error() string

type Message

type Message struct {
	ID   int
	User User
	Text string
	Time time.Time
}

func TestMessage added in v1.0.2

func TestMessage(t *testing.T) *Message

type MessageRepository

type MessageRepository interface {
	Create(ctx context.Context, msg *Message) error
}

type MessageService

type MessageService interface {
	Create(ctx context.Context, msg *Message) error
}

type Recognizer added in v1.0.5

type Recognizer interface {
	Recognize(ctx context.Context, url string) ([]toolkit.ResultALPR, error)
}

type Registration added in v1.0.5

type Registration struct {
	VIN         string
	Code        string
	Number      string
	Brand       string
	Model       string
	Color       string
	Kind        string
	Year        int32
	TotalWeight int32
	OwnWeight   int32
	Capacity    int32
	Fuel        string
	Category    string
	NumSeating  int32
	Date        time.Time
}

type Request added in v1.0.5

type Request struct {
	Number *string
	VIN    *string
}

type Result added in v1.0.5

type Result struct {
	Request  Request
	Vehicles map[string]*Vehicle
}

type User

type User struct {
	ID           int
	FirstName    string
	LastName     *string
	UserName     *string
	LanguageCode *string
}

func TestUser

func TestUser(t *testing.T) *User

type Vehicle added in v1.0.5

type Vehicle struct {
	VIN           string
	FirstRegDate  time.Time
	Brand         string
	Model         string
	Year          int32
	Registrations []Registration
}

type VehicleService

type VehicleService interface {
	FindByNumber(ctx context.Context, number string) (*Result, error)
	FindByVIN(ctx context.Context, vin string) (*Result, error)
	FindByImage(ctx context.Context, url string) (*Result, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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