src.dualinventive.com/go/assets-service/grpc/assets_service.proto

45 lines
787 B
Protocol Buffer

syntax = "proto3";
package assetsservice;
option go_package = "grpc";
service AssetsService {
rpc GetAssetByID (GetAssetByIDRequest) returns (GetAssetByIDResponse);
rpc GetAssets (GetAssetsRequest) returns (GetAssetsResponse);
}
message GetAssetByIDRequest {
uint64 assetID = 2;
}
message GetAssetByIDResponse {
Asset asset = 1;
}
message Asset {
uint64 assetID = 1;
string assetUID = 2;
string assetTypeCode = 3;
string assetSerialNr = 4;
}
message GetAssetsRequest {
uint64 page = 1;
uint64 per_page = 2;
enum SortCol {
ID_ASC = 0;
ID_DESC = 1;
UID_ASC = 2;
UID_DESC = 3;
SERIALNR_ASC = 4;
SERIALNR_DESC = 5;
}
SortCol sort = 3;
}
message GetAssetsResponse {
repeated Asset assets = 1;
uint64 count = 2;
}
message Empty {}