Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v1/service/ark/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestUnInstallBiz_Failed(t *testing.T) {
},
})
assert.NotNil(t, err)
assert.Equal(t, "uninstall biz failed: {{FAILED {FOO 0 []} uninstall biz failed! }}", err.Error())
assert.Equal(t, "uninstall biz failed: {{FAILED {{FOO []} 0} uninstall biz failed! }}", err.Error())

}

Expand Down
51 changes: 46 additions & 5 deletions v1/service/ark/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

package ark

import "github.com/koupleless/arkctl/common/fileutil"
import (
"github.com/koupleless/arkctl/common/fileutil"
)

type ArkContainerRunType string

Expand All @@ -24,12 +26,24 @@ const (
ArkContainerRunTypeK8s ArkContainerRunType = "pod"
)

// ArkClientResponse is the client response of ark api
type ArkClientResponse struct {
Code string `json:"code"`
Message string `json:"message"`
BizInfos []BizInfo `json:"bizInfos"`
}

// ArkResponseData is the response data of ark api.
type ArkResponseData struct {
Code string `json:"code"`
Message string `json:"message"`
ElapsedSpace int `json:"elapsedSpace"`
BizInfos []interface{} `json:"bizInfos"`
ArkClientResponse
ElapsedSpace int `json:"elapsedSpace"`
}

type ArkBatchInstallResponse struct {
Code string `json:"code"`
Message string `json:"message"`
ElapsedSpace int `json:"elapsedSpace"`
BizUrlToResponse map[string]ArkClientResponse `json:"bizUrlToResponse"`
}

// GenericArkResponseBase is the base response of ark api.
Expand Down Expand Up @@ -95,6 +109,33 @@ type BizModel struct {
BizUrl fileutil.FileUrl `json:"bizUrl,omitempty"`
}

type BizInfo struct {
BizName string `json:"bizName"`
BizVersion string `json:"bizVersion"`
BizState string `json:"bizState"`
MainClass string `json:"mainClass"`
WebContextPath string `json:"webContextPath"`
URLs []interface{} `json:"urls"`
BizURL interface{} `json:"bizUrl"`
PluginURLs []interface{} `json:"pluginUrls"`
ClassLoader interface{} `json:"classLoader"`
Attributes map[string]string `json:"attributes"`
Priority int `json:"priority"`
DenyImportPackages []string `json:"denyImportPackages"`
DenyImportPackageNodes []string `json:"denyImportPackageNodes"`
DenyImportPackageStems []string `json:"denyImportPackageStems"`
DenyImportClasses []string `json:"denyImportClasses"`
DenyImportResources []string `json:"denyImportResources"`
InjectPluginDependencies []string `json:"injectPluginDependencies"`
InjectExportPackages []string `json:"injectExportPackages"`
DeclaredLibraries []string `json:"declaredLibraries"`
DeclaredCacheMap map[string]bool `json:"declaredCacheMap"`
DenyPrefixImportResourceStems []string `json:"denyPrefixImportResourceStems"`
DenySuffixImportResourceStems []string `json:"denySuffixImportResourceStems"`
BizTempWorkDir interface{} `json:"bizTempWorkDir"`
BizStateRecords []interface{} `json:"bizStateRecords"`
}

// InstallBizRequest is the request for installing biz module to ark container.
type InstallBizRequest struct {
// BizModel is the metadata a given biz module.
Expand Down
Loading