Перейти к содержанию

Протокол

Оглавление

Схема классов

/svg/protos/key/deviceapis/device/v1/deviceapis_device_reader_v1.proto.svg

deviceapis/device/v1/deviceapis_device_reader_v1.proto

Сервис считывателей

ReaderService

Сервис считывателей

Название метода Описание Тип запроса Тип ответа
EditReader Метод редактирования считывателя deviceapis.device.v1.EditReaderRequest deviceapis.device.v1.EditReaderResponse
GetReader Метод получения считывателя deviceapis.device.v1.GetReaderRequest deviceapis.device.v1.GetReaderResponse

EditReaderRequest

Запрос редактирования считывателя

Поле Описание Тип Признак
data Считыватель deviceapis.device.v1.Reader REQUIRED
update_mask Маска полей обновления google.protobuf.FieldMask

EditReaderResponse

Ответ на запрос редактирования считывателя

Поле Описание Тип Признак
error Ошибка optional deviceapis.device.v1.EditReaderResponse.Error

EditReaderResponse.Error

Ошибка запроса

Поле Описание Тип Признак
validation Ошибка валидации optional deviceapis.device.v1.ValidationError
saving Ошибка сохранения optional deviceapis.device.v1.Reader.SavingError

GetReaderRequest

Запрос получения считывателя

Поле Описание Тип Признак
id Идентификатор. id=100 - Считыватель внутренний. id=1 - Считыватель внешний №1. id=2 - Считыватель внешний №2 и тд int32 REQUIRED

GetReaderResponse

Ответ на запрос получения считывателя

Поле Описание Тип Признак
data Считыватель optional deviceapis.device.v1.Reader

Reader

Считыватель

Поле Описание Тип Признак
id Идентификатор. id=100 - Считыватель внутренний. id=1 - Считыватель внешний №1. id=2 - Считыватель внешний №2 и тд int32 REQUIRED
encryption_profile_ids Список идентификаторов профилей шифрования repeated int32 REQUIRED
relay_indexes Список идентификаторов реле. Диапазон: 1..64 repeated int32 REQUIRED
is_none_secure_mode Считыватель работает не в безопасном режиме (по UID) bool REQUIRED
direction_type Направление deviceapis.device.v1.Reader.DirectionType

Reader.SavingError

Ошибки сохранения

Поле Описание Тип Признак
reader_not_found Считыватель не найден optional deviceapis.device.v1.Reader.SavingError.ReaderNotFound
profile_is_not_supported Профиль не поддерживается для этого считывателя optional deviceapis.device.v1.Reader.SavingError.ProfileIsNotSupported
profile_not_found Выбранный профиль не найден optional deviceapis.device.v1.Reader.SavingError.ProfileNotFound

Reader.SavingError.ProfileIsNotSupported

Профиль не поддерживается для этого считывателя

Поле Описание Тип Признак
profile_ids Список идентификаторов профилей, которые не поддерживаются на считывателе repeated int32

Reader.SavingError.ProfileNotFound

Выбранный профиль не найден

Reader.SavingError.ReaderNotFound

Считыватель не найден

Reader.DirectionType

Направление

Номер Тип Название
0 DIRECTION_TYPE_UNKNOWN Значение не указано
1 IN Вход
2 OUT Выход

Скалярные типы значений

.proto Type Примечание Python Go Ruby C# C++ Java PHP
double float float64 Float double double double float
float float float32 Float float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int int32 Bignum or Fixnum (as required) int int32 int integer
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long int64 Bignum long int64 long integer/string
uint32 Uses variable-length encoding. int/long uint32 Bignum or Fixnum (as required) uint uint32 int integer
uint64 Uses variable-length encoding. int/long uint64 Bignum or Fixnum (as required) ulong uint64 long integer/string
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int int32 Bignum or Fixnum (as required) int int32 int integer
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long int64 Bignum long int64 long integer/string
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int uint32 Bignum or Fixnum (as required) uint uint32 int integer
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long uint64 Bignum ulong uint64 long integer/string
sfixed32 Always four bytes. int int32 Bignum or Fixnum (as required) int int32 int integer
sfixed64 Always eight bytes. int/long int64 Bignum long int64 long integer/string
bool boolean bool TrueClass/FalseClass bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode string String (UTF-8) string string String string
bytes May contain any arbitrary sequence of bytes. str []byte String (ASCII-8BIT) ByteString string ByteString string