request

package
v0.0.0-...-b8845d0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCallQiMenAPIFailed = errors.New("call Qi Men API failed")
	ErrQiMenAPIBizError   = errors.New("Qi Men API biz error")
)

Functions

func ValidateSignature

func ValidateSignature(input, key string) bool

Types

type Config

type Config struct {
	BaseURL            string
	AppKey             string
	AppSecret          string
	MsgType            string
	LogisticProviderId string // 货主编码
	ToCode             string
	PartnerCode        string
	FromCode           string
}

type Request

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

func New

func New(config Config) Request

func (Request) Post

func (req Request) Post(data interface{}) (Values, error)

type Values

type Values map[string]interface{}

func (Values) Delete

func (vals Values) Delete(key string)

func (Values) Get

func (vals Values) Get(key string) interface{}

func (Values) GetResult

func (vals Values) GetResult(resType interface{}) (interface{}, error)

func (Values) Set

func (vals Values) Set(key string, value interface{})

func (Values) String

func (vals Values) String() string

func (Values) ToQueryParams

func (vals Values) ToQueryParams() (map[string]string, error)

Jump to

Keyboard shortcuts

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