qbox

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 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, transport http.RoundTripper) *http.Client

func Sign

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

func SignWithData

func SignWithData(mac *Mac, data []byte) string

Types

type Mac

type Mac struct {
	AccessKey string
	SecretKey []byte
}

func NewMac

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

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