Skip to content

Commit

Permalink
Merge pull request #4637 from D4ryl00/chore/move-push-into-berty
Browse files Browse the repository at this point in the history
chore: move push notifications into berty
  • Loading branch information
d4ryl00-sudo committed Mar 22, 2024
2 parents 72a9d04 + ee3bd0e commit b845780
Show file tree
Hide file tree
Showing 156 changed files with 63,771 additions and 10,845 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ ARG VCS_REF
ARG VERSION

# build
FROM golang:1.19-alpine as builder
RUN apk add --no-cache git gcc musl-dev make
ENV GO111MODULE=on
FROM golang:1.20-alpine as builder
RUN apk add --no-cache git gcc musl-dev make binutils-gold
# CGO_CFLAGS="-D_LARGEFILE64_SOURCE" to fix a bug: https://github.com/mattn/go-sqlite3/issues/1164#issuecomment-1635253695
ENV GO111MODULE=on CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
WORKDIR /go/src/berty.tech/berty
COPY go.* ./
RUN go mod download
Expand Down
10 changes: 5 additions & 5 deletions api/accounttypes/accounttypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";
package berty.account.v1;

import "gogoproto/gogo.proto";
import "pushtypes/pushtypes.proto";
import "pushtypes/bertypushtypes.proto";
import "protocoltypes.proto";

option go_package = "berty.tech/berty/go/pkg/accounttypes";
Expand Down Expand Up @@ -360,17 +360,17 @@ message NetworkConfigGetPreset {
message PushReceive {
message Request {
string payload = 1;
weshnet.push.v1.PushServiceTokenType token_type = 2;
berty.push.v1.PushServiceTokenType token_type = 2;
}
message Reply {
weshnet.push.v1.DecryptedPush push_data = 1;
weshnet.push.v1.FormatedPush push = 2;
berty.push.v1.DecryptedPush push_data = 1;
berty.push.v1.FormatedPush push = 2;
}
}

message PushPlatformTokenRegister {
message Request {
weshnet.protocol.v1.PushServiceReceiver receiver = 1;
push.v1.PushServiceReceiver receiver = 1;
}
message Reply {}
}
29 changes: 29 additions & 0 deletions api/berty/errcode.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ enum ErrCode {
ErrTestEchoRecv = 2402;
ErrTestEchoSend = 2403;

// Services Auth

ErrServicesAuth = 4000;
ErrServicesAuthNotInitialized = 4001;
ErrServicesAuthWrongState = 4002;
ErrServicesAuthInvalidResponse = 4003;
ErrServicesAuthServer = 4004;
ErrServicesAuthCodeChallenge = 4005;
ErrServicesAuthServiceInvalidToken = 4006;
ErrServicesAuthServiceNotSupported = 4007;
ErrServicesAuthUnknownToken = 4008;
ErrServicesAuthInvalidURL = 4009;


// -----------------
// CLI
// -----------------
Expand Down Expand Up @@ -171,6 +185,21 @@ enum ErrCode {
ErrBertyAccountCreationFailed = 5016;
ErrBertyAccountUpdateFailed = 5017;
ErrAppStorageNotSupported = 5018;

// Push Services

ErrPush = 6000;
ErrPushWrongAccount = 6001;
ErrPushUnableToDecrypt = 6002;
ErrPushInvalidPayload = 6003;
ErrPushInvalidServerConfig = 6004;
ErrPushMissingBundleID = 6005;
ErrPushUnknownDestination = 6006;
ErrPushProvider = 6007;
ErrPushUnknownProvider = 6008;
ErrNoProvidersConfigured = 6009;
ErrInvalidPrivateKey = 6010;
ErrPushServerNotFound = 6011;
}

message ErrDetails { repeated ErrCode codes = 1; }
4 changes: 3 additions & 1 deletion api/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ deps:
- remote: buf.build
owner: berty
repository: weshnet
commit: a6fd534fea63469abf6b659d2415a472
commit: a01c754f0f5441d4b4400796c7d170a2
digest: shake256:6ddef4e53054f1203f5db37af95de583811bc9a03adadba1db39e444ccacf2d80e3cbb0bf062cef4264d7c05b1ab24775d79a7561faada41584d560c8ea9f2ad
- remote: buf.build
owner: gogo
repository: protobuf
commit: 5461a3dfa9d941da82028ab185dc2a0e
digest: shake256:37c7c75224982038cb1abf45b481ef06716c1f806ffaa162018d0df092bd11a2a9b62c2d0dc0a2ae43beff86b6014fc0eb8c594ffd84d52ade4b08fca901eadc

0 comments on commit b845780

Please sign in to comment.