2019-07-09 06:53:58 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2019-07-09 08:03:31 +00:00
|
|
|
package selfpass;
|
2019-07-09 06:53:58 +00:00
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
2019-07-09 08:03:31 +00:00
|
|
|
option go_package = "protobuf";
|
|
|
|
|
|
|
|
service Credentials {
|
|
|
|
rpc GetAllMetadata (SourceHostRequest) returns (stream Metadata);
|
2019-07-09 06:53:58 +00:00
|
|
|
rpc Get (IdRequest) returns (Credential);
|
|
|
|
rpc Create (CredentialRequest) returns (Credential);
|
|
|
|
rpc Update (UpdateRequest) returns (Credential);
|
2019-07-09 08:03:31 +00:00
|
|
|
rpc Delete (IdRequest) returns (SuccessResponse);
|
2019-07-09 06:53:58 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 08:03:31 +00:00
|
|
|
message SuccessResponse {
|
2019-07-09 06:53:58 +00:00
|
|
|
bool success = 1;
|
|
|
|
}
|
|
|
|
|
2019-07-09 08:03:31 +00:00
|
|
|
message SourceHostRequest {
|
2019-07-09 06:53:58 +00:00
|
|
|
string source_host = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IdRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
string id = 1;
|
|
|
|
CredentialRequest credential = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Metadata {
|
|
|
|
string id = 1;
|
|
|
|
google.protobuf.Timestamp created_at = 2;
|
|
|
|
google.protobuf.Timestamp updated_at = 3;
|
|
|
|
string primary = 4;
|
|
|
|
string source_host = 5;
|
|
|
|
string login_url = 6;
|
|
|
|
string tag = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Credential {
|
|
|
|
string id = 1;
|
|
|
|
google.protobuf.Timestamp created_at = 2;
|
|
|
|
google.protobuf.Timestamp updated_at = 3;
|
|
|
|
string primary = 4;
|
|
|
|
string username = 5;
|
|
|
|
string email = 6;
|
|
|
|
string password = 7;
|
|
|
|
string source_host = 8;
|
|
|
|
string login_url = 9;
|
|
|
|
string tag = 10;
|
|
|
|
string otp_secret = 11;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CredentialRequest {
|
|
|
|
string primary = 1;
|
|
|
|
string username = 2;
|
|
|
|
string email = 3;
|
|
|
|
string password = 4;
|
|
|
|
string source_host = 5;
|
|
|
|
string login_url = 6;
|
|
|
|
string tag = 7;
|
|
|
|
string otp_secret = 8;
|
|
|
|
}
|