Skip to content

Commit

Permalink
Go ethereum (#5171)
Browse files Browse the repository at this point in the history
* wallet: init service

Signed-off-by: Victor Login <batazor111@gmail.com>

* di: refactoing all golang-project

Signed-off-by: Victor Login <batazor111@gmail.com>

* wallet: add first smart contract

Signed-off-by: Victor Login <batazor111@gmail.com>

Signed-off-by: Victor Login <batazor111@gmail.com>
  • Loading branch information
batazor committed Oct 30, 2022
1 parent d986408 commit e92d4a8
Show file tree
Hide file tree
Showing 92 changed files with 2,512 additions and 2,642 deletions.
2 changes: 1 addition & 1 deletion .run/api.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ENTRIES>
</EXTENSION>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/api" />
<package value="github.com/batazor/shortlink/internal/services/api/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/api/api.go" />
<method v="2" />
Expand Down
21 changes: 0 additions & 21 deletions .run/auth.run.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .run/billing.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<env name="GRPC_SERVER_PORT" value="50054" />
</envs>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/billing" />
<package value="github.com/batazor/shortlink/internal/services/billing/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/billing/billing.go" />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/csi.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ENTRIES>
</EXTENSION>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/k8s/csi" />
<package value="github.com/batazor/shortlink/internal/services/csi/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/k8s/csi/csi.go" />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/link.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<env name="STORE_TYPE" value="postgres" />
</envs>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/link" />
<package value="github.com/batazor/shortlink/internal/services/link/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/link/link.go" />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/logger.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ENTRIES>
</EXTENSION>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/logger" />
<package value="github.com/batazor/shortlink/internal/services/logger/cmd" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/cmd/logger/logger.go" />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/metadata.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ENTRIES>
</EXTENSION>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/metadata" />
<package value="github.com/batazor/shortlink/internal/services/metadata/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/metadata/metadata.go" />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/bot.run.xml → .run/notify.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ENTRIES>
</EXTENSION>
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/notify" />
<package value="github.com/batazor/shortlink/internal/services/notify/cmd" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/cmd/notify/bot.go" />
<method v="2" />
Expand Down
11 changes: 11 additions & 0 deletions .run/wallet.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="wallet" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="core">
<module name="shortlink" />
<working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/internal/services/wallet/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/internal/services/wallet/cmd/wallet.go" />
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion .run/ws.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<module name="shortlink" />
<working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" />
<package value="github.com/batazor/shortlink/cmd/ws" />
<package value="github.com/batazor/shortlink/internal/services/ws/cmd" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/ws/ws.go" />
<method v="2" />
Expand Down
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,30 @@ made along with its context and consequences.

##### Services

| Service | Description | Language/Framework | Docs |
|------------------|-------------------------------------------------------------------------|---------------------------|---------------------------------------------|
| landing | Welcome page | JS/JQuery | |
| docs | Example blog | [Hugo](https://gohugo.io) | https://batazor.github.io/shortlink/ |
| next | UI service | JS/NextJS | [docs](./ui/next/README.md) |
| api | GateWay | Go | [docs](./docs/services/README.md) |
| link | Link service | Go | [docs](./docs/services/README.md) |
| newsletter | Newsletter service | Rust | |
| proxy | Proxy service for redirect to original URL | TypeScript | |
| bot | Telegram bot | JAVA | |
| billing | Billing service | Go | |
| ws | Webscoket service | Go | [docs](./internal/services/ws/README.md) |
| logger | Logger service | Go | |
| metadata | Parser site by API | Go | |
| notify | Send notify to smtp, slack, telegram | Go | |
| shortctl | Shortlink CLI | Go | [docs](./docs/shortctl.md) |
| csi | CSI example | Go | |
| ory/kratos | User management service | Go | [docs](https://www.ory.sh/kratos/docs/) |
| ory/hydra | OAuth 2.0 Provider | Go | [docs](https://www.ory.sh/keto/docs/) |
| shortdb | Custom database | Go | [docs](./pkg/shortdb/README.md) |
| shortdb-operator | Kubernetes Operator for [shortdb]((./pkg/shortdb/README.md)) database | Go | [docs](./pkg/shortdb-operator/README.md) |
| stats | Shortlink stats server | CPP | [docs](./internal/services/stats/README.md) |
| chat | Chat service | Elixir (Phoenix) | [docs](./internal/services/chat/README.md) |
| Service | Description | Language/Framework | Docs |
|------------------|--------------------------------------------------------------------------|---------------------------|----------------------------------------------|
| landing | Welcome page | JS/JQuery | |
| docs | Example blog | [Hugo](https://gohugo.io) | [docs](https://batazor.github.io/shortlink/) |
| next | UI service | JS/NextJS | [docs](./ui/next/README.md) |
| api | GateWay | Go | [docs](./docs/services/README.md) |
| link | Link service | Go | [docs](./docs/services/README.md) |
| newsletter | Newsletter service | Rust | |
| proxy | Proxy service for redirect to original URL | TypeScript | |
| bot | Telegram bot | JAVA | |
| billing | Billing service | Go | |
| wallet | Wallet service | Go (Solidity) | [docs](./internal/services/wallet/README.md) |
| ws | Webscoket service | Go | [docs](./internal/services/ws/README.md) |
| logger | Logger service | Go | |
| metadata | Parser site by API | Go | |
| notify | Send notify to smtp, slack, telegram | Go | |
| shortctl | Shortlink CLI | Go | [docs](./docs/shortctl.md) |
| csi | CSI example | Go | |
| ory/kratos | User management service | Go | [docs](https://www.ory.sh/kratos/docs/) |
| ory/hydra | OAuth 2.0 Provider | Go | [docs](https://www.ory.sh/keto/docs/) |
| shortdb | Custom database | Go | [docs](./pkg/shortdb/README.md) |
| shortdb-operator | Kubernetes Operator for [shortdb]((./pkg/shortdb/README.md)) database | Go | [docs](./pkg/shortdb-operator/README.md) |
| stats | Shortlink stats server | CPP | [docs](./internal/services/stats/README.md) |
| chat | Chat service | Elixir (Phoenix) | [docs](./internal/services/chat/README.md) |

### Run

Expand Down
2 changes: 1 addition & 1 deletion docs/shortctl-csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ shortctl-csi [flags]
--nodeid string node id
```

###### Auto generated by spf13/cobra on 18-Mar-2021
###### Auto generated by spf13/cobra on 30-Oct-2022
19 changes: 16 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/dgraph-io/dgo/v2 v2.2.0
github.com/edgedb/edgedb-go v0.13.0
github.com/elastic/go-elasticsearch/v8 v8.4.0
github.com/ethereum/go-ethereum v1.10.25
github.com/getsentry/sentry-go v0.14.0
github.com/go-chi/chi/v5 v5.0.7
github.com/go-chi/cors v1.2.1
Expand All @@ -31,7 +32,7 @@ require (
github.com/google/uuid v1.3.0
github.com/google/wire v0.5.0
github.com/graph-gophers/graphql-go v1.4.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0
github.com/heptiolabs/healthcheck v0.0.0-20211123025425-613501dd5deb
Expand All @@ -55,7 +56,7 @@ require (
github.com/srikrsna/protoc-gen-gotag v0.6.2
github.com/stretchr/testify v1.8.1
github.com/swaggo/swag v1.8.7
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/uptrace/opentelemetry-go-extra/otelsql v0.1.17
github.com/uptrace/opentelemetry-go-extra/otelzap v0.1.17
go.etcd.io/etcd/client/v3 v3.5.5
Expand Down Expand Up @@ -92,9 +93,11 @@ require (
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
github.com/cespare/xxhash v1.1.0 // indirect
Expand All @@ -108,6 +111,8 @@ require (
github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect
github.com/cucumber/messages-go/v16 v16.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/docker/cli v20.10.14+incompatible // indirect
Expand All @@ -123,10 +128,12 @@ require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.6 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand All @@ -135,12 +142,13 @@ require (
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gookit/color v1.5.2 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-memdb v1.3.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
Expand Down Expand Up @@ -194,12 +202,16 @@ require (
github.com/prometheus/procfs v0.8.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/smartystreets/assertions v1.0.0 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/twmb/murmur3 v1.1.5 // indirect
github.com/uptrace/opentelemetry-go-extra/otelutil v0.1.17 // indirect
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
Expand Down Expand Up @@ -232,6 +244,7 @@ require (
gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down

0 comments on commit e92d4a8

Please sign in to comment.