client

package
v7.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 7 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

NewClient return qiniu mac client

func SignRequest

func SignRequest(sk []byte, req *http.Request) ([]byte, error)

SignRequest sign request

Types

type Mac

type Mac struct {
	AccessKey string
	SecretKey []byte
}

Mac qiniu mac type

type RequestSigner

type RequestSigner struct {
}

RequestSigner request signer

var (
	// DefaultRequestSigner default request signer
	DefaultRequestSigner RequestSigner
)

func (RequestSigner) Sign

func (p RequestSigner) Sign(sk []byte, req *http.Request) ([]byte, error)

Sign access key and request

type Transport

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

Transport with qiniu mac

func NewTransport

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

NewTransport return transport with qiniu mac

func (*Transport) NestedObject

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

NestedObject return transport

func (*Transport) RoundTrip

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

RoundTrip transport round trip method

Jump to

Keyboard shortcuts

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