mirror of https://github.com/mitchell/selfpass.git
Initial commit, add current proto from working projects
This commit is contained in:
commit
1b379b5c89
|
@ -0,0 +1,75 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package selfpass.credentials;
|
||||
|
||||
option go_package = "protobuf";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service CredentialService {
|
||||
rpc GetAllMetadata (GetAllMetadataRequest) returns (stream Metadata);
|
||||
rpc Get (IdRequest) returns (Credential);
|
||||
rpc Create (CredentialRequest) returns (Credential);
|
||||
rpc Update (UpdateRequest) returns (Credential);
|
||||
rpc Delete (IdRequest) returns (DeleteResponse);
|
||||
// rpc Dump (EmptyRequest) returns (DumpResponse);
|
||||
}
|
||||
|
||||
message DeleteResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message GetAllMetadataRequest {
|
||||
string source_host = 1;
|
||||
}
|
||||
|
||||
message IdRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message UpdateRequest {
|
||||
string id = 1;
|
||||
CredentialRequest credential = 2;
|
||||
}
|
||||
|
||||
message DumpResponse {
|
||||
bytes contents = 1;
|
||||
}
|
||||
|
||||
message EmptyRequest {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue