Documentation ¶
Index ¶
Constants ¶
View Source
const ( SchemeHttp = "http" SchemeHttps = "https" MethodGet = "GET" MethodPut = "PUT" MethodPost = "POST" MethodDelete = "DELETE" MethodPatch = "PATCH" MethodHead = "HEAD" HeaderJcloudPrefix = "x-jcloud" HeaderJdcloudPrefix = "x-jdcloud" HeaderJdcloudRequestId = "x-jdcloud-request-id" HeaderJdcloudDate = "x-jdcloud-date" HeaderJdcloudNonce = "x-jdcloud-nonce" HeaderJdcloudAuthorization = "Authorization" )
View Source
const ( LogFatal = iota LogError LogWarn LogInfo )
View Source
const (
TimeFormat = "20060102T150405Z"
)
View Source
const Version = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
func EscapePath ¶
EscapePath escapes part of a URL path
Types ¶
type Credential ¶
Credential is used to sign the request, AccessKey and SecretKey could be found in JDCloud console
func NewCredential ¶
func NewCredential(accessKey, secretKey string) *Credential
type DefaultLogger ¶
type DefaultLogger struct {
Level int
}
func NewDefaultLogger ¶
func NewDefaultLogger(level int) *DefaultLogger
func (DefaultLogger) Log ¶
func (logger DefaultLogger) Log(level int, message ...interface{})
type Signer ¶
type Signer struct { Credentials Credential Logger Logger }
func NewSigner ¶
func NewSigner(credsProvider Credential, logger Logger) *Signer
Click to show internal directories.
Click to hide internal directories.