1 Star 0 Fork 0

凡夫俗子1025 / huaweicloud-sdk-go-obs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
error.go 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
redabc 提交于 2021-03-02 21:29 . release 3.21.1 source code for go SDK
// Copyright 2019 Huawei Technologies Co.,Ltd.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
package obs
import (
"encoding/xml"
"fmt"
)
// ObsError defines error response from OBS
type ObsError struct {
BaseModel
Status string
XMLName xml.Name `xml:"Error"`
Code string `xml:"Code" json:"code"`
Message string `xml:"Message" json:"message"`
Resource string `xml:"Resource"`
HostId string `xml:"HostId"`
}
func (err ObsError) Error() string {
return fmt.Sprintf("obs: service returned error: Status=%s, Code=%s, Message=%s, RequestId=%s",
err.Status, err.Code, err.Message, err.RequestId)
}
Go
1
https://gitee.com/Clorious/huaweicloud-sdk-go-obs.git
git@gitee.com:Clorious/huaweicloud-sdk-go-obs.git
Clorious
huaweicloud-sdk-go-obs
huaweicloud-sdk-go-obs
v3.21.2

搜索帮助