Skip to content

Commit

Permalink
feature: add core-services modules (erda-project#537)
Browse files Browse the repository at this point in the history
* feature: add core-services modules

* feature: move qa apim gittar-adaptor to dop

* feature: sync qa to dop

* deal conflict

* delete core-services temporarily

* delete qa gittar-adaptor apim api

Co-authored-by: sfwn <[email protected]>
Co-authored-by: erda-bot <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2021
1 parent 66f47d6 commit b8ddff0
Show file tree
Hide file tree
Showing 368 changed files with 1,522 additions and 3,138 deletions.
2 changes: 1 addition & 1 deletion apistructs/approve.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type ApproveUpdateRequest struct {
Approver string `json:"approver"`
}

// ApproveUpdateResponse PUT /api/approves/{approveId} 更新审批响应结构
// ApproveUpdateResponse PUT /api/approves/{approveId} 更新审批响应结构
type ApproveUpdateResponse struct {
Header
Data interface{} `json:"data"`
Expand Down
2 changes: 1 addition & 1 deletion bundle/api_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type CreateAPIAssetResponse struct {

// CreateAPIAsset 创建 API Asset
func (b *Bundle) CreateAPIAsset(req apistructs.APIAssetCreateRequest) (apistructs.APIAssetID, error) {
host, err := b.urls.APIM()
host, err := b.urls.DOP()
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions bundle/api_asset_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type SearchAPIOperationHandle interface {
// SearchAPIOperations 从集市中搜索 API 列表
// keyword 可以为接口名(对应 oas3 文件中的 operationId) 或路径
func (b *Bundle) SearchAPIOperations(orgID uint64, userID string, keyword string) ([]*apistructs.APIOperationSummary, error) {
host, err := b.urls.APIM()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -81,7 +81,7 @@ func (b *Bundle) SearchAPIOperations(orgID uint64, userID string, keyword string
// GetAPIOperation 查询 operation 详情
// id: apistructs.APIOperationSummary{}.ID
func (b *Bundle) GetAPIOperation(orgID uint64, userID string, id uint64) (*apistructs.APIOperation, error) {
host, err := b.urls.APIM()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions bundle/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

// CreateTestAPI 创建API 测试
func (b *Bundle) CreateTestAPI(req apistructs.ApiTestInfo) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -46,7 +46,7 @@ func (b *Bundle) CreateTestAPI(req apistructs.ApiTestInfo) error {

// UpdateTestAPI 更新 API 测试
func (b *Bundle) UpdateTestAPI(req apistructs.ApiTestInfo) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -68,7 +68,7 @@ func (b *Bundle) UpdateTestAPI(req apistructs.ApiTestInfo) error {

// DeleteTestAPI 删除 API 测试
func (b *Bundle) DeleteTestAPI(apiID int64) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -89,7 +89,7 @@ func (b *Bundle) DeleteTestAPI(apiID int64) error {

// GetTestAPI 获取指定 API 测试信息
func (b *Bundle) GetTestAPI(apiID int64) (*apistructs.ApiTestInfo, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -110,7 +110,7 @@ func (b *Bundle) GetTestAPI(apiID int64) (*apistructs.ApiTestInfo, error) {

// ListTestAPI 获取 API 测试列表
func (b *Bundle) ListTestAPI(usecaseID int64) ([]*apistructs.ApiTestInfo, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand Down
24 changes: 12 additions & 12 deletions bundle/autotest_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

// CreateTestPlansV2Step 新建测试计划步骤
func (b *Bundle) CreateTestPlansV2Step(req apistructs.TestPlanV2StepAddRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -46,7 +46,7 @@ func (b *Bundle) CreateTestPlansV2Step(req apistructs.TestPlanV2StepAddRequest)

// DeleteTestPlansV2Step 删除测试计划步骤
func (b *Bundle) DeleteTestPlansV2Step(req apistructs.TestPlanV2StepDeleteRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -68,7 +68,7 @@ func (b *Bundle) DeleteTestPlansV2Step(req apistructs.TestPlanV2StepDeleteReques

// MoveTestPlansV2Step 移动测试计划步骤
func (b *Bundle) MoveTestPlansV2Step(req apistructs.TestPlanV2StepUpdateRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -90,7 +90,7 @@ func (b *Bundle) MoveTestPlansV2Step(req apistructs.TestPlanV2StepUpdateRequest)

// PagingTestPlansV2 分页查询测试计划列表
func (b *Bundle) PagingTestPlansV2(req apistructs.TestPlanV2PagingRequest) (*apistructs.TestPlanV2PagingResponseData, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -112,7 +112,7 @@ func (b *Bundle) PagingTestPlansV2(req apistructs.TestPlanV2PagingRequest) (*api

// CreateTestPlanV2 创建测试计划
func (b *Bundle) CreateTestPlanV2(req apistructs.TestPlanV2CreateRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -134,7 +134,7 @@ func (b *Bundle) CreateTestPlanV2(req apistructs.TestPlanV2CreateRequest) error

// UpdateTestPlanV2 更新测试计划
func (b *Bundle) UpdateTestPlanV2(req apistructs.TestPlanV2UpdateRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -156,7 +156,7 @@ func (b *Bundle) UpdateTestPlanV2(req apistructs.TestPlanV2UpdateRequest) error

// GetTestPlanV2 获取测试计划详情
func (b *Bundle) GetTestPlanV2(testPlanID uint64) (*apistructs.TestPlanV2GetResponse, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -178,7 +178,7 @@ func (b *Bundle) GetTestPlanV2(testPlanID uint64) (*apistructs.TestPlanV2GetResp

// GetTestPlanV2 获取测试计划步骤
func (b *Bundle) GetTestPlanV2Step(stepID uint64) (*apistructs.TestPlanV2Step, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -200,7 +200,7 @@ func (b *Bundle) GetTestPlanV2Step(stepID uint64) (*apistructs.TestPlanV2Step, e

// GetTestPlanV2 获取测试计划步骤
func (b *Bundle) UpdateTestPlanV2Step(req apistructs.TestPlanV2StepUpdateRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -221,7 +221,7 @@ func (b *Bundle) UpdateTestPlanV2Step(req apistructs.TestPlanV2StepUpdateRequest
}

func (b *Bundle) ExecuteDiceAutotestTestPlan(req apistructs.AutotestExecuteTestPlansRequest) (*apistructs.AutotestExecuteTestPlansResponse, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -242,7 +242,7 @@ func (b *Bundle) ExecuteDiceAutotestTestPlan(req apistructs.AutotestExecuteTestP
}

func (b *Bundle) CancelDiceAutotestTestPlan(req apistructs.AutotestCancelTestPlansRequest) (string, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return "", err
}
Expand All @@ -264,7 +264,7 @@ func (b *Bundle) CancelDiceAutotestTestPlan(req apistructs.AutotestCancelTestPla

// ListAutoTestGlobalConfig 获取全局配置
func (b *Bundle) ListAutoTestGlobalConfig(req apistructs.AutoTestGlobalConfigListRequest) ([]apistructs.AutoTestGlobalConfig, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand Down
20 changes: 10 additions & 10 deletions bundle/autotest_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

func (b *Bundle) ExecuteDiceAutotestSceneStep(req apistructs.AutotestExecuteSceneStepRequest) (*apistructs.AutotestExecuteSceneStepResp, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -44,7 +44,7 @@ func (b *Bundle) ExecuteDiceAutotestSceneStep(req apistructs.AutotestExecuteScen
}

func (b *Bundle) ExecuteDiceAutotestScene(req apistructs.AutotestExecuteSceneRequest) (*apistructs.AutotestExecuteSceneResponse, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -65,7 +65,7 @@ func (b *Bundle) ExecuteDiceAutotestScene(req apistructs.AutotestExecuteSceneReq
}

func (b *Bundle) CancelDiceAutotestScene(req apistructs.AutotestCancelSceneRequest) (string, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return "", err
}
Expand All @@ -86,7 +86,7 @@ func (b *Bundle) CancelDiceAutotestScene(req apistructs.AutotestCancelSceneReque
}

func (b *Bundle) CreateAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -107,7 +107,7 @@ func (b *Bundle) CreateAutoTestScene(req apistructs.AutotestSceneRequest) (uint6
}

func (b *Bundle) UpdateAutoTestScene(req apistructs.AutotestSceneSceneUpdateRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -128,7 +128,7 @@ func (b *Bundle) UpdateAutoTestScene(req apistructs.AutotestSceneSceneUpdateRequ
}

func (b *Bundle) MoveAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -149,7 +149,7 @@ func (b *Bundle) MoveAutoTestScene(req apistructs.AutotestSceneRequest) (uint64,
}

func (b *Bundle) ListAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, []apistructs.AutoTestScene, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, nil, err
}
Expand All @@ -170,7 +170,7 @@ func (b *Bundle) ListAutoTestScene(req apistructs.AutotestSceneRequest) (uint64,
}

func (b *Bundle) GetAutoTestScene(req apistructs.AutotestSceneRequest) (*apistructs.AutoTestScene, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -191,7 +191,7 @@ func (b *Bundle) GetAutoTestScene(req apistructs.AutotestSceneRequest) (*apistru
}

func (b *Bundle) DeleteAutoTestScene(req apistructs.AutotestSceneRequest) error {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return err
}
Expand All @@ -211,7 +211,7 @@ func (b *Bundle) DeleteAutoTestScene(req apistructs.AutotestSceneRequest) error
}

func (b *Bundle) CopyAutoTestScene(req apistructs.AutotestSceneCopyRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand Down
8 changes: 4 additions & 4 deletions bundle/autotest_scene_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

func (b *Bundle) ListAutoTestSceneInput(req apistructs.AutotestSceneRequest) ([]apistructs.AutoTestSceneInput, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -44,7 +44,7 @@ func (b *Bundle) ListAutoTestSceneInput(req apistructs.AutotestSceneRequest) ([]
}

func (b *Bundle) UpdateAutoTestSceneInputs(req apistructs.AutotestSceneInputUpdateRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -65,7 +65,7 @@ func (b *Bundle) UpdateAutoTestSceneInputs(req apistructs.AutotestSceneInputUpda
}

func (b *Bundle) DeleteAutoTestSceneInput(req apistructs.AutotestSceneRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -85,7 +85,7 @@ func (b *Bundle) DeleteAutoTestSceneInput(req apistructs.AutotestSceneRequest) (
}

func (b *Bundle) CreateAutoTestSceneInput(req apistructs.AutotestSceneRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand Down
8 changes: 4 additions & 4 deletions bundle/autotest_scene_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

func (b *Bundle) ListAutoTestSceneOutput(req apistructs.AutotestSceneRequest) ([]apistructs.AutoTestSceneOutput, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -44,7 +44,7 @@ func (b *Bundle) ListAutoTestSceneOutput(req apistructs.AutotestSceneRequest) ([
}

func (b *Bundle) ListAutoTestStepOutput(req apistructs.AutotestListStepOutPutRequest) (map[string]string, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return nil, err
}
Expand All @@ -65,7 +65,7 @@ func (b *Bundle) ListAutoTestStepOutput(req apistructs.AutotestListStepOutPutReq
}

func (b *Bundle) UpdateAutoTestSceneOutput(req apistructs.AutotestSceneOutputUpdateRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand All @@ -86,7 +86,7 @@ func (b *Bundle) UpdateAutoTestSceneOutput(req apistructs.AutotestSceneOutputUpd
}

func (b *Bundle) CreateAutoTestSceneOutput(req apistructs.AutotestSceneRequest) (uint64, error) {
host, err := b.urls.QA()
host, err := b.urls.DOP()
if err != nil {
return 0, err
}
Expand Down
Loading

0 comments on commit b8ddff0

Please sign in to comment.