request

package
v2.2.15+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Operation *data.Operation
	Input     *reflect.Value
	Output    *reflect.Value

	HTTPRequest  *http.Request
	HTTPResponse *http.Response
}

A Request can build, sign, send and unpack API request.

func New

func New(o *data.Operation, i data.Input, x interface{}) (*Request, error)

New create a Request from given Operation, Input and Output. It returns a Request.

func (*Request) ApplyQuerySignature

func (r *Request) ApplyQuerySignature(accessKeyID string, expires int, signature string) error

ApplyQuerySignature applies the query signature. It returns error if error occurred.

func (*Request) ApplySignature

func (r *Request) ApplySignature(authorization string) error

ApplySignature applies the Authorization header. It returns error if error occurred.

func (*Request) Build

func (r *Request) Build() error

Build checks and builds the API request. It returns error if error occurred.

func (*Request) Do

func (r *Request) Do() error

Do sends and unpacks the API request. It returns error if error occurred.

func (*Request) Send

func (r *Request) Send() error

Send sends API request. It returns error if error occurred.

func (*Request) Sign

func (r *Request) Sign() error

Sign sign the API request by setting the authorization header. It returns error if error occurred.

func (*Request) SignQuery

func (r *Request) SignQuery(timeoutSeconds int) error

SignQuery sign the API request by appending query string. It returns error if error occurred.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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