public

package
v0.0.0-...-87bbc8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

View Source
const API_URL = "https://ccs.api.qcloud.com/v2/index.php?"
View Source
const Monitor_API_URL = "https://monitor.api.qcloud.com/v2/index.php?"
View Source
const Repostiory_API_URL = "https://ccr.api.qcloud.com/v2/index.php?"

Variables

View Source
var (
	PubilcField = []string{"Action", "SecretId", "Region", "Timestamp", "Nonce"}
)

Functions

func Generate

func Generate()

func GenerateSignature

func GenerateSignature(key, req string) string

generateSignature 生成最终的请求签名,使用HMAC-SHA1 key加密key,req请求字符串

func GenerateSignatureString

func GenerateSignatureString(field []string, reqmap, publicMap map[string]string) string

generateSignature 生成请求签名字符串 field 请求字段集合 reqmap 待计算的请求map publicmap 公共请求map,调用public.PublicParam生成

func PublicParam

func PublicParam(action, region, secretId string) map[string]string

PublicParam生成公共请求数据 包括 Action/SecretId/Region/Timestamp/Nonce

Types

type Public

type Public struct {
	//Action   string `json:"action"`
	SecretId string `json:"secret_id"`
	Region   string `json:"region"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL