2018-08-26 19:15:48 +08:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018
|
|
|
|
// Mainflux
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
|
2018-05-11 05:53:25 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package mainflux;
|
|
|
|
|
2018-05-15 23:13:09 +08:00
|
|
|
service ThingsService {
|
2018-05-21 18:51:46 +08:00
|
|
|
rpc CanAccess(AccessReq) returns (ThingID) {}
|
|
|
|
rpc Identify(Token) returns (ThingID) {}
|
2018-05-11 05:53:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
service UsersService {
|
2018-05-21 18:51:46 +08:00
|
|
|
rpc Identify(Token) returns (UserID) {}
|
2018-05-11 05:53:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message AccessReq {
|
|
|
|
string token = 1;
|
2018-05-21 18:51:46 +08:00
|
|
|
uint64 chanID = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ThingID {
|
|
|
|
uint64 value = 1;
|
2018-05-11 05:53:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message Token {
|
|
|
|
string value = 1;
|
|
|
|
}
|
|
|
|
|
2018-05-21 18:51:46 +08:00
|
|
|
message UserID {
|
2018-05-11 05:53:25 +08:00
|
|
|
string value = 1;
|
|
|
|
}
|