Skip to content

Commit

Permalink
feat: 增加根据权限获取管理员的功能 (#21)
Browse files Browse the repository at this point in the history
* 增加根据权限获取管理员功能

* 修改errorx位置

* feat:增加根据权限查找用户的功能

* 删除了配置
  • Loading branch information
Cbgogogog authored May 18, 2023
1 parent a42ea8c commit 60d591e
Show file tree
Hide file tree
Showing 14 changed files with 1,766 additions and 220 deletions.
12 changes: 12 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version = 1

[[analyzers]]
name = "go"
enabled = true

[analyzers.meta]
import_root = "github.com/xh-polaris/meowchat-notice-rpc"

[[transformers]]
name = "gofmt"
enabled = true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
etc
/etc/*
!/etc/system.yaml
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ADD go.mod .
ADD go.sum .
RUN go mod download
COPY . .
COPY ./etc /app/etc
RUN go build -ldflags="-s -w" -o /app/system-rpc .


Expand All @@ -25,5 +26,6 @@ ENV TZ Asia/Shanghai

WORKDIR /app
COPY --from=builder /app/system-rpc /app/system-rpc
COPY --from=builder /app/etc /app/etc

CMD ["./system-rpc", "-f", "etc/system.yaml"]
CMD ["./system-rpc", "-f", "etc/system.yaml"]
39 changes: 39 additions & 0 deletions etc/system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Name: system.rpc-test

ListenOn: 0.0.0.0:8080

Mode: test

Log:

Encoding: plain

Level: debug

Mongo:

URL:

DB:

CacheConf:

-

Host:

Redis:

Host:

Type:

Pass:

Prometheus:

Host: 0.0.0.0

Telemetry:

Endpoint:
15 changes: 10 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/xh-polaris/meowchat-system-rpc

go 1.19
go 1.18

require (
github.com/zeromicro/go-zero v1.5.2
go.mongodb.org/mongo-driver v1.11.4
google.golang.org/grpc v1.54.0
github.com/bytedance/mockey v1.1.1
github.com/smartystreets/goconvey v1.6.4
github.com/zeromicro/go-zero v1.4.3
go.mongodb.org/mongo-driver v1.11.1
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.30.0
)

Expand Down Expand Up @@ -35,9 +37,11 @@ require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -54,6 +58,7 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
Expand All @@ -67,7 +72,6 @@ require (
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
Expand All @@ -76,6 +80,7 @@ require (
go.uber.org/automaxprocs v1.5.2 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
Expand Down
920 changes: 910 additions & 10 deletions go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit 60d591e

Please sign in to comment.