Documentation ¶
Index ¶
- Constants
- func AuthHeaderValue(signature, accessKey string, signedHeaders []string) string
- func CanonicalHeaders(r *http.Request, signerHeaders []string) string
- func CanonicalQueryString(r *http.Request) string
- func CanonicalRequest(r *http.Request, signedHeaders []string) (string, error)
- func CanonicalURI(r *http.Request) string
- func HexEncodeSHA256Hash(body []byte) (string, error)
- func New() interfaces.Updater
- func RequestPayload(r *http.Request) ([]byte, error)
- func SignStringToSign(stringToSign string, signingKey []byte) (string, error)
- func SignedHeaders(r *http.Request) []string
- func StringToSign(canonicalRequest string, t time.Time) (string, error)
- type Huaweicloud
- func (*Huaweicloud) ConfigItems() echo.KVList
- func (*Huaweicloud) Description() string
- func (hw *Huaweicloud) Init(settings echo.H, domains []*dnsdomain.Domain) error
- func (*Huaweicloud) LineTypeURL() string
- func (*Huaweicloud) Name() string
- func (*Huaweicloud) SignUpURL() string
- func (*Huaweicloud) Support() dnsdomain.Support
- func (hw *Huaweicloud) Update(ctx context.Context, recordType string, ipAddr string) error
- type HuaweicloudRecordsResp
- type HuaweicloudRecordsets
- type HuaweicloudZonesResp
- type Signer
Constants ¶
View Source
const ( BasicDateFormat = "20060102T150405Z" Algorithm = "SDK-HMAC-SHA256" HeaderXDate = "X-Sdk-Date" HeaderHost = "host" HeaderAuthorization = "Authorization" HeaderContentSha256 = "X-Sdk-Content-Sha256" )
View Source
const Name = `HuaWei`
Variables ¶
This section is empty.
Functions ¶
func AuthHeaderValue ¶
Get the finalized value for the "Authorization" header. The signature parameter is the output from SignStringToSign
func CanonicalHeaders ¶
CanonicalHeaders
func CanonicalRequest ¶
Build a CanonicalRequest from a regular request string
CanonicalRequest =
HTTPRequestMethod + '\n' + CanonicalURI + '\n' + CanonicalQueryString + '\n' + CanonicalHeaders + '\n' + SignedHeaders + '\n' + HexEncode(Hash(RequestPayload))
func HexEncodeSHA256Hash ¶
HexEncodeSHA256Hash returns hexcode of sha256
func New ¶
func New() interfaces.Updater
func SignStringToSign ¶
Create the HWS Signature.
Types ¶
type Huaweicloud ¶
type Huaweicloud struct { Domains []*dnsdomain.Domain TTL int // contains filtered or unexported fields }
https://support.huaweicloud.com/api-dns/dns_api_64001.html Huaweicloud Huaweicloud
func (*Huaweicloud) ConfigItems ¶
func (*Huaweicloud) ConfigItems() echo.KVList
func (*Huaweicloud) Description ¶
func (*Huaweicloud) Description() string
func (*Huaweicloud) LineTypeURL ¶
func (*Huaweicloud) LineTypeURL() string
func (*Huaweicloud) Name ¶
func (*Huaweicloud) Name() string
func (*Huaweicloud) SignUpURL ¶
func (*Huaweicloud) SignUpURL() string
func (*Huaweicloud) Support ¶ added in v3.6.1
func (*Huaweicloud) Support() dnsdomain.Support
type HuaweicloudRecordsResp ¶
type HuaweicloudRecordsResp struct {
Recordsets []HuaweicloudRecordsets
}
HuaweicloudRecordsResp 记录返回结果
type HuaweicloudRecordsets ¶
type HuaweicloudRecordsets struct { ID string `json:"id"` Name string `json:"name"` ZoneID string `json:"zone_id"` Status string `json:"status"` Type string `json:"type"` TTL int `json:"ttl"` Records []string `json:"records"` Line string `json:"line,omitempty"` }
HuaweicloudRecordsets 记录
type HuaweicloudZonesResp ¶
HuaweicloudZonesResp zones response
Click to show internal directories.
Click to hide internal directories.