go-sync

command module
v0.0.0-...-1b097d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

README

Brave Sync Server v2

A sync server implemented in go to communicate with Brave sync clients using components/sync/protocol/sync.proto. Current Chromium version for sync protocol buffer files used in this repo is Chromium 88.0.4324.96.

This server supports endpoints as bellow.

  • The POST /v2/command/ endpoint handles Commit and GetUpdates requests from sync clients and return corresponding responses both in protobuf format. Detailed of requests and their corresponding responses are defined in schema/protobuf/sync_pb/sync.proto. Sync clients are responsible for generating valid access tokens and present them to the server in the Authorization header of requests.

Currently we use dynamoDB as the datastore, the schema could be found in schema/dynamodb/table.json.

Developer Setup

  1. Install Go 1.19
  2. Install GolangCI-Lint
  3. Clone this repo
  4. Install protobuf protocol compiler if you need to compile protobuf files, which could be built using make protobuf.
  5. Build via make

Local development using Docker and DynamoDB Local

  1. Clone this repo
  2. Run make docker
  3. Run make docker-up
  4. For running unit tests, run make docker-test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
schema

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL