func generateAliDNSRequestSignature(httpMethod string, accessSecret string, queryParams map[string][]string) string {
	keys := make([]string, 0, len(queryParams))
	for key := range queryParams {
		keys = append(keys, key)
	}
	sort.Strings(keys)
	sortedQueryString := ""
	for index := range keys {
		key := keys[index]
		value := queryParams[key][0]
		escapedKey := escapePlusAndStarAndUnescapeTildeSymbol(url.QueryEscape(key))
		escapedValue := escapePlusAndStarAndUnescapeTildeSymbol(url.QueryEscape(value))
		sortedQueryString += escapedKey + "=" + escapedValue
		if index != (len(keys) - 1) {
			sortedQueryString += "&"
		}
	}
	stringToSign := httpMethod + "&%2F&" + url.QueryEscape(sortedQueryString)
	hmacKey := accessSecret + "&"
	hmacHash := hmac.New(sha1.New, []byte(hmacKey))
	hmacHash.Write([]byte(stringToSign))
	return base64.StdEncoding.EncodeToString(hmacHash.Sum(nil))
}
generateAliDNSRequestSignature returns the signature of the request.

See https://help.aliyun.com/document_detail/29747.html?spm=a2c4g.11186623.6.632.53b98dcazC573U for more information.
package aliyun
import (
	"crypto/hmac"
	"crypto/sha1"
	"encoding/base64"
	"github.com/google/uuid"
	"net/http"
	"net/url"
	"sort"
	"strings"
	"time"
)
func BuildAliDNSRequest(
	apiEndpoint string,
	accessKeyId string,
	accessKeySecret string,
	action string,
	requestSpecificQueryParameters ...map[string]string,
) (*http.Request, error) {
	request, err := http.NewRequest(http.MethodGet, apiEndpoint, nil)
	if err != nil {
		return nil, err
	}
	queryParams := request.URL.Query()
	queryParams.Add("Action", action)
	queryParams.Add("Format", "JSON")
	queryParams.Add("Version", "2015-01-09")
	queryParams.Add("AccessKeyId", accessKeyId)
	queryParams.Add("SignatureMethod", "HMAC-SHA1")
	queryParams.Add("Timestamp", time.Now().UTC().Format(time.RFC3339))
	queryParams.Add("SignatureVersion", "1.0")
	queryParams.Add("SignatureNonce", uuid.New().String())
	for index := range requestSpecificQueryParameters {
		for key, value := range requestSpecificQueryParameters[index] {
			queryParams.Add(key, value)
		}
	}
	signature := generateAliDNSRequestSignature(request.Method, accessKeySecret, queryParams)
	queryParams.Add("Signature", signature)
	request.URL.RawQuery = queryParams.Encode()
	return request, nil
}