request

package
v0.0.0-...-1187d55 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package request Copyright: Copyright (c) 2020<br> Company: 易宝支付(YeePay)<br> @author : yunmei.wu @time : 2023/3/16 3:22 PM

Index

Constants

View Source
const (
	SERVER_ROOT             = "https://openapi.yeepay.com/yop-center"
	YOS_SERVER_ROOT         = "https://yos.yeepay.com/yop-center"
	RSA2048                 = "RSA2048"
	YOP_PLATFORM_PUBLIC_KEY = "" /* 392-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func ToStringE

func ToStringE(i any) string

Types

type IsvPriKey

type IsvPriKey struct {
	// 密钥类型:RSA2048
	CertType string
	// 私钥值
	Value string
}

type PlatformPubKey

type PlatformPubKey struct {
	// 密钥类型:RSA2048
	CertType string
	// 公钥值
	Value string
}

type YopRequest

type YopRequest struct {
	// 服务地址,一般情况无需指定
	ServerRoot string
	RequestId  string
	ApiUri     string
	HttpMethod string
	AppId      string
	IsvPriKey  IsvPriKey
	// 平台公钥,一般情况无需指定
	PlatformPubKey PlatformPubKey
	// form请求的参数
	Params map[string][]string
	// json请求参数
	Content string
	// 请求头
	Headers map[string]string
	// 文件
	Files map[string]*os.File
}

func BuildYopRequest

func BuildYopRequest() *YopRequest

func (*YopRequest) AddFile

func (request *YopRequest) AddFile(name string, f *os.File)

func (*YopRequest) AddParam

func (request *YopRequest) AddParam(name string, value any)

func (*YopRequest) HandleServerRoot

func (request *YopRequest) HandleServerRoot()

Jump to

Keyboard shortcuts

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