Port Brave Sync server to Rust
Use SQLite for persistence and generate Rust protobuf bindings at build time. Add Docker image support for containerized deployment. Co-Authored-By: codex <[email protected]>
This commit is contained in:
commit
28826af88d
93 files changed
+11666
No files matched your search
@@ -0,0 +1,81 @@
|
||||
// Copyright 2018 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
option go_package = "./sync_pb";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "org.chromium.components.sync.protocol";
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
package sync_pb;
|
||||
|
||||
import "model_type_state.proto";
|
||||
import "entity_metadata.proto";
|
||||
|
||||
// Corresponds to a single bookmark id/metadata pair.
|
||||
message BookmarkMetadata {
|
||||
// Bookmark local id.
|
||||
optional int64 id = 1;
|
||||
|
||||
// Bookmarks sync metadata.
|
||||
optional EntityMetadata metadata = 2;
|
||||
}
|
||||
|
||||
// Sync proto to carry the sync metadata for the bookmarks model. It is used for
|
||||
// persisting and loading sync metadata from disk.
|
||||
message BookmarkModelMetadata {
|
||||
// Bookmark global metadata.
|
||||
optional ModelTypeState model_type_state = 1;
|
||||
|
||||
// A set of all bookmarks metadata.
|
||||
repeated BookmarkMetadata bookmarks_metadata = 2;
|
||||
|
||||
reserved 3;
|
||||
|
||||
reserved 4;
|
||||
|
||||
reserved 5;
|
||||
|
||||
// Indicates whether the reupload of bookmarks has been triggered such that
|
||||
// they include fields like |type|, |unique_position| and |parent_guid|, which
|
||||
// means that their sequence number has been increased (independently of
|
||||
// whether the commit has succeeded or even started).
|
||||
// TODO(crbug.com/1232951): remove this code when most of bookmarks are
|
||||
// reuploaded.
|
||||
optional bool bookmarks_hierarchy_fields_reuploaded = 6;
|
||||
|
||||
// Number of remote updates that were ignored because the parent folder could
|
||||
// not be determined since sync (bookmark sync) started (since initial sync,
|
||||
// including initial sync itself). Note that this excludes updates
|
||||
// representing changes (moves) to existing/tracked bookmarks (i.e. the parent
|
||||
// folder used to be known, but the new one specified in the update isn't).
|
||||
//
|
||||
// Only a minority of users should have a non-zero value, due to a) corrupt
|
||||
// data, reasons unknown; or b) permanent folders that were unsupported at the
|
||||
// time the update was received (either for the permanent folder itself or for
|
||||
// descendants). The absence of this field should be interpreted as 'unknown',
|
||||
// which roughly means the counter wasn't supported by the browser -M77 or
|
||||
// below- at the time sync was enabled (it also means, it will remain
|
||||
// 'unknown' until initial sync is exercised, e.g. sync disabled and
|
||||
// reenabled).
|
||||
optional int64 num_ignored_updates_due_to_missing_parent = 7;
|
||||
|
||||
// See field above. Among such ignored updates, this field tracks which was
|
||||
// the highest server version. This may be useful -in the future- to get a
|
||||
// sense of "time" (or, since versions are opaque to the client, at least a
|
||||
// notion of ordering with respect to other updates). The absence of this
|
||||
// field should be interpreted as 'unknown' and does not distinguish the
|
||||
// case between a) no updates ignored; and b) field wasn't supported at the
|
||||
// time the last update was ignored. To distinguish between these two, the
|
||||
// field above can be used.
|
||||
optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
|
||||
|
||||
// Indicates whether the count of remote updates during the latest initial
|
||||
// merge exceeded the bookmark limit. This field is mutually exclusive to all
|
||||
// the other fields and is managed completely by the processor.
|
||||
optional bool last_initial_merge_remote_updates_exceeded_limit = 9;
|
||||
}
|
||||
Reference in new issue
Block a user