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")
// ErrAddonInvalidVersion means add version is invalid
ErrAddonInvalidVersion = NewBcode(400, 50019, "")
// ErrCloudShellAddonNotEnabled means the cloudshell CRD is not installed
ErrCloudShellAddonNotEnabled = NewBcode(200, 50020, "Please enable the CloudShell addon first")
// ErrCloudShellNotInit means the cloudshell CR not created
ErrCloudShellNotInit = NewBcode(400, 50021, "Closing the console window and retry")
// ErrRegistryNotExist means the specified registry not exist
ErrRegistryNotExist = NewBcode(400, 50022, "The specified not exist")
)
var (
// ErrUnsupportedLoginType is the error of unsupported login type
ErrUnsupportedLoginType = NewBcode(401, 12001, "the login type is not supported")
// ErrTokenExpired is the error of token expired
ErrTokenExpired = NewBcode(401, 12002, "the token is expired")
// ErrTokenNotValidYet is the error of token not valid yet
ErrTokenNotValidYet = NewBcode(401, 12003, "the token is not valid yet")
// ErrTokenInvalid is the error of token invalid
ErrTokenInvalid = NewBcode(401, 12004, "the token is invalid")
// ErrTokenMalformed is the error of token malformed
ErrTokenMalformed = NewBcode(403, 12005, "the token is malformed")
// ErrNotAuthorized is the error of not authorized
ErrNotAuthorized = NewBcode(401, 12006, "the user is not authorized")
// ErrNotAccessToken is the error of not access token
ErrNotAccessToken = NewBcode(401, 12007, "the token is not an access token")
// ErrInvalidLoginRequest is the error of invalid login request
ErrInvalidLoginRequest = NewBcode(400, 12008, "the login request is invalid")
// ErrInvalidDexConfig is the error of invalid dex config
ErrInvalidDexConfig = NewBcode(400, 12009, "the dex config is invalid")
// ErrRefreshTokenExpired is the error of refresh token expired
ErrRefreshTokenExpired = NewBcode(400, 12010, "the refresh token is expired")
// ErrNoDexConnector is the error of no dex connector
ErrNoDexConnector = NewBcode(400, 12011, "there is no dex connector")
)
var (
// ErrUnsupportedEmailModification is the error of unsupported email modification
ErrUnsupportedEmailModification = NewBcode(400, 14001, "the user already has an email address and cannot modify it again")
// ErrUserAlreadyDisabled is the error of user already disabled
ErrUserAlreadyDisabled = NewBcode(400, 14002, "the user is already disabled")
// ErrUserAlreadyEnabled is the error of user already enabled
ErrUserAlreadyEnabled = NewBcode(400, 14003, "the user is already enabled")
// ErrUserCannotModified is the error of user cannot modified
ErrUserCannotModified = NewBcode(400, 14004, "the user cannot be modified in dex login mode")
// ErrUserInvalidPassword is the error of user invalid password
ErrUserInvalidPassword = NewBcode(400, 14005, "the password is invalid")
// ErrDexConfigNotFound means the dex config is not configured
ErrDexConfigNotFound = NewBcode(200, 14006, "the dex config is not found")
// ErrUserInconsistentPassword is the error of user inconsistent password
ErrUserInconsistentPassword = NewBcode(401, 14007, "the password is inconsistent with the user")
// ErrUsernameNotExist is the error of username not exist
ErrUsernameNotExist = NewBcode(401, 14008, "the username is not exist")
// ErrDexNotFound is the error of dex not found
ErrDexNotFound = NewBcode(200, 14009, "the dex is not found")
// ErrEmptyAdminEmail is the error of empty admin email
ErrEmptyAdminEmail = NewBcode(400, 14010, "the admin email is empty, please set the admin email before using sso login")
)
var (
// ErrRolePermissionCheckFailure means the perm policy is invalid where create or update role
ErrRolePermissionCheckFailure = NewBcode(400, 15001, "the permissions are invalid")
// ErrRoleIsExist means the role is exist
ErrRoleIsExist = NewBcode(400, 15002, "the role name is exist")
// ErrRoleIsNotExist means the role is not exist
ErrRoleIsNotExist = NewBcode(400, 15003, "the role is not exist")
// ErrPermissionNotExist means the permission is not exist
ErrPermissionNotExist = NewBcode(404, 15004, "the permission is not exist")
// ErrPermissionIsExist means the he permission is exist
ErrPermissionIsExist = NewBcode(400, 15005, "the permission name is exist")
// ErrPermissionIsUsed means the permission is bound by role, can not be deleted
ErrPermissionIsUsed = NewBcode(400, 15006, "the permission have been used")
)
var (
// ErrSensitiveConfig means the config can not be read
ErrSensitiveConfig = NewBcode(400, 16001, "the config is sensitive")
// ErrNoConfigOrTarget means there is no target or config when creating the distribution.
ErrNoConfigOrTarget = NewBcode(400, 16002, "you must specify the config name and destination to distribute")
// ErrConfigExist means the config is exist
ErrConfigExist = NewBcode(400, 16003, "the config name is exist")
// ErrChangeTemplate the template of the config can not be change
ErrChangeTemplate = NewBcode(400, 16004, "the template of the config can not be change")
// ErrTemplateNotFound means the template is not exist
ErrTemplateNotFound = NewBcode(404, 16005, "the template is not exist")
// ErrConfigNotFound means the config is not exist
ErrConfigNotFound = NewBcode(404, 16006, "the config is not exist")
// ErrNotFoundDistribution means the distribution is not exist
ErrNotFoundDistribution = NewBcode(404, 16007, "the distribution is not exist")
)
var (
// ErrContextNotFound means the certain context is not found
ErrContextNotFound = NewBcode(400, 17001, "pipeline context is not found")
// ErrContextAlreadyExist means the certain context already exists
ErrContextAlreadyExist = NewBcode(400, 17002, "pipeline context of pipeline already exist")
// ErrGetPipelineInfo means failed to get pipeline info
ErrGetPipelineInfo = NewBcode(400, 17003, "get pipeline info failed")
// ErrPipelineNotExist means specific pipeline not found
ErrPipelineNotExist = NewBcode(404, 17004, "failed to find log pods")
// ErrGetPodsLogs means failed to get pods logs
ErrGetPodsLogs = NewBcode(500, 17006, "failed to get pods logs")
// ErrReadSourceLog means failed to read source log
ErrReadSourceLog = NewBcode(500, 17007, "failed to read log from URL source")
// ErrGetContextBackendData means failed to get context backend data
ErrGetContextBackendData = NewBcode(500, 17008, "failed to get context backend data")
// ErrNoSteps means pipeline doesn't have a step
ErrNoSteps = NewBcode(400, 17009, "pipeline step number is zero")
// ErrPipelineExist means the pipeline is exist
ErrPipelineExist = NewBcode(400, 17010, "the pipeline is exist")
// ErrPipelineRunFinished means pipeline run is finished
ErrPipelineRunFinished = NewBcode(400, 17011, "pipeline run is finished")
// ErrWrongMode means the pipeline run mode is wrong
ErrWrongMode = NewBcode(400, 17012, "wrong pipeline run mode, only \"DAG\" and \"StepByStep\" are supported")
)
var ErrApplicationComponentExist = NewBcode(400, 10007, "application component is exist")
ErrApplicationComponentExist application component is exist
var ErrApplicationComponentNotAllowDelete = NewBcode(400, 10025, "main component in application can not be deleted")
ErrApplicationComponentNotAllowDelete means the component is main in one application, and it must be deleted before delete app.
var ErrApplicationComponentNotExist = NewBcode(404, 10008, "application component is not exist")
ErrApplicationComponentNotExist 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 ErrApplicationDryRunFailed = NewBcode(400, 10027, "The application dry run failed")
ErrApplicationDryRunFailed means the application configuration does not dry run successfully
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 the 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 ErrApplicationPolicyIsBeingUsed = NewBcode(400, 10026, "the policy is being used by workflow, cannot be deleted")
ErrApplicationPolicyIsBeingUsed means this policy is been used, cannot deleted.
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 ErrChartNotExist = NewBcode(200, 13004, "this chart not exist in the repository")
ErrChartNotExist is the error of the chart not exist
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 ErrEnvTargetNotAllowDelete = NewBcode(400, 11007, "target can not be deleted, because there are applications deployed.")
ErrEnvTargetNotAllowDelete means can not remove existing targets from this environment, because there are applications deployed.
var ErrEnvbindingDeliveryTargetNotAllExist = NewBcode(400, 90001, "application envbinding deliveryTarget is not all exist")
ErrEnvbindingDeliveryTargetNotAllExist application envbinding deliveryTarget is not exist
var ErrForbidden = NewBcode(403, 403, "403 Forbidden")
ErrForbidden check user perms failure
var ErrFoundEnvbindingDeliveryTarget = NewBcode(400, 90002, "found application envbinding deliveryTarget failure")
ErrFoundEnvbindingDeliveryTarget found application envbinding deliveryTarget failure
var ErrGetChartValues = NewBcode(200, 13003, "cannot get the values info of the chart")
ErrGetChartValues is the error of cannot get values of the chart
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 ErrListHelmChart = NewBcode(200, 13001, "cannot list helm charts from given repoURL")
ErrListHelmChart is the error of cannot list helm chart from given repoURL
var ErrListHelmVersions = NewBcode(200, 13002, "cannot list helm versions from given repoURL")
ErrListHelmVersions is the error of cannot list helm chart versions given given repoUrl
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 ErrProjectDenyDeleteByApplication = NewBcode(400, 30005, "the project can't be deleted as there are applications inside")
ErrProjectDenyDeleteByApplication the project can't be deleted as there are applications inside
var ErrProjectDenyDeleteByEnvironment = NewBcode(400, 30006, "the project can't be deleted before you clean up all the environments inside")
ErrProjectDenyDeleteByEnvironment the project can't be deleted because there are environments inside
var ErrProjectDenyDeleteByTarget = NewBcode(400, 30007, "the project can't be deleted before you clean up all these targets inside")
ErrProjectDenyDeleteByTarget the project can't be deleted as there are targets inside
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 ErrProjectOwnerIsNotExist = NewBcode(400, 30010, "the project owner name is invalid")
ErrProjectOwnerIsNotExist means the project owner name is invalid
var ErrProjectRoleCheckFailure = NewBcode(400, 30008, "the specified role does't belong to this project or not exist")
ErrProjectRoleCheckFailure means the specified role does't belong to this project or not exist
var ErrProjectUserExist = NewBcode(400, 30009, "the user is already exist in this project")
ErrProjectUserExist means the user is already exist in this project
var ErrRepoBasicAuth = NewBcode(400, 13006, "extract repo auth info from secret error")
ErrRepoBasicAuth means extract repo auth info from secret error
var ErrRepoInvalidURL = NewBcode(400, 13007, "user input repository url is invalid")
ErrRepoInvalidURL means user input url is invalid
var ErrServer = NewBcode(500, 500, "The service has lapsed.")
ErrServer an unexpected mistake.
var ErrSkipCacheParameter = NewBcode(400, 13005, "skip cache parameter miss config, the value only can be true or false")
ErrSkipCacheParameter means the skip cache parameter miss config
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 ErrTargetInvalidWithEmptyClusterOrNamespace = NewBcode(400, 80005, "the namespace or cluster of target should not be empty")
ErrTargetInvalidWithEmptyClusterOrNamespace indicates the namespace/cluster of target is empty
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 ErrUnauthorized = NewBcode(401, 401, "401 Unauthorized")
ErrUnauthorized check user auth failure
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 ¶
func NewBcodeWrapErr(httpCode, businessCode int32, err error, message string) error
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 ¶
func WrapGithubRateLimitErr(err error) error
WrapGithubRateLimitErr wraps error if it is github rate limit
Types ¶
type Bcode ¶
type Bcode struct {
HTTPCode int32 `json:"-"`
BusinessCode int32
Message string
}
Bcode business error code
func NewBcode ¶
func NewBcode(httpCode, businessCode int32, message string) *Bcode
NewBcode new business code
func (*Bcode) SetMessage ¶
func (b *Bcode) SetMessage(message string) *Bcode
SetMessage set new message and return a new bcode instance