protocol

package
v0.0.0-...-add1b5b Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Car

type Car struct {
	ID                     CarID               `json:"id"`
	Token                  string              `json:"token"`
	Year                   int                 `json:"year"`
	Color                  divar.Color         `json:"color"`
	UsageKM                int                 `json:"usage_km"`
	BodyStatus             divar.BodyStatus    `json:"body_status"`
	CashCost               int                 `json:"cash_cost"`
	MotorStatus            divar.MotorStatus   `json:"motor_status"`
	FrontChassisStatus     divar.ChassisStatus `json:"front_chassis_status"`
	RearChassisStatus      divar.ChassisStatus `json:"rear_chassis_status"`
	ThirdPartyInsuranceDue int                 `json:"third_party_insurance_due"`
	Gearbox                divar.Gearbox       `json:"gearbox"`
}

type CarID

type CarID uint

type CarService

type CarService interface {
	Search(ctx context.Context, cities []string, brandModel string) ([]CarToken, error)
	Get(context.Context, CarToken) (Car, error)
	GetByID(context.Context, CarID) (Car, error)
	Update(context.Context, CarID, Car) error
	Delete(context.Context, CarID) error
}

type CarStorage

type CarStorage interface {
	Store(context.Context, Car) (CarID, error)
	FindByToken(context.Context, CarToken) (Car, error)
	FindByID(context.Context, CarID) (Car, error)
	Update(context.Context, CarID, Car) error
	Delete(context.Context, CarID) error
}

type CarToken

type CarToken string

type PCar

type PCar struct {
	ID                     PCarID
	Token                  string
	Year                   int
	UsageKM                int
	Abi                    int
	Albaluyi               int
	Atlasi                 int
	Bademjani              int
	Boronz                 int
	Bezh                   int
	Banafsh                int
	PoostPiyazi            int
	Titanium               int
	Khakestari             int
	Khaki                  int
	Dolfini                int
	Zoghali                int
	Zard                   int
	Zereshki               int
	Zeytooni               int
	Sabz                   int
	Sorbi                  int
	Sormeyi                int
	Sefid                  int
	SefidSadafi            int
	Talayi                 int
	Toosi                  int
	Adasi                  int
	Annabi                 int
	Ghermez                int
	Ghahveyi               int
	CarbonBlack            int
	Kerem                  int
	Gilasi                 int
	Mesi                   int
	Meshki                 int
	Moka                   int
	Narenji                int
	NogrAbi                int
	Noghreyi               int
	NookMedadi             int
	Yashmi                 int
	BadaneSalem            int
	KhatKhashJozi          int
	SafkariBirang          int
	RangShodegi            int
	DorRang                int
	TamamRang              int
	Tasadofi               int
	Oraghi                 int
	CashCost               int
	MotorSalem             int
	NiyazBeTaamir          int
	TaavizShode            int
	RearChasisSalem        int
	RearZarbeKhorde        int
	RearChasisRangShode    int
	FrontChasisSalem       int
	FrontZarbeKhorde       int
	FrontChasisRangShode   int
	ThirdPartyInsuranceDue int
	Dandeyi                int
	Automatic              int
}

PCar represents one-hot-encoded Car.

type PCarID

type PCarID uint

type PCarService

type PCarService interface {
	OneHotEncode(context.Context) error
}

type PCarStorage

type PCarStorage interface {
	Store(context.Context, PCar) (PCarID, error)
}

type PreProcessService

type PreProcessService interface {
	List(context.Context) ([]Car, error)
	Year(ctx context.Context, minYear, maxYear int) error
	Color(context.Context) error
	UsageKM(context.Context) error
	BodyStatus(context.Context) error
	CashCost(context.Context) error
	MotorStatus(context.Context) error
	FrontChassisStatus(context.Context) error
	RearChassisStatus(context.Context) error
	InsuranceDue(context.Context) error
	GearBox(context.Context) error
}

type PreProcessStorage

type PreProcessStorage interface {
	FindAll(context.Context) ([]Car, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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