dada

package
v0.0.0-...-faf7e35 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnlineUrl   = "https://newopen.imdada.cn"
	NoOnlineUrl = "http://newopen.qa.imdada.cn"
	Timeout     = 5000  // 超时时间 5000ms
	Version     = "1.0" // api版本
	Format      = "json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Client      *http.Client // Assuming client type is defined elsewhere
	AppKey      string
	AppSecret   string
	SourceID    string
	Host        string
	URL         string
	RequestData io.Reader // 请求参数map
}

Base represents the main structure for Dada delivery service.

func New

func New(sourceID, appKey, appSecret string, online bool) *Base

New is the constructor for Base.

func (*Base) Result

func (b *Base) Result() (string, error)

Result 获取结果

func (*Base) Sign

func (b *Base) Sign(data map[string]interface{}) string

Sign generates the MD5 signature.

func (*Base) WithRequestParams

func (b *Base) WithRequestParams(url string, data map[string]interface{}) *Base

WithRequestParams ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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