sf

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl     = "https://openic.sf-express.com" // 线上地址
	Timeout     = 5000                            // 超时时间 5000ms
	ContentType = "application/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
	DevID       string
	DevKey      string
	Host        string
	URL         string
	RequestData io.Reader // 请求参数map
}

Base represents the main structure for Dada delivery service.

func New

func New(devID, devKey string) *Base

New is the constructor for the Base struct

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