Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultURL = "https://api.evotor.ru"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(cfg ClientConfig) (*Client, error)
func (*Client) GetDevices ¶
GetDevices returns a sequence of devices and a function to check for errors. The sequence is lazily loaded from the server using the provided token. The server will return a paginated list of devices, and the sequence will yield each device in the list. If there are more devices available, the sequence will automatically request the next page from the server. If an error occurs while loading the devices, the error function will return the error.
type ClientConfig ¶
ClientConfig contains client options.
type Device ¶
type Device struct {
ID string `json:"id"` // Уникальный идентификатор смарт-терминала в Облаке Эвотор.
Name string `json:"name"` // Имя смарт-терминала, которое пользователь дал устройству в Личном кабинете.
StoreID string `json:"store_id"` // Уникальный идентификатор торговой точки в Облаке Эвотор.
UserID string `json:"user_id"` // Идентификатор пользователя Эвотор.
INN string `json:"inn"` // ИНН владельца терминала.
TimezoneOffset int64 `json:"timezone_offset"` // Часовой пояс, в котором работает смарт-терминал. Представлен в виде смещения в миллисекундах относительно часового пояса UTC.
IMEI string `json:"imei"` // IMEI смарт-терминала.
FirmwareVersion string `json:"firmware_version"` // Версия ПО смарт-терминала.
Location Location `json:"location"` // GPS-координаты смарт-терминала.
SerialNumber string `json:"serial_number"` // Серийный номер устройства. Состоит из 14-и символов. Написан на наклейке на обратной стороне Эвотора.
DeviceModel DeviceModel `json:"device_model"` // Модель устройства
CreatedAt time.Time `json:"created_at"` // Дата и время создания объекта
UpdatedAt time.Time `json:"updated_at"` // Дата и время обновления данных объекта
}
type DeviceModel ¶
type DeviceModel string
const ( DeviceModel10 DeviceModel = "10" DeviceModel72 DeviceModel = "7_2" DeviceModel72ATOL DeviceModel = "7_2_ATOL" DeviceModel73 DeviceModel = "7_3" DeviceModel5 DeviceModel = "5" DeviceModel5I DeviceModel = "5_I" DeviceModelPower DeviceModel = "POWER" DeviceModelUnknown DeviceModel = "UNKNOWN" )
Click to show internal directories.
Click to hide internal directories.