qbox

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(mac *Mac, httpTransport http.RoundTripper, totalTimeout time.Duration) *http.Client

Types

type Mac

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

func NewMac

func NewMac(accessKey, secretKey string) (mac *Mac)

func (*Mac) GetAccessKey

func (mac *Mac) GetAccessKey() string

GetAccessKey 获取 accessKey

func (*Mac) GetSecretKey

func (mac *Mac) GetSecretKey() string

GetSecretKey 获取 secretKey

func (*Mac) Sign

func (mac *Mac) Sign(data []byte) (token string)

func (*Mac) SignRequest

func (mac *Mac) SignRequest(req *http.Request, incbody bool) (token string, err error)

func (*Mac) SignWithData

func (mac *Mac) SignWithData(b []byte) (token string)

func (*Mac) VerifyCallback

func (mac *Mac) VerifyCallback(req *http.Request) (bool, error)

type Transport

type Transport struct {
	Transport http.RoundTripper
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(mac *Mac, transport http.RoundTripper) *Transport

func (*Transport) NestedObject

func (t *Transport) NestedObject() interface{}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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