v2

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

Documentation

Index

Constants

View Source
const (
	OnlineUrl   = "https://openapi.uupt.com"
	NoOnlineUrl = "http://openapi.test.uupt.com"
	Timeout     = 5000 // 超时时间 5000ms
	ContentType = "application/x-www-form-urlencoded"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Client      *http.Client // Change this to your actual client type
	AppID       string
	AppKey      string
	OpenID      string
	Host        string
	URL         string
	Online      bool      // true: 正式 false: 沙箱
	RequestData io.Reader // 请求参数map
}

func New

func New(appID, appKey, openID string, online bool) *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