Documentation ¶
Index ¶
- Constants
- func AddECIConfigToServiceGroupCreateV2Request(sg *apistructs.ServiceGroupCreateV2Request, vendor string)
- func AppendEnv(target map[string]string, overlay map[string]string)
- func ApplyOverlay(d *diceyml.Object, overlay *diceyml.Object)
- func BuildDiscoveryConfig(appName string, group *apistructs.ServiceGroup) map[string]string
- func ConvertBinds(volumePrefixDir string, vol []string) (binds []apistructs.ServiceBind)
- func ConvertHealthCheck(hc spec.HealthCheck) *apistructs.NewHealthCheck
- func ConvertServiceLabels(groupLabels, serviceLabels map[string]string, serviceName string) map[string]string
- func ConvertToLegacyDice(dice *diceyml.DiceYaml, addonActions map[string]interface{}) *spec.LegacyDice
- func ConvertVolume(volume diceyml.Volume) diceyml.Volume
- func DoJson(r *httpclient.Request, o interface{}) error
- func ErrResp(status int, err *apistructs.ErrorResponse) (httpserver.Responser, error)
- func ErrResp0101(err error, msg string) (httpserver.Responser, error)
- func ErrRespIllegalParam(err error, msg string) (httpserver.Responser, error)
- func FindCRBRRunningPipeline(appID uint64, env string, ymlName string, bdl *bundle.Bundle) ([]apistructs.PagePipeline, error)
- func FindCreatingRuntimesByRelease(appID uint64, envs map[string][]string, ymlName string, bdl *bundle.Bundle) ([]apistructs.RuntimeSummaryDTO, error)
- func GenCreateByReleasePipelineYaml(releaseID string, workspaces []string) apistructs.PipelineYml
- func GenRedeployPipelineYaml(runtimeID uint64) apistructs.PipelineYml
- func GetPageInfo(r *http.Request) (apistructs.PageInfo, error)
- func GetRealIP(request *http.Request) string
- func IsProjectECIEnable(bdl *bundle.Bundle, projectID uint64, workspace string, orgID uint64, ...) bool
- func IsValidK8sSvcName(name string) bool
- func ParseDeploymentOrderStatus(appStatus apistructs.DeploymentOrderStatusMap) apistructs.DeploymentOrderStatus
- func ParseDeploymentStatus(status apistructs.DeploymentStatus) apistructs.DeploymentStatus
- func ParseOrderName(uuid string) string
- func Round(f float64, n int) float64
- func Smaller(a, b float64) bool
- type ErrCode
- type Resp
- type RespForRead
Constants ¶
View Source
const ( ErrCode0101 = "ORT0101" // Internal Error ErrCode0107 = "ORT0107" // Illegal Param ErrCode0108 = "ORT0108" // Illegal DiceYml ErrCode0109 = "ORT0109" // Cluster Not Found ErrCode0110 = "ORT0110" // 正在部署中,请不要重复部署 ErrCode0111 = "ORT0111" // not login // TODO: fresh new code definitions RuntimeNotFound = "RuntimeNotFound" )
Variables ¶
This section is empty.
Functions ¶
func AddECIConfigToServiceGroupCreateV2Request ¶
func AddECIConfigToServiceGroupCreateV2Request(sg *apistructs.ServiceGroupCreateV2Request, vendor string)
func BuildDiscoveryConfig ¶
func BuildDiscoveryConfig(appName string, group *apistructs.ServiceGroup) map[string]string
func ConvertBinds ¶
func ConvertBinds(volumePrefixDir string, vol []string) (binds []apistructs.ServiceBind)
func ConvertHealthCheck ¶
func ConvertHealthCheck(hc spec.HealthCheck) *apistructs.NewHealthCheck
func ConvertServiceLabels ¶
func ConvertToLegacyDice ¶
func ConvertToLegacyDice(dice *diceyml.DiceYaml, addonActions map[string]interface{}) *spec.LegacyDice
func DoJson ¶
func DoJson(r *httpclient.Request, o interface{}) error
func ErrResp ¶
func ErrResp(status int, err *apistructs.ErrorResponse) (httpserver.Responser, error)
func ErrResp0101 ¶
func ErrResp0101(err error, msg string) (httpserver.Responser, error)
func ErrRespIllegalParam ¶
func ErrRespIllegalParam(err error, msg string) (httpserver.Responser, error)
func FindCRBRRunningPipeline ¶
func FindCRBRRunningPipeline(appID uint64, env string, ymlName string, bdl *bundle.Bundle) ([]apistructs.PagePipeline, error)
FindCRBRRunningPipeline find those 'create runtime by release' pipeline that are running
func FindCreatingRuntimesByRelease ¶
func FindCreatingRuntimesByRelease(appID uint64, envs map[string][]string, ymlName string, bdl *bundle.Bundle) ([]apistructs.RuntimeSummaryDTO, error)
FindCreatingRuntimesByRelease find those runtimes created through the release
func GenCreateByReleasePipelineYaml ¶
func GenCreateByReleasePipelineYaml(releaseID string, workspaces []string) apistructs.PipelineYml
GenCreateByReleasePipelineYaml gen pipeline.yml for create runtime by releaseID
func GenRedeployPipelineYaml ¶
func GenRedeployPipelineYaml(runtimeID uint64) apistructs.PipelineYml
GenRedeployPipelineYaml gen pipeline.yml for redeploy
func GetPageInfo ¶
func GetPageInfo(r *http.Request) (apistructs.PageInfo, error)
func IsProjectECIEnable ¶
func IsProjectECIEnable(bdl *bundle.Bundle, projectID uint64, workspace string, orgID uint64, userID string) bool
IsProjectECIEnable 检查项目对应的环境是否开启 ECI 功能
func IsValidK8sSvcName ¶
IsValidK8sSvcName is valid service name
func ParseDeploymentOrderStatus ¶
func ParseDeploymentOrderStatus(appStatus apistructs.DeploymentOrderStatusMap) apistructs.DeploymentOrderStatus
func ParseDeploymentStatus ¶
func ParseDeploymentStatus(status apistructs.DeploymentStatus) apistructs.DeploymentStatus
func ParseOrderName ¶
Types ¶
type Resp ¶
type Resp struct { Success bool `json:"success"` Data interface{} `json:"data,omitempty"` Err *apistructs.ErrorResponse `json:"err,omitempty"` }
type RespForRead ¶
type RespForRead struct { Success bool `json:"success"` Data json.RawMessage `json:"data,omitempty"` Err *apistructs.ErrorResponse `json:"err,omitempty"` }
Click to show internal directories.
Click to hide internal directories.