common

package
v0.0.0-...-9c1bd2e Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

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

View Source
const (
	SHA256 = "HmacSHA256"
	SHA1   = "HmacSHA1"
)

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(v bool) *bool

func Float64Ptr

func Float64Ptr(v float64) *float64

func Int64Ptr

func Int64Ptr(v int64) *int64

func IntPtr

func IntPtr(v int) *int

func Sign

func Sign(s, secretKey, method string) string

func StringPtr

func StringPtr(v string) *string

func StringPtrs

func StringPtrs(vals []string) []*string

func StringValues

func StringValues(ptrs []*string) []string

func Uint64Ptr

func Uint64Ptr(v uint64) *uint64

func UintPtr

func UintPtr(v uint) *uint

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

func (*Client) GetRegion

func (c *Client) GetRegion() string

func (*Client) Init

func (c *Client) Init(region string) *Client

func (*Client) Send

func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error)

func (*Client) WithCredential

func (c *Client) WithCredential(cred *Credential) *Client

func (*Client) WithDebug

func (c *Client) WithDebug(flag bool) *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 (c *Client) WithSecretId(secretId, secretKey string) *Client

func (*Client) WithSignatureMethod

func (c *Client) WithSignatureMethod(method string) *Client

type Credential

type Credential struct {
	SecretId  string
	SecretKey string
	Token     string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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