diff --git a/Dockerfile_business b/Dockerfile_business index e3233b9..d7c7eff 100644 --- a/Dockerfile_business +++ b/Dockerfile_business @@ -13,7 +13,7 @@ WORKDIR /go/release ADD . . # 编译:把main.go编译成可执行的二进制文件,命名为egg_im -RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/business/main.go +RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg-im cmd/business/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" @@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app -COPY --from=build /go/release/egg_im ./egg_im +COPY --from=build /go/release/egg-im ./egg-im # 启动服务 # 优化内核参数 @@ -33,5 +33,5 @@ COPY --from=build /go/release/egg_im ./egg_im #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 #RUN sysctl -p -#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] -CMD ["./egg_im"] \ No newline at end of file +#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg-im"] +CMD ["./egg-im"] \ No newline at end of file diff --git a/Dockerfile_connect b/Dockerfile_connect index d638c69..187d08f 100644 --- a/Dockerfile_connect +++ b/Dockerfile_connect @@ -13,7 +13,7 @@ WORKDIR /go/release ADD . . # 编译:把main.go编译成可执行的二进制文件,命名为egg_im -RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/connect/main.go +RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg-im cmd/connect/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" @@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app -COPY --from=build /go/release/egg_im ./egg_im +COPY --from=build /go/release/egg-im ./egg-im # 启动服务 # 优化内核参数 @@ -33,5 +33,5 @@ COPY --from=build /go/release/egg_im ./egg_im #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 #RUN sysctl -p -#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] -CMD ["./egg_im"] \ No newline at end of file +#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg-im"] +CMD ["./egg-im"] \ No newline at end of file diff --git a/Dockerfile_logic b/Dockerfile_logic index 2a8d35e..b9a33ec 100644 --- a/Dockerfile_logic +++ b/Dockerfile_logic @@ -13,7 +13,7 @@ WORKDIR /go/release ADD . . # 编译:把main.go编译成可执行的二进制文件,命名为egg_im -RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/logic/main.go +RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg-im cmd/logic/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" @@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app -COPY --from=build /go/release/egg_im ./egg_im +COPY --from=build /go/release/egg-im ./egg-im # 启动服务 # 优化内核参数 @@ -33,5 +33,5 @@ COPY --from=build /go/release/egg_im ./egg_im #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 #RUN sysctl -p -#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] -CMD ["./egg_im"] \ No newline at end of file +#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg-im"] +CMD ["./egg-im"] \ No newline at end of file diff --git a/README.md b/README.md index 104692c..03e5acf 100644 --- a/README.md +++ b/README.md @@ -97,4 +97,4 @@ APP截图: 如果觉得项目对你有帮助,请支持一下 ![pay.png](https://upload-images.jianshu.io/upload_images/5760439-7aac91bc83c8735f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/310) ### github -https://github.com/alberliu/egg_im +https://github.com/alberliu/egg-im diff --git a/chart/Chart.yaml b/chart/Chart.yaml index c61a998..61adfbc 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: egg_im +name: egg-im description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. diff --git a/chart/templates/configmap/configmap-prd.yaml b/chart/templates/configmap/configmap-prd.yaml index faf428a..904a33d 100644 --- a/chart/templates/configmap/configmap-prd.yaml +++ b/chart/templates/configmap/configmap-prd.yaml @@ -4,7 +4,7 @@ metadata: name: config data: # 类属性键;每一个键都映射到一个简单的值,仅仅支持键值对,不支持嵌套 - mysql: "root:ZHIoscnfnuo123@@tcp(zhios123.rwlb.rds.aliyuncs.com:3306)/egg_im?charset=utf8&parseTime=true" + mysql: "root:ZHIoscnfnuo123@@tcp(zhios123.rwlb.rds.aliyuncs.com:3306)/egg-im?charset=utf8&parseTime=true" redisIP: "116.62.62.35:6379" redisPassword: "dengsanhu" pushRoomSubscribeNum: "100" diff --git a/chart/templates/configmap/configmap.yaml b/chart/templates/configmap/configmap.yaml index 8975d9d..bb7425c 100644 --- a/chart/templates/configmap/configmap.yaml +++ b/chart/templates/configmap/configmap.yaml @@ -4,7 +4,7 @@ metadata: name: config data: # 类属性键;每一个键都映射到一个简单的值,仅仅支持键值对,不支持嵌套 - mysql: "root:Fnuo123com@@tcp(119.23.182.117:3306)/egg_im?charset=utf8&parseTime=true" + mysql: "root:Fnuo123com@@tcp(119.23.182.117:3306)/egg-im?charset=utf8&parseTime=true" redisIP: "120.24.28.6:32572" redisPassword: "" pushRoomSubscribeNum: "100" diff --git a/chart/templates/role/cluster_role.yaml b/chart/templates/role/cluster_role.yaml index 1ccc28f..e274e1b 100644 --- a/chart/templates/role/cluster_role.yaml +++ b/chart/templates/role/cluster_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: pod-role - namespace: egg_im + namespace: egg-im rules: - apiGroups: - "" @@ -32,4 +32,4 @@ roleRef: subjects: - kind: ServiceAccount name: default - namespace: egg_im + namespace: egg-im diff --git a/cmd/business/main.go b/cmd/business/main.go index 91d213d..76d90c1 100644 --- a/cmd/business/main.go +++ b/cmd/business/main.go @@ -1,13 +1,13 @@ package main import ( - "egg_im/config" - "egg_im/internal/business/api" - "egg_im/pkg/db" - "egg_im/pkg/interceptor" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/urlwhitelist" + "egg-im/config" + "egg-im/internal/business/api" + "egg-im/pkg/db" + "egg-im/pkg/interceptor" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/urlwhitelist" "net" "net/http" _ "net/http/pprof" diff --git a/cmd/connect/main.go b/cmd/connect/main.go index 1aa0c94..72f0339 100644 --- a/cmd/connect/main.go +++ b/cmd/connect/main.go @@ -2,13 +2,13 @@ package main import ( "context" - "egg_im/config" - "egg_im/internal/connect" - "egg_im/pkg/db" - "egg_im/pkg/interceptor" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + "egg-im/config" + "egg-im/internal/connect" + "egg-im/pkg/db" + "egg-im/pkg/interceptor" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "google.golang.org/grpc" "net" "os" diff --git a/cmd/file/main.go b/cmd/file/main.go index b67e78f..e245dcb 100644 --- a/cmd/file/main.go +++ b/cmd/file/main.go @@ -1,8 +1,8 @@ package main import ( - "egg_im/pkg/logger" - "egg_im/pkg/util" + "egg-im/pkg/logger" + "egg-im/pkg/util" "net/http" "strconv" "strings" diff --git a/cmd/logic/main.go b/cmd/logic/main.go index ba18902..7bf3c2e 100644 --- a/cmd/logic/main.go +++ b/cmd/logic/main.go @@ -1,15 +1,15 @@ package main import ( - "egg_im/config" - "egg_im/internal/logic/api" - "egg_im/internal/logic/app" - "egg_im/internal/logic/proxy" - "egg_im/pkg/db" - "egg_im/pkg/interceptor" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/urlwhitelist" + "egg-im/config" + "egg-im/internal/logic/api" + "egg-im/internal/logic/app" + "egg-im/internal/logic/proxy" + "egg-im/pkg/db" + "egg-im/pkg/interceptor" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/urlwhitelist" "fmt" "net" "os" diff --git a/config/config.go b/config/config.go index 5d54f19..ad48240 100644 --- a/config/config.go +++ b/config/config.go @@ -1,13 +1,9 @@ package config import ( - "context" - "egg_im/pkg/k8sutil" - "egg_im/pkg/logger" + "egg-im/pkg/logger" "go.uber.org/zap" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "os" - "strconv" ) const ( @@ -21,7 +17,7 @@ const ( var ( NameSpace string = "egg-im" - MySQL string = "root:Fnuo123com@@tcp(119.23.182.117:3306)/egg_im?charset=utf8&parseTime=true&loc=Local" + MySQL string = "root:Fnuo123com@@tcp(119.23.182.117:3306)/egg-im?charset=utf8&parseTime=true&loc=Local" RedisIP string = "120.24.28.6:32572" RedisPassword string = "" @@ -31,26 +27,26 @@ var ( ) func Init() { - k8sClient, err := k8sutil.GetK8sClient() - if err != nil { - panic(err) - } - configmap, err := k8sClient.CoreV1().ConfigMaps(NameSpace).Get(context.TODO(), "config", metav1.GetOptions{}) - if err != nil { - panic(err) - } - - MySQL = configmap.Data["mysql"] - RedisIP = configmap.Data["redisIP"] - RedisPassword = configmap.Data["redisPassword"] - PushRoomSubscribeNum, _ = strconv.Atoi(configmap.Data["pushRoomSubscribeNum"]) - if PushRoomSubscribeNum == 0 { - panic("PushRoomSubscribeNum == 0") - } - PushAllSubscribeNum, _ = strconv.Atoi(configmap.Data["pushAllSubscribeNum"]) - if PushRoomSubscribeNum == 0 { - panic("PushAllSubscribeNum == 0") - } + //k8sClient, err := k8sutil.GetK8sClient() + //if err != nil { + // panic(err) + //} + //configmap, err := k8sClient.CoreV1().ConfigMaps(NameSpace).Get(context.TODO(), "config", metav1.GetOptions{}) + //if err != nil { + // panic(err) + //} + // + //MySQL = configmap.Data["mysql"] + //RedisIP = configmap.Data["redisIP"] + //RedisPassword = configmap.Data["redisPassword"] + //PushRoomSubscribeNum, _ = strconv.Atoi(configmap.Data["pushRoomSubscribeNum"]) + //if PushRoomSubscribeNum == 0 { + // panic("PushRoomSubscribeNum == 0") + //} + //PushAllSubscribeNum, _ = strconv.Atoi(configmap.Data["pushAllSubscribeNum"]) + //if PushRoomSubscribeNum == 0 { + // panic("PushAllSubscribeNum == 0") + //} LocalAddr = os.Getenv("POD_IP") + RPCListenAddr diff --git a/go.mod b/go.mod index a8cb11d..3068f9d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module egg_im +module egg-im go 1.19 diff --git a/internal/business/api/business_ext.go b/internal/business/api/business_ext.go index f6d8658..f4c7f30 100644 --- a/internal/business/api/business_ext.go +++ b/internal/business/api/business_ext.go @@ -2,16 +2,16 @@ package api import ( "context" - "egg_im/internal/business/app" - comm "egg_im/internal/business/comm" - "egg_im/internal/business/comm/utils" - "egg_im/internal/business/domain/user/repo" - friend2 "egg_im/internal/logic/domain/friend" - "egg_im/internal/logic/domain/group/model" - repo2 "egg_im/internal/logic/domain/group/repo" - "egg_im/internal/logic/domain/message/service" - "egg_im/pkg/grpclib" - "egg_im/pkg/pb" + "egg-im/internal/business/app" + comm "egg-im/internal/business/comm" + "egg-im/internal/business/comm/utils" + "egg-im/internal/business/domain/user/repo" + friend2 "egg-im/internal/logic/domain/friend" + "egg-im/internal/logic/domain/group/model" + repo2 "egg-im/internal/logic/domain/group/repo" + "egg-im/internal/logic/domain/message/service" + "egg-im/pkg/grpclib" + "egg-im/pkg/pb" "encoding/json" "errors" "strconv" diff --git a/internal/business/api/business_ext_test.go b/internal/business/api/business_ext_test.go index 9ac2cac..7dac57a 100644 --- a/internal/business/api/business_ext_test.go +++ b/internal/business/api/business_ext_test.go @@ -2,7 +2,7 @@ package api import ( "context" - "egg_im/pkg/pb" + "egg-im/pkg/pb" "fmt" "strconv" "testing" diff --git a/internal/business/api/business_int.go b/internal/business/api/business_int.go index 82be54e..970c657 100644 --- a/internal/business/api/business_int.go +++ b/internal/business/api/business_int.go @@ -2,8 +2,8 @@ package api import ( "context" - "egg_im/internal/business/app" - "egg_im/pkg/pb" + "egg-im/internal/business/app" + "egg-im/pkg/pb" ) type BusinessIntServer struct{} diff --git a/internal/business/api/business_int_test.go b/internal/business/api/business_int_test.go index b25f260..ec41df4 100644 --- a/internal/business/api/business_int_test.go +++ b/internal/business/api/business_int_test.go @@ -1,7 +1,7 @@ package api import ( - "egg_im/pkg/pb" + "egg-im/pkg/pb" "fmt" "testing" diff --git a/internal/business/app/auth_app.go b/internal/business/app/auth_app.go index 742677d..37eb7da 100644 --- a/internal/business/app/auth_app.go +++ b/internal/business/app/auth_app.go @@ -2,7 +2,7 @@ package app import ( "context" - "egg_im/internal/business/domain/user/service" + "egg-im/internal/business/domain/user/service" ) type authApp struct{} diff --git a/internal/business/app/user_app.go b/internal/business/app/user_app.go index ba0dde0..a52644f 100644 --- a/internal/business/app/user_app.go +++ b/internal/business/app/user_app.go @@ -2,9 +2,9 @@ package app import ( "context" - "egg_im/internal/business/comm/utils" - "egg_im/internal/business/domain/user/repo" - "egg_im/pkg/pb" + "egg-im/internal/business/comm/utils" + "egg-im/internal/business/domain/user/repo" + "egg-im/pkg/pb" "time" ) diff --git a/internal/business/comm/cloud_upload.go b/internal/business/comm/cloud_upload.go index c62a295..a2c73ba 100644 --- a/internal/business/comm/cloud_upload.go +++ b/internal/business/comm/cloud_upload.go @@ -2,7 +2,7 @@ package app import ( "context" - svc "egg_im/internal/business/comm/service" + svc "egg-im/internal/business/comm/service" "fmt" ) diff --git a/internal/business/comm/db/db_emoticon.go b/internal/business/comm/db/db_emoticon.go index fb43e44..77915c4 100644 --- a/internal/business/comm/db/db_emoticon.go +++ b/internal/business/comm/db/db_emoticon.go @@ -1,9 +1,9 @@ package db import ( - "egg_im/internal/business/comm/db/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/comm/db/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" ) type dbEmoticon struct{} diff --git a/internal/business/comm/db/db_sys_cfg.go b/internal/business/comm/db/db_sys_cfg.go index 18b9401..b2198a5 100644 --- a/internal/business/comm/db/db_sys_cfg.go +++ b/internal/business/comm/db/db_sys_cfg.go @@ -1,11 +1,11 @@ package db import ( - "egg_im/internal/business/comm/db/model" - "egg_im/internal/business/comm/md" - "egg_im/internal/business/comm/utils/logx" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/comm/db/model" + "egg-im/internal/business/comm/md" + "egg-im/internal/business/comm/utils/logx" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "fmt" ) diff --git a/internal/business/comm/db/db_user_push_for_jg.go b/internal/business/comm/db/db_user_push_for_jg.go index d66ecaa..a3d8711 100644 --- a/internal/business/comm/db/db_user_push_for_jg.go +++ b/internal/business/comm/db/db_user_push_for_jg.go @@ -1,11 +1,11 @@ package db import ( - "egg_im/internal/business/comm/db/model" - "egg_im/internal/business/comm/md" - "egg_im/internal/business/comm/utils/logx" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/comm/db/model" + "egg-im/internal/business/comm/md" + "egg-im/internal/business/comm/utils/logx" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "fmt" "github.com/jinzhu/gorm" ) diff --git a/internal/business/comm/db/model/emoticon.go b/internal/business/comm/db/model/emoticon.go index c24b3db..3458b03 100644 --- a/internal/business/comm/db/model/emoticon.go +++ b/internal/business/comm/db/model/emoticon.go @@ -1,6 +1,6 @@ package model -import "egg_im/pkg/pb" +import "egg-im/pkg/pb" type Emoticon struct { Id int64 diff --git a/internal/business/comm/service/qiniu/init.go b/internal/business/comm/service/qiniu/init.go index 1981392..073ba79 100644 --- a/internal/business/comm/service/qiniu/init.go +++ b/internal/business/comm/service/qiniu/init.go @@ -1,7 +1,7 @@ package qiniu import ( - "egg_im/internal/business/comm/utils" + "egg-im/internal/business/comm/utils" ) var ( diff --git a/internal/business/comm/service/qiniu/req_img_upload.go b/internal/business/comm/service/qiniu/req_img_upload.go index d801e62..4fe85d4 100644 --- a/internal/business/comm/service/qiniu/req_img_upload.go +++ b/internal/business/comm/service/qiniu/req_img_upload.go @@ -1,8 +1,8 @@ package qiniu import ( - "egg_im/internal/business/comm/md" - "egg_im/internal/business/comm/utils" + "egg-im/internal/business/comm/md" + "egg-im/internal/business/comm/utils" "time" "github.com/qiniu/api.v7/v7/auth/qbox" diff --git a/internal/business/comm/service/svc_file_upload.go b/internal/business/comm/service/svc_file_upload.go index 2dc1e39..9d18baf 100644 --- a/internal/business/comm/service/svc_file_upload.go +++ b/internal/business/comm/service/svc_file_upload.go @@ -2,10 +2,10 @@ package svc import ( "context" - "egg_im/internal/business/comm/md" - "egg_im/internal/business/comm/service/qiniu" - "egg_im/internal/business/comm/utils" - "egg_im/internal/business/comm/utils/logx" + "egg-im/internal/business/comm/md" + "egg-im/internal/business/comm/service/qiniu" + "egg-im/internal/business/comm/utils" + "egg-im/internal/business/comm/utils/logx" "errors" "fmt" "strings" diff --git a/internal/business/comm/service/svc_sys_cfg_get.go b/internal/business/comm/service/svc_sys_cfg_get.go index 5b3c116..bd532d4 100644 --- a/internal/business/comm/service/svc_sys_cfg_get.go +++ b/internal/business/comm/service/svc_sys_cfg_get.go @@ -1,9 +1,9 @@ package svc import ( - "egg_im/internal/business/comm/db" - "egg_im/internal/business/comm/md" - db2 "egg_im/pkg/db" + "egg-im/internal/business/comm/db" + "egg-im/internal/business/comm/md" + db2 "egg-im/pkg/db" "fmt" ) diff --git a/internal/business/domain/user/model/user.go b/internal/business/domain/user/model/user.go index 7fd1728..8134ec2 100644 --- a/internal/business/domain/user/model/user.go +++ b/internal/business/domain/user/model/user.go @@ -1,7 +1,7 @@ package model import ( - "egg_im/pkg/pb" + "egg-im/pkg/pb" "time" ) diff --git a/internal/business/domain/user/repo/auth_cache.go b/internal/business/domain/user/repo/auth_cache.go index d438510..61b8640 100644 --- a/internal/business/domain/user/repo/auth_cache.go +++ b/internal/business/domain/user/repo/auth_cache.go @@ -1,10 +1,10 @@ package repo import ( - "egg_im/internal/business/domain/user/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" - "egg_im/pkg/util" + "egg-im/internal/business/domain/user/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" + "egg-im/pkg/util" "encoding/json" "strconv" diff --git a/internal/business/domain/user/repo/auth_cache_test.go b/internal/business/domain/user/repo/auth_cache_test.go index 4f2857e..63a6c7d 100644 --- a/internal/business/domain/user/repo/auth_cache_test.go +++ b/internal/business/domain/user/repo/auth_cache_test.go @@ -1,7 +1,7 @@ package repo import ( - "egg_im/internal/business/domain/user/model" + "egg-im/internal/business/domain/user/model" "fmt" "testing" ) diff --git a/internal/business/domain/user/repo/auth_repo.go b/internal/business/domain/user/repo/auth_repo.go index 0ec18ae..3ca0608 100644 --- a/internal/business/domain/user/repo/auth_repo.go +++ b/internal/business/domain/user/repo/auth_repo.go @@ -1,6 +1,6 @@ package repo -import "egg_im/internal/business/domain/user/model" +import "egg-im/internal/business/domain/user/model" type authRepo struct{} diff --git a/internal/business/domain/user/repo/user_cache.go b/internal/business/domain/user/repo/user_cache.go index 271e369..ced4e43 100644 --- a/internal/business/domain/user/repo/user_cache.go +++ b/internal/business/domain/user/repo/user_cache.go @@ -1,9 +1,9 @@ package repo import ( - "egg_im/internal/business/domain/user/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/domain/user/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "strconv" "time" diff --git a/internal/business/domain/user/repo/user_dao.go b/internal/business/domain/user/repo/user_dao.go index 924b85d..dfc0f72 100644 --- a/internal/business/domain/user/repo/user_dao.go +++ b/internal/business/domain/user/repo/user_dao.go @@ -1,9 +1,9 @@ package repo import ( - "egg_im/internal/business/domain/user/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/domain/user/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "time" "github.com/jinzhu/gorm" diff --git a/internal/business/domain/user/repo/user_dao_test.go b/internal/business/domain/user/repo/user_dao_test.go index 08d2308..c1560b9 100644 --- a/internal/business/domain/user/repo/user_dao_test.go +++ b/internal/business/domain/user/repo/user_dao_test.go @@ -1,8 +1,8 @@ package repo import ( - "egg_im/internal/business/domain/user/model" - "egg_im/pkg/db" + "egg-im/internal/business/domain/user/model" + "egg-im/pkg/db" "fmt" "testing" ) diff --git a/internal/business/domain/user/repo/user_repo.go b/internal/business/domain/user/repo/user_repo.go index 25dc501..4f7c183 100644 --- a/internal/business/domain/user/repo/user_repo.go +++ b/internal/business/domain/user/repo/user_repo.go @@ -1,7 +1,7 @@ package repo import ( - "egg_im/internal/business/domain/user/model" + "egg-im/internal/business/domain/user/model" ) type userRepo struct{} diff --git a/internal/business/domain/user/service/auth.go b/internal/business/domain/user/service/auth.go index 06832d9..4a30884 100644 --- a/internal/business/domain/user/service/auth.go +++ b/internal/business/domain/user/service/auth.go @@ -2,13 +2,13 @@ package service import ( "context" - "egg_im/internal/business/comm/db" - "egg_im/internal/business/domain/user/model" - "egg_im/internal/business/domain/user/repo" - "egg_im/pkg/gerrors" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" - "egg_im/pkg/util" + "egg-im/internal/business/comm/db" + "egg-im/internal/business/domain/user/model" + "egg-im/internal/business/domain/user/repo" + "egg-im/pkg/gerrors" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" + "egg-im/pkg/util" "errors" "strconv" "time" diff --git a/internal/connect/api.go b/internal/connect/api.go index 983cae7..910eade 100644 --- a/internal/connect/api.go +++ b/internal/connect/api.go @@ -2,9 +2,9 @@ package connect import ( "context" - "egg_im/pkg/grpclib" - "egg_im/pkg/logger" - "egg_im/pkg/pb" + "egg-im/pkg/grpclib" + "egg-im/pkg/logger" + "egg-im/pkg/pb" "go.uber.org/zap" ) diff --git a/internal/connect/conn.go b/internal/connect/conn.go index 6f00359..918a6c2 100644 --- a/internal/connect/conn.go +++ b/internal/connect/conn.go @@ -3,11 +3,11 @@ package connect import ( "container/list" "context" - "egg_im/config" - "egg_im/pkg/grpclib" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + "egg-im/config" + "egg-im/pkg/grpclib" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "sync" "time" diff --git a/internal/connect/conn_manager.go b/internal/connect/conn_manager.go index 5997678..8697c2a 100644 --- a/internal/connect/conn_manager.go +++ b/internal/connect/conn_manager.go @@ -1,7 +1,7 @@ package connect import ( - "egg_im/pkg/pb" + "egg-im/pkg/pb" "sync" ) diff --git a/internal/connect/mq.go b/internal/connect/mq.go index ae77559..9929055 100644 --- a/internal/connect/mq.go +++ b/internal/connect/mq.go @@ -1,11 +1,11 @@ package connect import ( - "egg_im/config" - "egg_im/pkg/db" - "egg_im/pkg/logger" - "egg_im/pkg/mq" - "egg_im/pkg/pb" + "egg-im/config" + "egg-im/pkg/db" + "egg-im/pkg/logger" + "egg-im/pkg/mq" + "egg-im/pkg/pb" "time" "github.com/go-redis/redis" diff --git a/internal/connect/room.go b/internal/connect/room.go index f4d3cca..a0e6ed0 100644 --- a/internal/connect/room.go +++ b/internal/connect/room.go @@ -2,7 +2,7 @@ package connect import ( "container/list" - "egg_im/pkg/pb" + "egg-im/pkg/pb" "sync" ) diff --git a/internal/connect/tcp_server.go b/internal/connect/tcp_server.go index 8eae3f8..2edbcc7 100644 --- a/internal/connect/tcp_server.go +++ b/internal/connect/tcp_server.go @@ -2,9 +2,9 @@ package connect import ( "context" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "time" "go.uber.org/zap" diff --git a/internal/connect/ws_server.go b/internal/connect/ws_server.go index 462a55b..f81088f 100644 --- a/internal/connect/ws_server.go +++ b/internal/connect/ws_server.go @@ -1,8 +1,8 @@ package connect import ( - "egg_im/pkg/logger" - "egg_im/pkg/util" + "egg-im/pkg/logger" + "egg-im/pkg/util" "io" "net/http" "strings" diff --git a/internal/logic/api/logic_ext.go b/internal/logic/api/logic_ext.go index c1c751f..fdc6e23 100644 --- a/internal/logic/api/logic_ext.go +++ b/internal/logic/api/logic_ext.go @@ -2,10 +2,10 @@ package api import ( "context" - "egg_im/internal/business/comm/utils" - "egg_im/internal/logic/app" - "egg_im/pkg/grpclib" - "egg_im/pkg/pb" + "egg-im/internal/business/comm/utils" + "egg-im/internal/logic/app" + "egg-im/pkg/grpclib" + "egg-im/pkg/pb" "google.golang.org/protobuf/proto" ) diff --git a/internal/logic/api/logic_ext_test.go b/internal/logic/api/logic_ext_test.go index abb21ce..10481d7 100644 --- a/internal/logic/api/logic_ext_test.go +++ b/internal/logic/api/logic_ext_test.go @@ -2,11 +2,11 @@ package api import ( "context" - "egg_im/config" - "egg_im/internal/logic/domain/message/model" - "egg_im/pkg/db" - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/config" + "egg-im/internal/logic/domain/message/model" + "egg-im/pkg/db" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "github.com/jinzhu/gorm" "strconv" diff --git a/internal/logic/api/logic_int.go b/internal/logic/api/logic_int.go index 8ccdaa3..c4f81f2 100644 --- a/internal/logic/api/logic_int.go +++ b/internal/logic/api/logic_int.go @@ -2,9 +2,9 @@ package api import ( "context" - "egg_im/internal/logic/app" - "egg_im/pkg/logger" - "egg_im/pkg/pb" + "egg-im/internal/logic/app" + "egg-im/pkg/logger" + "egg-im/pkg/pb" ) type LogicIntServer struct{} diff --git a/internal/logic/api/logic_int_test.go b/internal/logic/api/logic_int_test.go index fd752ae..0c55183 100644 --- a/internal/logic/api/logic_int_test.go +++ b/internal/logic/api/logic_int_test.go @@ -2,9 +2,9 @@ package api import ( "context" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "testing" "time" diff --git a/internal/logic/app/device_app.go b/internal/logic/app/device_app.go index 39b15b0..58490ee 100644 --- a/internal/logic/app/device_app.go +++ b/internal/logic/app/device_app.go @@ -2,9 +2,9 @@ package app import ( "context" - devicedomain "egg_im/internal/logic/domain/device" - "egg_im/pkg/gerrors" - "egg_im/pkg/pb" + devicedomain "egg-im/internal/logic/domain/device" + "egg-im/pkg/gerrors" + "egg-im/pkg/pb" ) type deviceApp struct{} diff --git a/internal/logic/app/friend_app.go b/internal/logic/app/friend_app.go index 8201633..9dae08f 100644 --- a/internal/logic/app/friend_app.go +++ b/internal/logic/app/friend_app.go @@ -2,8 +2,8 @@ package app import ( "context" - frienddomain "egg_im/internal/logic/domain/friend" - "egg_im/pkg/pb" + frienddomain "egg-im/internal/logic/domain/friend" + "egg-im/pkg/pb" "time" ) diff --git a/internal/logic/app/group_app.go b/internal/logic/app/group_app.go index 5d2bc20..5422b89 100644 --- a/internal/logic/app/group_app.go +++ b/internal/logic/app/group_app.go @@ -3,11 +3,11 @@ package app import ( "context" "database/sql" - "egg_im/internal/logic/domain/group/model" - "egg_im/internal/logic/domain/group/repo" - "egg_im/pkg/db" - "egg_im/pkg/grpclib" - "egg_im/pkg/pb" + "egg-im/internal/logic/domain/group/model" + "egg-im/internal/logic/domain/group/repo" + "egg-im/pkg/db" + "egg-im/pkg/grpclib" + "egg-im/pkg/pb" "errors" "strings" ) diff --git a/internal/logic/app/message_app.go b/internal/logic/app/message_app.go index f837402..f355c6c 100644 --- a/internal/logic/app/message_app.go +++ b/internal/logic/app/message_app.go @@ -2,8 +2,8 @@ package app import ( "context" - "egg_im/internal/logic/domain/message/service" - "egg_im/pkg/pb" + "egg-im/internal/logic/domain/message/service" + "egg-im/pkg/pb" "time" "google.golang.org/protobuf/proto" diff --git a/internal/logic/app/room_app.go b/internal/logic/app/room_app.go index d35f722..54f85c5 100644 --- a/internal/logic/app/room_app.go +++ b/internal/logic/app/room_app.go @@ -2,8 +2,8 @@ package app import ( "context" - "egg_im/internal/logic/domain/room" - "egg_im/pkg/pb" + "egg-im/internal/logic/domain/room" + "egg-im/pkg/pb" ) type roomApp struct{} diff --git a/internal/logic/domain/device/device.go b/internal/logic/domain/device/device.go index 2dd09d2..475bb1d 100644 --- a/internal/logic/domain/device/device.go +++ b/internal/logic/domain/device/device.go @@ -1,7 +1,7 @@ package device import ( - "egg_im/pkg/pb" + "egg-im/pkg/pb" "time" ) diff --git a/internal/logic/domain/device/device_dao.go b/internal/logic/domain/device/device_dao.go index 656bfdf..a6c7418 100644 --- a/internal/logic/domain/device/device_dao.go +++ b/internal/logic/domain/device/device_dao.go @@ -1,9 +1,9 @@ package device import ( - "egg_im/internal/business/domain/user/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/domain/user/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "time" "github.com/jinzhu/gorm" diff --git a/internal/logic/domain/device/device_dao_test.go b/internal/logic/domain/device/device_dao_test.go index 3415b6c..1089ecc 100644 --- a/internal/logic/domain/device/device_dao_test.go +++ b/internal/logic/domain/device/device_dao_test.go @@ -1,7 +1,7 @@ package device import ( - "egg_im/pkg/db" + "egg-im/pkg/db" "fmt" "testing" ) diff --git a/internal/logic/domain/device/device_service.go b/internal/logic/domain/device/device_service.go index 0b25a97..12a3d35 100644 --- a/internal/logic/domain/device/device_service.go +++ b/internal/logic/domain/device/device_service.go @@ -2,12 +2,12 @@ package device import ( "context" - "egg_im/internal/business/comm/utils" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + "egg-im/internal/business/comm/utils" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "errors" "fmt" "time" diff --git a/internal/logic/domain/device/user_device_cache.go b/internal/logic/domain/device/user_device_cache.go index d32a3e5..16459b6 100644 --- a/internal/logic/domain/device/user_device_cache.go +++ b/internal/logic/domain/device/user_device_cache.go @@ -1,8 +1,8 @@ package device import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "strconv" "time" diff --git a/internal/logic/domain/friend/friend_repo.go b/internal/logic/domain/friend/friend_repo.go index 0039486..a33dba2 100644 --- a/internal/logic/domain/friend/friend_repo.go +++ b/internal/logic/domain/friend/friend_repo.go @@ -1,8 +1,8 @@ package friend import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "github.com/jinzhu/gorm" ) diff --git a/internal/logic/domain/friend/friend_service.go b/internal/logic/domain/friend/friend_service.go index bbf97a2..71a2af1 100644 --- a/internal/logic/domain/friend/friend_service.go +++ b/internal/logic/domain/friend/friend_service.go @@ -2,14 +2,14 @@ package friend import ( "context" - svc "egg_im/internal/business/comm/service" - "egg_im/internal/business/comm/utils" - "egg_im/internal/logic/domain/message/repo" - "egg_im/internal/logic/proxy" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + svc "egg-im/internal/business/comm/service" + "egg-im/internal/business/comm/utils" + "egg-im/internal/logic/domain/message/repo" + "egg-im/internal/logic/proxy" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "google.golang.org/protobuf/proto" "time" ) diff --git a/internal/logic/domain/group/model/group.go b/internal/logic/domain/group/model/group.go index ddbd572..ee6e3a5 100644 --- a/internal/logic/domain/group/model/group.go +++ b/internal/logic/domain/group/model/group.go @@ -3,14 +3,14 @@ package model import ( "context" "database/sql" - "egg_im/internal/logic/domain/message/repo" - "egg_im/internal/logic/proxy" - "egg_im/pkg/gerrors" - "egg_im/pkg/grpclib" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" - "egg_im/pkg/util" + "egg-im/internal/logic/domain/message/repo" + "egg-im/internal/logic/proxy" + "egg-im/pkg/gerrors" + "egg-im/pkg/grpclib" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" + "egg-im/pkg/util" "fmt" "strings" "time" diff --git a/internal/logic/domain/group/repo/group_cache.go b/internal/logic/domain/group/repo/group_cache.go index 30de16f..d344475 100644 --- a/internal/logic/domain/group/repo/group_cache.go +++ b/internal/logic/domain/group/repo/group_cache.go @@ -1,9 +1,9 @@ package repo import ( - "egg_im/internal/logic/domain/group/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/logic/domain/group/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "strconv" "time" diff --git a/internal/logic/domain/group/repo/group_complain_dao.go b/internal/logic/domain/group/repo/group_complain_dao.go index 0661014..75ca20a 100644 --- a/internal/logic/domain/group/repo/group_complain_dao.go +++ b/internal/logic/domain/group/repo/group_complain_dao.go @@ -1,9 +1,9 @@ package repo import ( - "egg_im/internal/logic/domain/group/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/logic/domain/group/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "github.com/jinzhu/gorm" ) diff --git a/internal/logic/domain/group/repo/group_dao.go b/internal/logic/domain/group/repo/group_dao.go index d1b777e..58162bf 100644 --- a/internal/logic/domain/group/repo/group_dao.go +++ b/internal/logic/domain/group/repo/group_dao.go @@ -1,9 +1,9 @@ package repo import ( - "egg_im/internal/logic/domain/group/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/logic/domain/group/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "github.com/jinzhu/gorm" ) diff --git a/internal/logic/domain/group/repo/group_repo.go b/internal/logic/domain/group/repo/group_repo.go index 0b1c766..de625c2 100644 --- a/internal/logic/domain/group/repo/group_repo.go +++ b/internal/logic/domain/group/repo/group_repo.go @@ -1,7 +1,7 @@ package repo import ( - "egg_im/internal/logic/domain/group/model" + "egg-im/internal/logic/domain/group/model" "strconv" ) diff --git a/internal/logic/domain/group/repo/group_user_repo.go b/internal/logic/domain/group/repo/group_user_repo.go index cc4d03f..13d0a29 100644 --- a/internal/logic/domain/group/repo/group_user_repo.go +++ b/internal/logic/domain/group/repo/group_user_repo.go @@ -1,11 +1,11 @@ package repo import ( - "egg_im/internal/business/comm/utils" - "egg_im/internal/logic/domain/group/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" - "egg_im/pkg/pb" + "egg-im/internal/business/comm/utils" + "egg-im/internal/logic/domain/group/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" + "egg-im/pkg/pb" "github.com/jinzhu/gorm" ) diff --git a/internal/logic/domain/message/md/push.go b/internal/logic/domain/message/md/push.go index 99e6f0f..7295efc 100644 --- a/internal/logic/domain/message/md/push.go +++ b/internal/logic/domain/message/md/push.go @@ -5,7 +5,7 @@ type PushParams struct { PushAlia string `json:"push_alia"` //推送别名 Title string `json:"title"` //标题 Content string `json:"content"` //内容 - PushType string `json:"push_type"` //推送类型`egg_im` + PushType string `json:"push_type"` //推送类型`egg-im` MessageType string `json:"message_type"` //消息类型`UNKNOWN、TEXT、FACE、VOICE、IMAGE、FILE、LOCATION、COMMAND、CUSTOM` SendUserNickname string `json:"send_user_nickname"` //消息发送者-会员昵称 SendUserAvatarUrl string `json:"send_user_avatar_url"` //消息发送者-会员头像 diff --git a/internal/logic/domain/message/model/message.go b/internal/logic/domain/message/model/message.go index 35fd16e..2c1247f 100644 --- a/internal/logic/domain/message/model/message.go +++ b/internal/logic/domain/message/model/message.go @@ -1,9 +1,9 @@ package model import ( - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/util" "strconv" "strings" "time" diff --git a/internal/logic/domain/message/model/sender.go b/internal/logic/domain/message/model/sender.go index e649cf0..a1f93ea 100644 --- a/internal/logic/domain/message/model/sender.go +++ b/internal/logic/domain/message/model/sender.go @@ -1,6 +1,6 @@ package model -import "egg_im/pkg/pb" +import "egg-im/pkg/pb" type Sender struct { SenderType pb.SenderType // 发送者类型,1:系统,2:用户,3:业务方 diff --git a/internal/logic/domain/message/repo/device_ack_repo.go b/internal/logic/domain/message/repo/device_ack_repo.go index 486d1da..0c41fc8 100644 --- a/internal/logic/domain/message/repo/device_ack_repo.go +++ b/internal/logic/domain/message/repo/device_ack_repo.go @@ -1,8 +1,8 @@ package repo import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "strconv" ) diff --git a/internal/logic/domain/message/repo/message_repo.go b/internal/logic/domain/message/repo/message_repo.go index cef6811..89e994c 100644 --- a/internal/logic/domain/message/repo/message_repo.go +++ b/internal/logic/domain/message/repo/message_repo.go @@ -1,10 +1,10 @@ package repo import ( - "egg_im/internal/business/comm/utils" - "egg_im/internal/logic/domain/message/model" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/internal/business/comm/utils" + "egg-im/internal/logic/domain/message/model" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "fmt" "time" ) diff --git a/internal/logic/domain/message/repo/message_repo_test.go b/internal/logic/domain/message/repo/message_repo_test.go index 6603bdb..e97d38c 100644 --- a/internal/logic/domain/message/repo/message_repo_test.go +++ b/internal/logic/domain/message/repo/message_repo_test.go @@ -1,7 +1,7 @@ package repo import ( - "egg_im/internal/logic/domain/message/model" + "egg-im/internal/logic/domain/message/model" "fmt" "testing" "time" diff --git a/internal/logic/domain/message/repo/seq_repo.go b/internal/logic/domain/message/repo/seq_repo.go index ae80dde..8f8702d 100644 --- a/internal/logic/domain/message/repo/seq_repo.go +++ b/internal/logic/domain/message/repo/seq_repo.go @@ -2,8 +2,8 @@ package repo import ( "database/sql" - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" ) const ( diff --git a/internal/logic/domain/message/service/app_push.go b/internal/logic/domain/message/service/app_push.go index 94cacb6..6fccbbc 100644 --- a/internal/logic/domain/message/service/app_push.go +++ b/internal/logic/domain/message/service/app_push.go @@ -3,10 +3,10 @@ package service import ( jg_push "code.fnuoos.com/go_rely_warehouse/zyos_go_jg_push.git/hdl" md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_jg_push.git/md" - svc "egg_im/internal/business/comm/service" - "egg_im/internal/business/comm/utils" - md3 "egg_im/internal/logic/domain/message/md" - "egg_im/pkg/logger" + svc "egg-im/internal/business/comm/service" + "egg-im/internal/business/comm/utils" + md3 "egg-im/internal/logic/domain/message/md" + "egg-im/pkg/logger" "fmt" "go.uber.org/zap" diff --git a/internal/logic/domain/message/service/device_ack.go b/internal/logic/domain/message/service/device_ack.go index 5e5eed0..87c0066 100644 --- a/internal/logic/domain/message/service/device_ack.go +++ b/internal/logic/domain/message/service/device_ack.go @@ -2,7 +2,7 @@ package service import ( "context" - "egg_im/internal/logic/domain/message/repo" + "egg-im/internal/logic/domain/message/repo" ) type deviceAckService struct{} diff --git a/internal/logic/domain/message/service/device_ack_test.go b/internal/logic/domain/message/service/device_ack_test.go index 41b878d..6cf6f0f 100644 --- a/internal/logic/domain/message/service/device_ack_test.go +++ b/internal/logic/domain/message/service/device_ack_test.go @@ -2,7 +2,7 @@ package service import ( "context" - "egg_im/pkg/db" + "egg-im/pkg/db" "fmt" "testing" ) diff --git a/internal/logic/domain/message/service/emoticon_service.go b/internal/logic/domain/message/service/emoticon_service.go index 98a1a3b..1b998c3 100644 --- a/internal/logic/domain/message/service/emoticon_service.go +++ b/internal/logic/domain/message/service/emoticon_service.go @@ -1,8 +1,8 @@ package service import ( - "egg_im/internal/business/comm/db" - "egg_im/pkg/pb" + "egg-im/internal/business/comm/db" + "egg-im/pkg/pb" ) func EmoticonList() ([]*pb.Emoticon, error) { diff --git a/internal/logic/domain/message/service/message_service.go b/internal/logic/domain/message/service/message_service.go index 658dfef..fe77c5b 100644 --- a/internal/logic/domain/message/service/message_service.go +++ b/internal/logic/domain/message/service/message_service.go @@ -2,20 +2,20 @@ package service import ( "context" - "egg_im/internal/business/comm/db" - svc "egg_im/internal/business/comm/service" - "egg_im/internal/business/comm/utils" - repo2 "egg_im/internal/business/domain/user/repo" - "egg_im/internal/logic/domain/message/md" - "egg_im/internal/logic/domain/message/model" - "egg_im/internal/logic/domain/message/repo" - "egg_im/internal/logic/proxy" - "egg_im/pkg/grpclib" - "egg_im/pkg/grpclib/picker" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" - "egg_im/pkg/util" + "egg-im/internal/business/comm/db" + svc "egg-im/internal/business/comm/service" + "egg-im/internal/business/comm/utils" + repo2 "egg-im/internal/business/domain/user/repo" + "egg-im/internal/logic/domain/message/md" + "egg-im/internal/logic/domain/message/model" + "egg-im/internal/logic/domain/message/repo" + "egg-im/internal/logic/proxy" + "egg-im/pkg/grpclib" + "egg-im/pkg/grpclib/picker" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" + "egg-im/pkg/util" "go.uber.org/zap" "google.golang.org/protobuf/proto" "strconv" @@ -225,7 +225,7 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser PushAlia: alia, Title: sender.Nickname, Content: pushContent, - PushType: "egg_im", + PushType: "egg-im", MessageType: req.MessageType.String(), SendUserNickname: sender.Nickname, SendUserAvatarUrl: sender.AvatarUrl, diff --git a/internal/logic/domain/message/service/message_service_test.go b/internal/logic/domain/message/service/message_service_test.go index 50cc966..3cca512 100644 --- a/internal/logic/domain/message/service/message_service_test.go +++ b/internal/logic/domain/message/service/message_service_test.go @@ -2,9 +2,9 @@ package service import ( "context" - md3 "egg_im/internal/logic/domain/message/md" - "egg_im/pkg/pb" - "egg_im/pkg/util" + md3 "egg-im/internal/logic/domain/message/md" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/proto" @@ -52,7 +52,7 @@ func Test_CommAddPush(t *testing.T) { PushAlia: "22255132_21702", Title: "测试", Content: "您收到一条新消息,来自会员[消息发送者-会员昵称],发送时间[时间],消息类型[消息类型],备注[备注]", - PushType: "egg_im", + PushType: "egg-im", MessageType: "text", SendUserNickname: "fsahfjs", SendUserAvatarUrl: "fafsd", diff --git a/internal/logic/domain/message/service/push.go b/internal/logic/domain/message/service/push.go index 8c66237..3b167b9 100644 --- a/internal/logic/domain/message/service/push.go +++ b/internal/logic/domain/message/service/push.go @@ -2,12 +2,12 @@ package service import ( "context" - "egg_im/pkg/gerrors" - "egg_im/pkg/grpclib" - "egg_im/pkg/logger" - "egg_im/pkg/mq" - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/gerrors" + "egg-im/pkg/grpclib" + "egg-im/pkg/logger" + "egg-im/pkg/mq" + "egg-im/pkg/pb" + "egg-im/pkg/util" "time" "go.uber.org/zap" diff --git a/internal/logic/domain/message/service/seq.go b/internal/logic/domain/message/service/seq.go index f6244ad..23dff16 100644 --- a/internal/logic/domain/message/service/seq.go +++ b/internal/logic/domain/message/service/seq.go @@ -2,7 +2,7 @@ package service import ( "context" - "egg_im/internal/logic/domain/message/repo" + "egg-im/internal/logic/domain/message/repo" ) type seqService struct{} diff --git a/internal/logic/domain/room/room_message_repo.go b/internal/logic/domain/room/room_message_repo.go index 498e489..7b1449e 100644 --- a/internal/logic/domain/room/room_message_repo.go +++ b/internal/logic/domain/room/room_message_repo.go @@ -1,10 +1,10 @@ package room import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "strconv" "time" diff --git a/internal/logic/domain/room/room_seq_repo.go b/internal/logic/domain/room/room_seq_repo.go index fe21a91..31316dc 100644 --- a/internal/logic/domain/room/room_seq_repo.go +++ b/internal/logic/domain/room/room_seq_repo.go @@ -1,8 +1,8 @@ package room import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" "fmt" ) diff --git a/internal/logic/domain/room/room_service.go b/internal/logic/domain/room/room_service.go index 8c2eead..7ef54d0 100644 --- a/internal/logic/domain/room/room_service.go +++ b/internal/logic/domain/room/room_service.go @@ -2,13 +2,13 @@ package room import ( "context" - "egg_im/pkg/gerrors" - "egg_im/pkg/grpclib/picker" - "egg_im/pkg/logger" - "egg_im/pkg/mq" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" - "egg_im/pkg/util" + "egg-im/pkg/gerrors" + "egg-im/pkg/grpclib/picker" + "egg-im/pkg/logger" + "egg-im/pkg/mq" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" + "egg-im/pkg/util" "time" "google.golang.org/protobuf/proto" diff --git a/internal/logic/domain/room/room_service_test.go b/internal/logic/domain/room/room_service_test.go index f15a60d..b345c56 100644 --- a/internal/logic/domain/room/room_service_test.go +++ b/internal/logic/domain/room/room_service_test.go @@ -1,8 +1,8 @@ package room import ( - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "testing" "time" diff --git a/internal/logic/proxy/device_proxy.go b/internal/logic/proxy/device_proxy.go index 9828683..ef19245 100644 --- a/internal/logic/proxy/device_proxy.go +++ b/internal/logic/proxy/device_proxy.go @@ -2,7 +2,7 @@ package proxy import ( "context" - "egg_im/pkg/pb" + "egg-im/pkg/pb" ) type deviceProxy interface { diff --git a/internal/logic/proxy/message_proxy.go b/internal/logic/proxy/message_proxy.go index 6550115..58c89f0 100644 --- a/internal/logic/proxy/message_proxy.go +++ b/internal/logic/proxy/message_proxy.go @@ -2,7 +2,7 @@ package proxy import ( "context" - "egg_im/pkg/pb" + "egg-im/pkg/pb" "time" "google.golang.org/protobuf/proto" diff --git a/pkg/db/db.go b/pkg/db/db.go index fe9794b..319a8f8 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -1,9 +1,9 @@ package db import ( - "egg_im/config" - "egg_im/pkg/logger" - "egg_im/pkg/util" + "egg-im/config" + "egg-im/pkg/logger" + "egg-im/pkg/util" "fmt" "github.com/go-redis/redis" diff --git a/pkg/gerrors/error.go b/pkg/gerrors/error.go index 096cad2..7831946 100644 --- a/pkg/gerrors/error.go +++ b/pkg/gerrors/error.go @@ -2,8 +2,8 @@ package gerrors import ( "context" - "egg_im/pkg/logger" - "egg_im/pkg/util" + "egg-im/pkg/logger" + "egg-im/pkg/util" "fmt" "go.uber.org/zap" diff --git a/pkg/grpclib/ctx.go b/pkg/grpclib/ctx.go index bdbda33..9fee8a7 100644 --- a/pkg/grpclib/ctx.go +++ b/pkg/grpclib/ctx.go @@ -2,8 +2,8 @@ package grpclib import ( "context" - "egg_im/pkg/gerrors" - "egg_im/pkg/logger" + "egg-im/pkg/gerrors" + "egg-im/pkg/logger" "strconv" "google.golang.org/grpc/metadata" diff --git a/pkg/grpclib/picker/addr_picker.go b/pkg/grpclib/picker/addr_picker.go index e833037..a3d1424 100644 --- a/pkg/grpclib/picker/addr_picker.go +++ b/pkg/grpclib/picker/addr_picker.go @@ -2,7 +2,7 @@ package picker import ( "context" - "egg_im/pkg/logger" + "egg-im/pkg/logger" "errors" "go.uber.org/zap" diff --git a/pkg/grpclib/resolver/k8s/k8s_resolver.go b/pkg/grpclib/resolver/k8s/k8s_resolver.go index 0584970..e85ab7c 100644 --- a/pkg/grpclib/resolver/k8s/k8s_resolver.go +++ b/pkg/grpclib/resolver/k8s/k8s_resolver.go @@ -2,7 +2,7 @@ package k8s import ( "context" - "egg_im/pkg/logger" + "egg-im/pkg/logger" "errors" "fmt" "go.uber.org/zap" diff --git a/pkg/grpclib/resolver/k8s_new/k8s_resolver.go b/pkg/grpclib/resolver/k8s_new/k8s_resolver.go index c326b3d..9d8dc74 100644 --- a/pkg/grpclib/resolver/k8s_new/k8s_resolver.go +++ b/pkg/grpclib/resolver/k8s_new/k8s_resolver.go @@ -2,7 +2,7 @@ package k8s import ( "context" - "egg_im/pkg/logger" + "egg-im/pkg/logger" "errors" "fmt" "go.uber.org/zap" diff --git a/pkg/interceptor/interceptor.go b/pkg/interceptor/interceptor.go index ef2cc7d..fbb49c0 100644 --- a/pkg/interceptor/interceptor.go +++ b/pkg/interceptor/interceptor.go @@ -2,11 +2,11 @@ package interceptor import ( "context" - "egg_im/pkg/gerrors" - "egg_im/pkg/grpclib" - "egg_im/pkg/logger" - "egg_im/pkg/pb" - "egg_im/pkg/rpc" + "egg-im/pkg/gerrors" + "egg-im/pkg/grpclib" + "egg-im/pkg/logger" + "egg-im/pkg/pb" + "egg-im/pkg/rpc" "strings" "go.uber.org/zap" diff --git a/pkg/mq/mq.go b/pkg/mq/mq.go index 6285fc5..2b90289 100644 --- a/pkg/mq/mq.go +++ b/pkg/mq/mq.go @@ -1,8 +1,8 @@ package mq import ( - "egg_im/pkg/db" - "egg_im/pkg/gerrors" + "egg-im/pkg/db" + "egg-im/pkg/gerrors" ) const ( diff --git a/pkg/proto/business.ext.proto b/pkg/proto/business.ext.proto index 2275284..84ce20a 100644 --- a/pkg/proto/business.ext.proto +++ b/pkg/proto/business.ext.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "common.ext.proto"; diff --git a/pkg/proto/business.int.proto b/pkg/proto/business.int.proto index 856a03c..f67b23e 100644 --- a/pkg/proto/business.int.proto +++ b/pkg/proto/business.int.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "common.ext.proto"; import "business.ext.proto"; diff --git a/pkg/proto/common.ext.proto b/pkg/proto/common.ext.proto index 7bacc84..7613c92 100644 --- a/pkg/proto/common.ext.proto +++ b/pkg/proto/common.ext.proto @@ -1,5 +1,5 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; message Empty{} \ No newline at end of file diff --git a/pkg/proto/connect.ext.proto b/pkg/proto/connect.ext.proto index 2a65bfa..985163d 100644 --- a/pkg/proto/connect.ext.proto +++ b/pkg/proto/connect.ext.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; enum PackageType { PT_UNKNOWN = 0; // 未知 diff --git a/pkg/proto/connect.int.proto b/pkg/proto/connect.int.proto index bc12769..36d4f0b 100644 --- a/pkg/proto/connect.int.proto +++ b/pkg/proto/connect.int.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "common.ext.proto"; import "connect.ext.proto"; diff --git a/pkg/proto/logic.ext.proto b/pkg/proto/logic.ext.proto index 2748569..c7e1853 100644 --- a/pkg/proto/logic.ext.proto +++ b/pkg/proto/logic.ext.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "common.ext.proto"; import "connect.ext.proto"; diff --git a/pkg/proto/logic.int.proto b/pkg/proto/logic.int.proto index 9631fb1..55c1d27 100644 --- a/pkg/proto/logic.int.proto +++ b/pkg/proto/logic.int.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "common.ext.proto"; import "connect.ext.proto"; diff --git a/pkg/proto/push.ext.proto b/pkg/proto/push.ext.proto index 56e8a48..8ed0307 100644 --- a/pkg/proto/push.ext.proto +++ b/pkg/proto/push.ext.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -option go_package = "egg_im/pkg/pb/"; +option go_package = "egg-im/pkg/pb/"; import "logic.ext.proto"; diff --git a/pkg/rpc/interceptor.go b/pkg/rpc/interceptor.go index 2ba436a..1da3610 100644 --- a/pkg/rpc/interceptor.go +++ b/pkg/rpc/interceptor.go @@ -2,7 +2,7 @@ package rpc import ( "context" - "egg_im/pkg/gerrors" + "egg-im/pkg/gerrors" "google.golang.org/grpc" ) diff --git a/pkg/rpc/rpc.go b/pkg/rpc/rpc.go index 6176ad5..d028395 100644 --- a/pkg/rpc/rpc.go +++ b/pkg/rpc/rpc.go @@ -2,9 +2,9 @@ package rpc import ( "context" - "egg_im/pkg/grpclib/picker" - "egg_im/pkg/grpclib/resolver/k8s" - "egg_im/pkg/pb" + "egg-im/pkg/grpclib/picker" + "egg-im/pkg/grpclib/resolver/k8s" + "egg-im/pkg/pb" "fmt" "google.golang.org/grpc/balancer/roundrobin" @@ -40,7 +40,7 @@ func GetBusinessIntClient() pb.BusinessIntClient { } func initLogicIntClient() { - conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg_im", "logic", "8000"), grpc.WithInsecure(), + conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "logic", "8000"), grpc.WithInsecure(), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name))) if err != nil { panic(err) @@ -49,7 +49,7 @@ func initLogicIntClient() { } func initConnectIntClient() { - conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg_im", "connect", "8000"), grpc.WithInsecure(), + conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "connect", "8000"), grpc.WithInsecure(), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, picker.AddrPickerName))) if err != nil { panic(err) @@ -60,7 +60,7 @@ func initConnectIntClient() { func initBusinessIntClient() { //conn, err := grpc.DialContext(context.TODO(), "127.0.0.1:8000", grpc.WithInsecure(), // grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name))) - conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg_im", "business", "8000"), grpc.WithInsecure(), + conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "business", "8000"), grpc.WithInsecure(), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name))) if err != nil { panic(err) diff --git a/pkg/util/json.go b/pkg/util/json.go index 5b8075a..c044a15 100644 --- a/pkg/util/json.go +++ b/pkg/util/json.go @@ -1,8 +1,8 @@ package util import ( - "egg_im/pkg/logger" - "egg_im/pkg/pb" + "egg-im/pkg/logger" + "egg-im/pkg/pb" "encoding/json" jsoniter "github.com/json-iterator/go" diff --git a/pkg/util/panic.go b/pkg/util/panic.go index af20626..4c0222e 100644 --- a/pkg/util/panic.go +++ b/pkg/util/panic.go @@ -1,7 +1,7 @@ package util import ( - "egg_im/pkg/logger" + "egg-im/pkg/logger" "fmt" "runtime" diff --git a/pkg/util/redis.go b/pkg/util/redis.go index f9996a5..080f71d 100644 --- a/pkg/util/redis.go +++ b/pkg/util/redis.go @@ -1,8 +1,8 @@ package util import ( - "egg_im/internal/business/comm/utils" - "egg_im/pkg/logger" + "egg-im/internal/business/comm/utils" + "egg-im/pkg/logger" "encoding/json" "time" diff --git a/pkg/util/uid.go b/pkg/util/uid.go index be5243d..1984df3 100644 --- a/pkg/util/uid.go +++ b/pkg/util/uid.go @@ -2,8 +2,8 @@ package util import ( "database/sql" - "egg_im/pkg/logger" - "egg_im/pkg/util/uid" + "egg-im/pkg/logger" + "egg-im/pkg/util/uid" ) var ( diff --git a/test/tcp_conn/main.go b/test/tcp_conn/main.go index e9d1dad..e352d17 100644 --- a/test/tcp_conn/main.go +++ b/test/tcp_conn/main.go @@ -1,8 +1,8 @@ package main import ( - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "log" "net" diff --git a/test/ws_conn/main.go b/test/ws_conn/main.go index e772709..05a939c 100644 --- a/test/ws_conn/main.go +++ b/test/ws_conn/main.go @@ -1,8 +1,8 @@ package main import ( - "egg_im/pkg/pb" - "egg_im/pkg/util" + "egg-im/pkg/pb" + "egg-im/pkg/util" "fmt" "io/ioutil" "net/http"