paypay

package module
v0.0.0-...-85b3fc2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

paypay

______________ _____  _______________ _____  __
___  __ \  __ `/_  / / /__  __ \  __ `/_  / / /
__  /_/ / /_/ /_  /_/ /__  /_/ / /_/ /_  /_/ / 
_  .___/\__,_/ _\__, / _  .___/\__,_/ _\__, /  
/_/            /____/  /_/            /____/   

谐音佩佩,常用支付渠道对接,可以单独使用,也希望能提供基础封装能力

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteElem

type ExecuteElem func(Payload) error

func ExecuteQueue

func ExecuteQueue(queue ...ExecuteElem) ExecuteElem

ExecuteQueue combine MakeMapEndpoint func

type File

type File struct {
	Name    string `json:"name"`
	Content []byte `json:"content"`
}

type Payload

type Payload map[string]any

func (Payload) EncodeAliPaySignParams

func (pl Payload) EncodeAliPaySignParams() string

EncodeAliPaySignParams ("bar=baz&foo=foo") sorted by key.

func (Payload) EncodeURLParams

func (pl Payload) EncodeURLParams() string

EncodeURLParams ("bar=baz&foo=foo") sorted by key.

func (Payload) EncodeWeChatSignParams

func (pl Payload) EncodeWeChatSignParams(apiKey string) string

EncodeWeChatSignParams ("bar=baz&foo=foo") sorted by key.

func (Payload) Get

func (pl Payload) Get(key string) string

Get 获取参数,同 GetString()

func (Payload) GetAny

func (pl Payload) GetAny(key string) any

GetAny 获取原始参数

func (Payload) GetString

func (pl Payload) GetString(key string) string

GetString 获取参数转换string

func (Payload) JsonBody

func (pl Payload) JsonBody() (jb string)

func (Payload) MarshalXML

func (pl Payload) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (Payload) Remove

func (pl Payload) Remove(key string)

Remove 删除参数

func (Payload) Reset

func (pl Payload) Reset()

Reset 置空Payload

func (Payload) Set

func (pl Payload) Set(key string, value any, opts ...PayloadOptions) Payload

Set 设置参数

func (Payload) SetFormFile

func (pl Payload) SetFormFile(key string, file *File) Payload

SetFormFile 设置 FormFile

func (Payload) Unmarshal

func (pl Payload) Unmarshal(ptr any) (err error)

Unmarshal to struct or slice point

func (Payload) UnmarshalXML

func (pl Payload) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type PayloadOption

type PayloadOption func(*PayloadOptions)

type PayloadOptions

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

func (PayloadOptions) SetOptional

func (opt PayloadOptions) SetOptional(optional bool)

type PayloadPreSetter

type PayloadPreSetter func(pl Payload)

func PreSetter

func PreSetter(key, value string) PayloadPreSetter

type PayloadRuler

type PayloadRuler func(caller string) []Ruler

func InjectRuler

func InjectRuler(_map map[string][]Ruler) PayloadRuler

type Ruler

type Ruler struct {
	Des   string
	Alert string
	Rule  string
}

func NewRuler

func NewRuler(des, rule, alert string) Ruler

Jump to

Keyboard shortcuts

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