-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: middleware * feat: dynamicly add query params func * feat: common params * update: go mod tidy * feat: batchExec
- Loading branch information
1 parent
ace6164
commit 1d9d833
Showing
20 changed files
with
440 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Name: studio-api | ||
Host: 0.0.0.0 | ||
Port: 7002 | ||
Port: 9000 | ||
MaxBytes: 1073741824 | ||
Debug: | ||
Enable: false | ||
Auth: | ||
AccessSecret: "login_secret" | ||
AccessExpire: 7200 | ||
AccessExpire: 1800 | ||
File: | ||
UploadDir: "./upload/" |
33 changes: 33 additions & 0 deletions
33
server-v2/api/studio/internal/handler/gateway/batchexecngqlhandler.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
server-v2/api/studio/internal/handler/gateway/disonnecthandler.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
server-v2/api/studio/internal/logic/gateway/batchexecngqllogic.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package gateway | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/service" | ||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/svc" | ||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/types" | ||
|
||
"github.com/zeromicro/go-zero/core/logx" | ||
) | ||
|
||
type BatchExecNGQLLogic struct { | ||
logx.Logger | ||
ctx context.Context | ||
svcCtx *svc.ServiceContext | ||
} | ||
|
||
func NewBatchExecNGQLLogic(ctx context.Context, svcCtx *svc.ServiceContext) BatchExecNGQLLogic { | ||
return BatchExecNGQLLogic{ | ||
Logger: logx.WithContext(ctx), | ||
ctx: ctx, | ||
svcCtx: svcCtx, | ||
} | ||
} | ||
|
||
func (l *BatchExecNGQLLogic) BatchExecNGQL(req types.BatchExecNGQLParams) (*types.AnyResponse, error) { | ||
return service.NewGatewayService(l.ctx, l.svcCtx).BatchExecNGQL(&req) | ||
} |
29 changes: 29 additions & 0 deletions
29
server-v2/api/studio/internal/logic/gateway/disonnectlogic.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package gateway | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/service" | ||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/svc" | ||
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/types" | ||
|
||
"github.com/zeromicro/go-zero/core/logx" | ||
) | ||
|
||
type DisonnectLogic struct { | ||
logx.Logger | ||
ctx context.Context | ||
svcCtx *svc.ServiceContext | ||
} | ||
|
||
func NewDisonnectLogic(ctx context.Context, svcCtx *svc.ServiceContext) DisonnectLogic { | ||
return DisonnectLogic{ | ||
Logger: logx.WithContext(ctx), | ||
ctx: ctx, | ||
svcCtx: svcCtx, | ||
} | ||
} | ||
|
||
func (l *DisonnectLogic) Disonnect(req types.DisconnectDBParams) (*types.AnyResponse, error) { | ||
return service.NewGatewayService(l.ctx, l.svcCtx).DisconnectDB(&req) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.