Documentation
¶
Overview ¶
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func BoolPtr(v bool) *bool
- func Float64Ptr(v float64) *float64
- func Int64Ptr(v int64) *int64
- func IntPtr(v int) *int
- func Sign(s, secretKey, method string) string
- func StringPtr(v string) *string
- func StringPtrs(vals []string) []*string
- func StringValues(ptrs []*string) []string
- func Uint64Ptr(v uint64) *uint64
- func UintPtr(v uint) *uint
- type Client
- func (c *Client) GetRegion() string
- func (c *Client) Init(region string) *Client
- func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error)
- func (c *Client) WithCredential(cred *Credential) *Client
- func (c *Client) WithDebug(flag bool) *Client
- func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client
- func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client
- func (c *Client) WithSecretId(secretId, secretKey string) *Client
- func (c *Client) WithSignatureMethod(method string) *Client
- type Credential
Constants ¶
const ( SHA256 = "HmacSHA256" SHA1 = "HmacSHA1" )
Variables ¶
This section is empty.
Functions ¶
func Float64Ptr ¶
func StringPtrs ¶
func StringValues ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithSecretId ¶
func (*Client) WithCredential ¶
func (c *Client) WithCredential(cred *Credential) *Client
func (*Client) WithHttpTransport ¶
func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client
func (*Client) WithProfile ¶
func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client
func (*Client) WithSecretId ¶
func (*Client) WithSignatureMethod ¶
type Credential ¶
func NewCredential ¶
func NewCredential(secretId, secretKey string) *Credential
func NewTokenCredential ¶
func NewTokenCredential(secretId, secretKey, token string) *Credential
func (*Credential) GetCredentialParams ¶
func (c *Credential) GetCredentialParams() map[string]string