Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAddonNotExist addon registry not exist ErrAddonNotExist = NewBcode(404, 50001, "addon not exist") // ErrAddonRegistryExist addon registry already exist ErrAddonRegistryExist = NewBcode(400, 50002, "addon registry already exists") // ErrAddonRegistryInvalid addon registry is exist ErrAddonRegistryInvalid = NewBcode(400, 50003, "addon registry invalid") // ErrAddonRegistryRateLimit addon registry is rate limited by Github ErrAddonRegistryRateLimit = NewBcode(400, 50004, "Exceed Github rate limit") // ErrAddonRegistryNotExist addon registry doesn't exist ErrAddonRegistryNotExist = NewBcode(400, 50006, "addon registry doesn't exist") // ErrAddonRender fail to render addon application ErrAddonRender = NewBcode(500, 50010, "addon render fail") // ErrAddonApply fail to apply application to cluster ErrAddonApply = NewBcode(500, 50011, "fail to apply addon resources") // ErrReadGit fail to get addon application ErrReadGit = NewBcode(500, 50012, "fail to read git repo") // ErrGetAddonApplication fail to get addon application ErrGetAddonApplication = NewBcode(500, 50013, "fail to get addon application") // ErrAddonIsEnabled means addon has been enabled ErrAddonIsEnabled = NewBcode(500, 50014, "addon has been enabled") // ErrAddonSecretApply means fail to apply addon argument secret ErrAddonSecretApply = NewBcode(500, 50015, "fail to apply addon argument secret") // ErrAddonSecretGet means fail to get addon argument secret ErrAddonSecretGet = NewBcode(500, 50016, "fail to get addon argument secret") // ErrAddonDependencyNotSatisfy means addon's dependencies is not enabled ErrAddonDependencyNotSatisfy = NewBcode(500, 50017, "addon's dependencies is not enabled") // ErrAddonSystemVersionMismatch means addon's version required mismatch ErrAddonSystemVersionMismatch = NewBcode(400, 50018, "addon's system version requirement mismatch") )
var ErrApplicationComponetExist = NewBcode(400, 10007, "application component is exist")
ErrApplicationComponetExist application component is exist
var ErrApplicationComponetNotExist = NewBcode(404, 10008, "application component is not exist")
ErrApplicationComponetNotExist application component is not exist
var ErrApplicationConfig = NewBcode(400, 10000, "application config does not comply with OAM specification")
ErrApplicationConfig application config does not comply with OAM specification
var ErrApplicationEnvExist = NewBcode(400, 10014, "application env is exist")
ErrApplicationEnvExist application env is exist
var ErrApplicationEnvRefusedDelete = NewBcode(400, 10020, "The application envbinding cannot be deleted because it has been deployed")
ErrApplicationEnvRefusedDelete means he application env cannot be deleted because it has been deployed
var ErrApplicationExist = NewBcode(400, 10002, "application name is exist")
ErrApplicationExist application is exist
var ErrApplicationNoReadyRevision = NewBcode(400, 10017, "application not have ready revision")
ErrApplicationNoReadyRevision application not have ready revision
var ErrApplicationNotEnv = NewBcode(404, 10013, "application not set env binding")
ErrApplicationNotEnv no env binding policy
var ErrApplicationNotExist = NewBcode(404, 10012, "application name is not exist")
ErrApplicationNotExist application is not exist
var ErrApplicationPolicyExist = NewBcode(400, 10009, "application policy is exist")
ErrApplicationPolicyExist application policy is exist
var ErrApplicationPolicyNotExist = NewBcode(404, 10010, "application policy is not exist")
ErrApplicationPolicyNotExist application policy is not exist
var ErrApplicationRefusedDelete = NewBcode(400, 10019, "The application cannot be deleted because it has been deployed")
ErrApplicationRefusedDelete means the application cannot be deleted because it has been deployed
var ErrApplicationRevisionNotExist = NewBcode(404, 10018, "application revision is not exist")
ErrApplicationRevisionNotExist application revision is not exist
var ErrApplicationTriggerNotExist = NewBcode(404, 10024, "application trigger is not exist")
ErrApplicationTriggerNotExist means application trigger is not exist
var ErrBootstrapTerraformConfiguration = NewBcode(500, 40012, "failed to bootstrap terraform configuration")
ErrBootstrapTerraformConfiguration failed to bootstrap terraform configuration
var ErrCloudClusterAlreadyExists = NewBcode(400, 40009, "cloud cluster already exists")
ErrCloudClusterAlreadyExists cloud cluster already exists
var ErrClusterAlreadyExistInDataStore = NewBcode(400, 40004, "cluster already exists in data store")
ErrClusterAlreadyExistInDataStore cluster exists in datastore
var ErrClusterCreateNamespaceNoPermission = NewBcode(401, 40014, "no permission to create namespace in cluster")
ErrClusterCreateNamespaceNoPermission cluster create namespace is forbidden
var ErrClusterExistsInKubernetes = NewBcode(400, 40006, "cluster already exists in kubernetes")
ErrClusterExistsInKubernetes cluster exists in kubernetes
var ErrClusterIDNotFoundInTerraformConfiguration = NewBcode(500, 40011, "cannot find cluster_id in terraform configuration")
ErrClusterIDNotFoundInTerraformConfiguration cannot find cluster_id in terraform configuration
var ErrClusterNotFoundInDataStore = NewBcode(404, 40003, "cluster not found in data store")
ErrClusterNotFoundInDataStore cluster not found in datastore
var ErrComponentTypeNotSupport = NewBcode(400, 10001, "An unsupported component type was used.")
ErrComponentTypeNotSupport an unsupported component type was used.
var ErrCreateNamespace = NewBcode(500, 10011, "auto create namespace failure")
ErrCreateNamespace auto create namespace failure before deploy app
var ErrDefinitionNoSchema = NewBcode(400, 70002, "definition not have schema")
ErrDefinitionNoSchema definition not have schema
var ErrDefinitionNotFound = NewBcode(404, 70001, "definition is not exist")
ErrDefinitionNotFound definition is not exist
var ErrDefinitionTypeNotSupport = NewBcode(400, 70003, "definition type not support")
ErrDefinitionTypeNotSupport definition type not support
var ErrDeleteEnvButAppExist = NewBcode(400, 11005, "env can't be deleted as app existed inside")
ErrDeleteEnvButAppExist reports an error when delete an Env but still has apps inside
var ErrDeployApplyFail = NewBcode(500, 10005, "application deploy apply failure")
ErrDeployApplyFail Failed to update an application to the control cluster.
var ErrDeployConflict = NewBcode(400, 10004, "application deploy conflict")
ErrDeployConflict Occurs when a new event is triggered before the last deployment event has completed.
var ErrEnvAlreadyExists = NewBcode(400, 11001, "env name already exists")
ErrEnvAlreadyExists Env name is existed
var ErrEnvBindingExist = NewBcode(400, 90005, "application envbinding is exist")
ErrEnvBindingExist application envbinding is exist
var ErrEnvBindingNotExist = NewBcode(400, 90003, "application envbinding not exist")
ErrEnvBindingNotExist application envbinding is not exist
var ErrEnvBindingUpdateWorkflow = NewBcode(400, 90006, "application envbinding update workflow error")
ErrEnvBindingUpdateWorkflow application envbinding update workflow error
var ErrEnvBindingsNotExist = NewBcode(400, 90004, "application envbinding is not exist")
ErrEnvBindingsNotExist application envbindings is not exist
var ErrEnvNamespaceAlreadyBound = NewBcode(400, 11004, "the namespace specified already belongs to other env")
ErrEnvNamespaceAlreadyBound indicates the namespace already belongs to other env
var ErrEnvNamespaceFail = NewBcode(400, 11003, "env bind namespace failure")
ErrEnvNamespaceFail env binds namespace failure
var ErrEnvNotExisted = NewBcode(404, 11002, "env is not existed")
ErrEnvNotExisted means env is not existed
var ErrEnvTargetConflict = NewBcode(400, 11006, "in one project, one target can only belong to one env.")
ErrEnvTargetConflict in one project, one target can only belong to one env
var ErrEnvbindingDeliveryTargetNotAllExist = NewBcode(400, 90001, "application envbinding deliveryTarget is not all exist")
ErrEnvbindingDeliveryTargetNotAllExist application envbinding deliveryTarget is not exist
var ErrFoundEnvbindingDeliveryTarget = NewBcode(400, 90002, "found application envbinding deliveryTarget failure")
ErrFoundEnvbindingDeliveryTarget found application envbinding deliveryTarget failure
var ErrGetCloudClusterFailure = NewBcode(500, 40005, "get cloud cluster information failed")
ErrGetCloudClusterFailure get cloud cluster failed
var ErrInvalidAccessKeyOrSecretKey = NewBcode(400, 40013, "access key or secret key is invalid")
ErrInvalidAccessKeyOrSecretKey access key or secret key is invalid
var ErrInvalidCloudClusterProvider = NewBcode(400, 40000, "provider is not support")
ErrInvalidCloudClusterProvider provider is not support now
var ErrInvalidDefinitionUISchema = NewBcode(400, 70004, "invalid custom defnition ui schema")
ErrInvalidDefinitionUISchema invalid custom definition ui schema
var ErrInvalidProperties = NewBcode(400, 10003, "properties is invalid")
ErrInvalidProperties properties(trait or component or others) is invalid
var ErrInvalidWebhookPayloadBody = NewBcode(400, 10023, "Invalid webhook payload body")
ErrInvalidWebhookPayloadBody means the webhook payload body is invalid
var ErrInvalidWebhookPayloadType = NewBcode(400, 10022, "Invalid webhook payload type")
ErrInvalidWebhookPayloadType means the webhook payload type is invalid
var ErrInvalidWebhookToken = NewBcode(400, 10021, "Invalid webhook token")
ErrInvalidWebhookToken means the webhook token is invalid
var ErrKubeConfigAndSecretIsNotSet = NewBcode(400, 40002, "kubeConfig or kubeConfig secret must be provided")
ErrKubeConfigAndSecretIsNotSet kubeConfig and kubeConfigSecret are not set
var ErrKubeConfigSecretNotSupport = NewBcode(400, 40001, "kubeConfig secret is not supported now")
ErrKubeConfigSecretNotSupport kubeConfig secret is not support
var ErrLocalClusterImmutable = NewBcode(400, 40008, "local cluster is immutable")
ErrLocalClusterImmutable local cluster kubeConfig is immutable
var ErrLocalClusterReserved = NewBcode(400, 40007, "local cluster is reserved")
ErrLocalClusterReserved cluster name reserved for local
var ErrMustQueryByApp = NewBcode(404, 20005, "you can only query the Workflow list based on applications.")
ErrMustQueryByApp you can only query the Workflow list based on applications.
var ErrNoComponent = NewBcode(200, 10006, "application not have components, can not deploy")
ErrNoComponent no component
var ErrParseQuery2Json = NewBcode(400, 60003, "fail to parse query result to json format")
ErrParseQuery2Json failed to parse query result to response
var ErrParseVelaQL = NewBcode(400, 60001, "fail to parse the velaQL")
ErrParseVelaQL failed to parse velaQL
var ErrProjectIsExist = NewBcode(400, 30001, "project name already exists")
ErrProjectIsExist project name is exist
var ErrProjectIsNotExist = NewBcode(404, 30002, "project is not existed")
ErrProjectIsNotExist project is not exist
var ErrProjectNamespaceFail = NewBcode(400, 30003, "project bind namespace failure")
ErrProjectNamespaceFail project bind namespace failure
var ErrProjectNamespaceIsExist = NewBcode(400, 30004, "the namespace belongs to the other project")
ErrProjectNamespaceIsExist the namespace belongs to the other project
var ErrServer = NewBcode(500, 500, "The service has lapsed.")
ErrServer an unexpected mistake.
var ErrTargetExist = NewBcode(400, 80001, "target is exist")
ErrTargetExist Target is exist
var ErrTargetInUseCantDeleted = NewBcode(404, 80003, "target in use, can't be deleted")
ErrTargetInUseCantDeleted Target being used
var ErrTargetNamespaceAlreadyBound = NewBcode(400, 80004, "the namespace specified already belongs to other target")
ErrTargetNamespaceAlreadyBound indicates the namespace already belongs to other target, one namespace can only belong to one target
var ErrTargetNotExist = NewBcode(404, 80002, "target is not exist")
ErrTargetNotExist Target is not exist
var ErrTerraformConfigurationNotFound = NewBcode(404, 40010, "cannot find terraform configuration")
ErrTerraformConfigurationNotFound cannot find terraform configuration
var ErrTraitAlreadyExist = NewBcode(400, 10016, "trait is already exist")
ErrTraitAlreadyExist trait is already exist
var ErrTraitNotExist = NewBcode(400, 10015, "trait is not exist")
ErrTraitNotExist trait is not exist
var ErrViewQuery = NewBcode(400, 60002, "view query failed")
ErrViewQuery failed to query view
var ErrWorkflowExist = NewBcode(404, 20003, "application workflow is exist")
ErrWorkflowExist application workflow is exist
var ErrWorkflowNoDefault = NewBcode(404, 20004, "application default workflow is not exist")
ErrWorkflowNoDefault application default workflow is not exist
var ErrWorkflowNoEnv = NewBcode(400, 20006, "workflow must set env name")
ErrWorkflowNoEnv workflow have not env
var ErrWorkflowNotExist = NewBcode(404, 20002, "application workflow is not exist")
ErrWorkflowNotExist application workflow is not exist
var ErrWorkflowRecordNotExist = NewBcode(404, 20007, "workflow record is not exist")
ErrWorkflowRecordNotExist workflow record is not exist
Functions ¶
func NewBcodeWrapErr ¶ added in v1.2.0
NewBcodeWrapErr new bcode error
func ReturnError ¶
func ReturnError(req *restful.Request, res *restful.Response, err error)
ReturnError Unified handling of all types of errors, generating a standard return structure.
func WrapGithubRateLimitErr ¶ added in v1.2.0
WrapGithubRateLimitErr wraps error if it is github rate limit