Create messaging package and move some packages into it (#1505)
This commit is contained in:
parent
1ab2e88bf5
commit
e28d4ef1a3
|
@ -15,7 +15,7 @@ checks:
|
|||
# Functions or methods that may be hard to understand. This is disabled as it doesn't appear to be a reliable metric.
|
||||
method-complexity:
|
||||
enabled: false
|
||||
# Classes defined with a high number of functions or methods.
|
||||
# Classes defined with a high number of functions or methods.
|
||||
method-count:
|
||||
config:
|
||||
threshold: 20
|
||||
|
@ -42,4 +42,4 @@ exclude_patterns:
|
|||
- static/
|
||||
- t/
|
||||
- mailserver/migrations
|
||||
- services/shhext/chat/migrations
|
||||
- messaging/chat/migrations
|
||||
|
|
2
Makefile
2
Makefile
|
@ -172,7 +172,7 @@ setup: setup-build setup-dev tidy ##@other Prepare project for development and b
|
|||
|
||||
generate: ##@other Regenerate assets and other auto-generated stuff
|
||||
go generate ./static ./static/chat_db_migrations ./static/mailserver_db_migrations ./t
|
||||
$(shell cd ./services/shhext/chat/protobuf && exec protoc --go_out=. ./*.proto)
|
||||
$(shell cd ./messaging/chat/protobuf && exec protoc --go_out=. ./*.proto)
|
||||
|
||||
prepare-release: clean-release
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
|
|
|
@ -19,13 +19,13 @@ import (
|
|||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/status-im/status-go/account"
|
||||
"github.com/status-im/status-go/mailserver/registry"
|
||||
"github.com/status-im/status-go/messaging/chat/crypto"
|
||||
"github.com/status-im/status-go/node"
|
||||
"github.com/status-im/status-go/notifications/push/fcm"
|
||||
"github.com/status-im/status-go/params"
|
||||
"github.com/status-im/status-go/rpc"
|
||||
"github.com/status-im/status-go/services/personal"
|
||||
"github.com/status-im/status-go/services/rpcfilters"
|
||||
"github.com/status-im/status-go/services/shhext/chat/crypto"
|
||||
"github.com/status-im/status-go/services/subscriptions"
|
||||
"github.com/status-im/status-go/services/typeddata"
|
||||
"github.com/status-im/status-go/signal"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/status-im/migrate/v4"
|
||||
"github.com/status-im/migrate/v4/database/sqlcipher"
|
||||
"github.com/status-im/migrate/v4/source/go_bindata"
|
||||
"github.com/status-im/status-go/services/shhext/chat/db/migrations"
|
||||
"github.com/status-im/status-go/messaging/chat/db/migrations"
|
||||
)
|
||||
|
||||
const exportDB = "SELECT sqlcipher_export('newdb')"
|
|
@ -12,9 +12,9 @@ import (
|
|||
"github.com/ethereum/go-ethereum/log"
|
||||
dr "github.com/status-im/doubleratchet"
|
||||
|
||||
"github.com/status-im/status-go/services/shhext/chat/crypto"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/crypto"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
)
|
||||
|
||||
var ErrSessionNotFound = errors.New("session not found")
|
|
@ -8,8 +8,8 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
)
|
||||
|
||||
const (
|
|
@ -13,9 +13,9 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"crypto/ecdsa"
|
||||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
)
|
||||
|
||||
type InstallationMetadata struct {
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
chatDB "github.com/status-im/status-go/services/shhext/chat/db"
|
||||
chatDB "github.com/status-im/status-go/messaging/chat/db"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"crypto/ecdsa"
|
||||
|
||||
dr "github.com/status-im/doubleratchet"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
)
|
||||
|
||||
// RatchetInfo holds the current ratchet state
|
|
@ -5,9 +5,9 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
)
|
||||
|
||||
const ProtocolVersion = 1
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
chatDB "github.com/status-im/status-go/services/shhext/chat/db"
|
||||
chatDB "github.com/status-im/status-go/messaging/chat/db"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
|
@ -8,11 +8,11 @@ import (
|
|||
"github.com/ethereum/go-ethereum/crypto"
|
||||
|
||||
dr "github.com/status-im/doubleratchet"
|
||||
ecrypto "github.com/status-im/status-go/services/shhext/chat/crypto"
|
||||
chatDB "github.com/status-im/status-go/services/shhext/chat/db"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
ecrypto "github.com/status-im/status-go/messaging/chat/crypto"
|
||||
chatDB "github.com/status-im/status-go/messaging/chat/db"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
)
|
||||
|
||||
// A safe max number of rows
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/ecies"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
)
|
||||
|
||||
const (
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/ecies"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
||||
"math/big"
|
||||
"sync"
|
|
@ -8,8 +8,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
chatDB "github.com/status-im/status-go/services/shhext/chat/db"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
chatDB "github.com/status-im/status-go/messaging/chat/db"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
|
@ -9,13 +9,13 @@ import (
|
|||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/status-im/status-go/services/shhext/chat"
|
||||
chatDB "github.com/status-im/status-go/services/shhext/chat/db"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/services/shhext/chat/protobuf"
|
||||
"github.com/status-im/status-go/services/shhext/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/chat"
|
||||
chatDB "github.com/status-im/status-go/messaging/chat/db"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat/protobuf"
|
||||
"github.com/status-im/status-go/messaging/chat/sharedsecret"
|
||||
"github.com/status-im/status-go/messaging/filter"
|
||||
"github.com/status-im/status-go/services/shhext/dedup"
|
||||
"github.com/status-im/status-go/services/shhext/filter"
|
||||
"github.com/status-im/status-go/services/shhext/whisperutils"
|
||||
"github.com/status-im/status-go/signal"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/ecies"
|
||||
"github.com/status-im/status-go/messaging/filter"
|
||||
"github.com/status-im/status-go/services/shhext/dedup"
|
||||
"github.com/status-im/status-go/services/shhext/filter"
|
||||
"github.com/status-im/status-go/services/shhext/whisperutils"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
||||
"github.com/stretchr/testify/suite"
|
|
@ -17,10 +17,10 @@ import (
|
|||
|
||||
"github.com/status-im/status-go/db"
|
||||
"github.com/status-im/status-go/mailserver"
|
||||
"github.com/status-im/status-go/services/shhext/chat"
|
||||
"github.com/status-im/status-go/services/shhext/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/chat"
|
||||
"github.com/status-im/status-go/messaging/chat/multidevice"
|
||||
"github.com/status-im/status-go/messaging/filter"
|
||||
"github.com/status-im/status-go/services/shhext/dedup"
|
||||
"github.com/status-im/status-go/services/shhext/filter"
|
||||
"github.com/status-im/status-go/services/shhext/mailservers"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
||||
)
|
||||
|
|
|
@ -13,11 +13,11 @@ import (
|
|||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/status-im/status-go/db"
|
||||
"github.com/status-im/status-go/messaging/filter"
|
||||
"github.com/status-im/status-go/messaging/publisher"
|
||||
"github.com/status-im/status-go/params"
|
||||
"github.com/status-im/status-go/services/shhext/dedup"
|
||||
"github.com/status-im/status-go/services/shhext/filter"
|
||||
"github.com/status-im/status-go/services/shhext/mailservers"
|
||||
"github.com/status-im/status-go/services/shhext/publisher"
|
||||
whisper "github.com/status-im/whisper/whisperv6"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package static embeds static (JS, HTML) resources right into the binaries
|
||||
package static
|
||||
|
||||
//go:generate go-bindata -pkg migrations -o ../../services/shhext/chat/db/migrations/bindata.go .
|
||||
//go:generate go-bindata -pkg migrations -o ../../messaging/chat/db/migrations/bindata.go .
|
||||
|
|
Loading…
Reference in New Issue