Versions in this module Expand all Collapse all v1 v1.0.1 Apr 29, 2024 v1.0.0 Apr 15, 2024 Changes in this version + const DefaultContentType + const DefaultProtocol + const HTTPHeaderContentType + const HTTPHeaderUserAgent + const HeaderAccessToken + const HeaderAppId + const HeaderOpenId + const HeaderSdkId + const OpenAPIDomain + const Version + const XTCHeaderAction + const XTCHeaderKey + const XTCHeaderNonce + const XTCHeaderRegion + const XTCHeaderRegistered + const XTCHeaderSignature + const XTCHeaderTimestamp + const XTCHeaderVersion + var DefaultAuthenticator xhttp.Authentication = &VersionAuthenticator + var DefaultSerializer xhttp.Serializable = JsonSerializer + var JsonSerializer = &JSONSerializer + func PathValue(v interface{}) string + func PtrBool(v bool) *bool + func PtrFloat32(v float32) *float32 + func PtrFloat64(v float64) *float64 + func PtrInt(v int) *int + func PtrInt32(v int32) *int32 + func PtrInt64(v int64) *int64 + func PtrString(v string) *string + func PtrTime(v time.Time) *time.Time + func QueryValue(v interface{}) string + type ClientError struct + Err error + func (ce ClientError) Error() string + type Config struct + AppId string + Clt xhttp.Client + SdkId string + SecretID string + SecretKey string + Version string + type JSONSerializer struct + func (d *JSONSerializer) ContentType() string + func (d *JSONSerializer) Deserialize(data []byte, v interface{}) error + func (d *JSONSerializer) Name() string + func (d *JSONSerializer) Serialize(v interface{}) ([]byte, error) + type JWTAuthenticator struct + Action string + Nonce uint64 + Region string + Registered string + Signature string + Timestamp string + func (jwt JWTAuthenticator) AuthHeader(req *http.Request) error + type OAuth2Authenticator struct + AccessToken string + Action string + Nonce uint64 + OpenId string + Region string + Timestamp string + func (oauth2 OAuth2Authenticator) AuthHeader(httpReq *http.Request) error + type RequestOptionFunc func(config Config) xhttp.RequestOptionFunc + func WithJWTAuth(jwt *JWTAuthenticator) RequestOptionFunc + func WithOAuth2Auth(oauth2 *OAuth2Authenticator) RequestOptionFunc + func WithRequestHeader(header http.Header) RequestOptionFunc + type ServiceError struct + ErrorInfo ... + func (se ServiceError) Error() string + type VersionAuthenticator struct + func (v VersionAuthenticator) AuthHeader(httpReq *http.Request) error