Skip to content

Commit

Permalink
upgrade go-zero to v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwan committed Feb 10, 2022
1 parent 8efe28f commit 4c74dc6
Show file tree
Hide file tree
Showing 114 changed files with 199 additions and 211 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Data syncing in golang for ClickHouse.


based on [go-zero](https://github.com/tal-tech/go-zero)
based on [go-zero](https://github.com/zeromicro/go-zero)

### ARCH

Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/choperator/choperator.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package choperator

import (
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/util"
"github.com/zeromicro/cds/pkg/ckgroup"
ckcfg "github.com/zeromicro/cds/pkg/ckgroup/config"
"github.com/zeromicro/go-zero/core/logx"
)

type ChOperator interface {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/choperator/chproxyoperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/util"
"github.com/zeromicro/go-zero/core/logx"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/choperator/ckgroupoperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package choperator
import (
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/util"
"github.com/zeromicro/cds/pkg/ckgroup"
"github.com/zeromicro/go-zero/core/logx"
)

type (
Expand Down
4 changes: 2 additions & 2 deletions cmd/dm/cmd/sync/config/config.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package config

import (
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/prometheus"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/prometheus"
)

type (
Expand Down
4 changes: 2 additions & 2 deletions cmd/dm/cmd/sync/dm.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"

_ "github.com/go-sql-driver/mysql"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/cds/cmd/dm/module"
"github.com/zeromicro/cds/pkg/strx"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/core/logx"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/client/v3/concurrency"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/data/mongo2clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strings"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/choperator"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/cds/cmd/dm/util"
"github.com/zeromicro/cds/pkg/mongodbx"
"github.com/zeromicro/go-zero/core/logx"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/data/mysql2clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"strings"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/choperator"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/cds/cmd/dm/util"
"github.com/zeromicro/go-zero/core/logx"
)

type (
Expand Down
4 changes: 2 additions & 2 deletions cmd/dm/module/dmprometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package module

import (
prometheus2 "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/prometheus"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/prometheus"
)

type DmPrometheus struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/module/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strconv"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/go-zero/core/logx"
"go.etcd.io/etcd/client/v3/concurrency"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/module/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"errors"
"regexp"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/choperator"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/cds/cmd/dm/data"
"github.com/zeromicro/cds/pkg/mongodbx"
"github.com/zeromicro/go-zero/core/logx"
"go.etcd.io/etcd/client/v3/concurrency"
"gopkg.in/mgo.v2/bson"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/util/clickhousetypeconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)

func RepairData(mp map[string]interface{}, name2Type map[string]string) ([]interface{}, string, int, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dm/util/mysqltypeconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion cmd/galaxy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Galaxy控制台简介

本模块基于[go-zero](https://github.com/tal-tech/go-zero)构建,是一个简洁的数据同步后台管理系统。
本模块基于[go-zero](https://github.com/zeromicro/go-zero)构建,是一个简洁的数据同步后台管理系统。

简单来说,它可以很方便的在Clickhouse建表、全量同步数据和增量同步数据。

Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/galaxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"flag"
"fmt"

"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/rest"
"github.com/zeromicro/cds/cmd/galaxy/internal/config"
"github.com/zeromicro/cds/cmd/galaxy/internal/handler"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)

var configFile = flag.String("f", "etc/galaxy-api.yaml", "the config file")
Expand Down
2 changes: 1 addition & 1 deletion cmd/galaxy/internal/clients/dmclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/dm/cmd/sync/config"
"github.com/zeromicro/cds/pkg/strx"
"github.com/zeromicro/go-zero/core/logx"
clientv3 "go.etcd.io/etcd/client/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/galaxy/internal/clients/rtuclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"time"

"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/cds/cmd/rtu/cmd/sync/config"
"github.com/zeromicro/cds/pkg/strx"
"github.com/zeromicro/go-zero/core/logx"
clientv3 "go.etcd.io/etcd/client/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/galaxy/internal/config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package config

import "github.com/tal-tech/go-zero/rest"
import "github.com/zeromicro/go-zero/rest"

type Config struct {
rest.RestConf
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/addhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func addHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/connectoraddhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func connectorAddHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/connectordeletehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func connectorDeleteHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/connectorlisthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func connectorListHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/databaselisthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func databaseListHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/dmaddhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func dmAddHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/dmdeletehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func dmDeleteHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/dmlisthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func dmListHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/dmredohandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func dmRedoHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/dmstophandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func dmStopHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/execsqlhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func execSqlHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/generatecreatesqlhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func generateCreateSqlHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
2 changes: 1 addition & 1 deletion cmd/galaxy/internal/handler/getuserinfohandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/rest/httpx"
"github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)

func getUserInfoHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions cmd/galaxy/internal/handler/listtablehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package handler
import (
"net/http"

"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
logic2 "github.com/zeromicro/cds/cmd/galaxy/internal/logic"
"github.com/zeromicro/cds/cmd/galaxy/internal/svc"
"github.com/zeromicro/cds/cmd/galaxy/internal/types"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)

func listTableHandler(ctx *svc.ServiceContext) http.HandlerFunc {
Expand Down
Loading

0 comments on commit 4c74dc6

Please sign in to comment.