274 lines
6.0 KiB
Protocol Buffer
274 lines
6.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package keepassgo.v1;
|
|
|
|
option go_package = "git.julianfamily.org/keepassgo/proto/keepassgo/v1;keepassgov1";
|
|
|
|
service VaultService {
|
|
rpc GetSessionStatus(GetSessionStatusRequest) returns (GetSessionStatusResponse);
|
|
rpc OpenVault(OpenVaultRequest) returns (OpenVaultResponse);
|
|
rpc OpenRemoteVault(OpenRemoteVaultRequest) returns (OpenRemoteVaultResponse);
|
|
rpc SaveVault(SaveVaultRequest) returns (SaveVaultResponse);
|
|
rpc LockVault(LockVaultRequest) returns (LockVaultResponse);
|
|
rpc UnlockVault(UnlockVaultRequest) returns (UnlockVaultResponse);
|
|
rpc FindBrowserLogins(FindBrowserLoginsRequest) returns (FindBrowserLoginsResponse);
|
|
rpc GetBrowserCredential(GetBrowserCredentialRequest) returns (GetBrowserCredentialResponse);
|
|
rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse);
|
|
rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse);
|
|
rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse);
|
|
rpc RenameGroup(RenameGroupRequest) returns (RenameGroupResponse);
|
|
rpc DeleteGroup(DeleteGroupRequest) returns (DeleteGroupResponse);
|
|
rpc UpsertEntry(UpsertEntryRequest) returns (UpsertEntryResponse);
|
|
rpc DeleteEntry(DeleteEntryRequest) returns (DeleteEntryResponse);
|
|
rpc RestoreEntry(RestoreEntryRequest) returns (RestoreEntryResponse);
|
|
rpc ListEntryHistory(ListEntryHistoryRequest) returns (ListEntryHistoryResponse);
|
|
rpc RestoreEntryHistory(RestoreEntryHistoryRequest) returns (RestoreEntryHistoryResponse);
|
|
rpc ListTemplates(ListTemplatesRequest) returns (ListTemplatesResponse);
|
|
rpc UpsertTemplate(UpsertTemplateRequest) returns (UpsertTemplateResponse);
|
|
rpc DeleteTemplate(DeleteTemplateRequest) returns (DeleteTemplateResponse);
|
|
rpc InstantiateTemplate(InstantiateTemplateRequest) returns (InstantiateTemplateResponse);
|
|
rpc ListAttachments(ListAttachmentsRequest) returns (ListAttachmentsResponse);
|
|
rpc UploadAttachment(UploadAttachmentRequest) returns (UploadAttachmentResponse);
|
|
rpc DownloadAttachment(DownloadAttachmentRequest) returns (DownloadAttachmentResponse);
|
|
rpc DeleteAttachment(DeleteAttachmentRequest) returns (DeleteAttachmentResponse);
|
|
rpc CopyEntryField(CopyEntryFieldRequest) returns (CopyEntryFieldResponse);
|
|
rpc GeneratePassword(GeneratePasswordRequest) returns (GeneratePasswordResponse);
|
|
}
|
|
|
|
message GetSessionStatusRequest {}
|
|
|
|
message GetSessionStatusResponse {
|
|
bool locked = 1;
|
|
bool dirty = 2;
|
|
uint32 entry_count = 3;
|
|
uint32 pending_approval_count = 4;
|
|
uint32 token_pending_approval_count = 5;
|
|
}
|
|
|
|
message OpenVaultRequest {
|
|
string path = 1;
|
|
string password = 2;
|
|
bytes key_file_data = 3;
|
|
}
|
|
|
|
message OpenVaultResponse {}
|
|
|
|
message OpenRemoteVaultRequest {
|
|
string base_url = 1;
|
|
string path = 2;
|
|
string username = 3;
|
|
string password = 4;
|
|
string master_password = 5;
|
|
bytes key_file_data = 6;
|
|
}
|
|
|
|
message OpenRemoteVaultResponse {}
|
|
|
|
message SaveVaultRequest {}
|
|
|
|
message SaveVaultResponse {}
|
|
|
|
message LockVaultRequest {}
|
|
|
|
message LockVaultResponse {}
|
|
|
|
message UnlockVaultRequest {
|
|
string password = 1;
|
|
bytes key_file_data = 2;
|
|
}
|
|
|
|
message UnlockVaultResponse {}
|
|
|
|
message FindBrowserLoginsRequest {
|
|
string page_url = 1;
|
|
}
|
|
|
|
message BrowserLoginMatch {
|
|
string id = 1;
|
|
string title = 2;
|
|
string username = 3;
|
|
string url = 4;
|
|
repeated string path = 5;
|
|
string quality = 6;
|
|
}
|
|
|
|
message FindBrowserLoginsResponse {
|
|
repeated BrowserLoginMatch matches = 1;
|
|
}
|
|
|
|
message GetBrowserCredentialRequest {
|
|
string id = 1;
|
|
string page_url = 2;
|
|
}
|
|
|
|
message GetBrowserCredentialResponse {
|
|
string id = 1;
|
|
string username = 2;
|
|
string password = 3;
|
|
string url = 4;
|
|
}
|
|
|
|
message ListEntriesRequest {
|
|
repeated string path = 1;
|
|
string query = 2;
|
|
}
|
|
|
|
message Entry {
|
|
string id = 1;
|
|
string title = 2;
|
|
string username = 3;
|
|
string password = 4;
|
|
string url = 5;
|
|
string notes = 6;
|
|
repeated string tags = 7;
|
|
repeated string path = 8;
|
|
map<string, string> fields = 9;
|
|
}
|
|
|
|
message ListEntriesResponse {
|
|
repeated Entry entries = 1;
|
|
}
|
|
|
|
message ListGroupsRequest {
|
|
repeated string path = 1;
|
|
}
|
|
|
|
message ListGroupsResponse {
|
|
repeated string names = 1;
|
|
}
|
|
|
|
message CreateGroupRequest {
|
|
repeated string parent_path = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message CreateGroupResponse {}
|
|
|
|
message RenameGroupRequest {
|
|
repeated string path = 1;
|
|
string new_name = 2;
|
|
}
|
|
|
|
message RenameGroupResponse {}
|
|
|
|
message DeleteGroupRequest {
|
|
repeated string path = 1;
|
|
}
|
|
|
|
message DeleteGroupResponse {}
|
|
|
|
message UpsertEntryRequest {
|
|
Entry entry = 1;
|
|
}
|
|
|
|
message UpsertEntryResponse {
|
|
Entry entry = 1;
|
|
}
|
|
|
|
message DeleteEntryRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message DeleteEntryResponse {}
|
|
|
|
message RestoreEntryRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message RestoreEntryResponse {
|
|
Entry entry = 1;
|
|
}
|
|
|
|
message ListEntryHistoryRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message ListEntryHistoryResponse {
|
|
repeated Entry entries = 1;
|
|
}
|
|
|
|
message RestoreEntryHistoryRequest {
|
|
string id = 1;
|
|
uint32 history_index = 2;
|
|
}
|
|
|
|
message RestoreEntryHistoryResponse {
|
|
Entry entry = 1;
|
|
}
|
|
|
|
message ListTemplatesRequest {}
|
|
|
|
message ListTemplatesResponse {
|
|
repeated Entry templates = 1;
|
|
}
|
|
|
|
message UpsertTemplateRequest {
|
|
Entry template = 1;
|
|
}
|
|
|
|
message UpsertTemplateResponse {
|
|
Entry template = 1;
|
|
}
|
|
|
|
message DeleteTemplateRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message DeleteTemplateResponse {}
|
|
|
|
message InstantiateTemplateRequest {
|
|
string template_id = 1;
|
|
Entry overrides = 2;
|
|
}
|
|
|
|
message InstantiateTemplateResponse {
|
|
Entry entry = 1;
|
|
}
|
|
|
|
message ListAttachmentsRequest {
|
|
string entry_id = 1;
|
|
}
|
|
|
|
message ListAttachmentsResponse {
|
|
repeated string names = 1;
|
|
}
|
|
|
|
message UploadAttachmentRequest {
|
|
string entry_id = 1;
|
|
string name = 2;
|
|
bytes content = 3;
|
|
}
|
|
|
|
message UploadAttachmentResponse {}
|
|
|
|
message DownloadAttachmentRequest {
|
|
string entry_id = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message DownloadAttachmentResponse {
|
|
bytes content = 1;
|
|
}
|
|
|
|
message DeleteAttachmentRequest {
|
|
string entry_id = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message DeleteAttachmentResponse {}
|
|
|
|
message CopyEntryFieldRequest {
|
|
string id = 1;
|
|
string target = 2;
|
|
}
|
|
|
|
message CopyEntryFieldResponse {}
|
|
|
|
message GeneratePasswordRequest {
|
|
string profile = 1;
|
|
}
|
|
|
|
message GeneratePasswordResponse {
|
|
string password = 1;
|
|
}
|