auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallWxmp

func CallWxmp(cfgName string, genParams FnGeneParams, method string, call callwxmp.FnCallWxmp, res callwxmp.WxmpResult) error

func FetchBody

func FetchBody(cfgName string, genParams FnGeneParams, method string, getBody callwxmp.FnGetBody) (string, io.ReadCloser, error)

func GetPaidUnionIdByTradeNo

func GetPaidUnionIdByTradeNo(cfgName string, openId string, mchId, outTradeNo string) (unionId string, err error)

get paied union_id by open_id, mch_id & out_trade_no

func GetPaidUnionIdByTxId

func GetPaidUnionIdByTxId(cfgName string, openId string, txId string) (unionId string, err error)

get paied union_id by open_id & transaction_id

Types

type AccessToken

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

func NewAccessToken

func NewAccessToken(name string) *AccessToken

func (*AccessToken) Get

func (token *AccessToken) Get() (string, error)

type FnGeneParams

type FnGeneParams func(accessToken string) (url string, body interface{}, headers map[string]string)

type Session

type Session struct {
	Openid     string
	SessionKey string `json:"session_key"`
	Unionid    string
}

func Code2Session

func Code2Session(cfgName string, code string) (*Session, error)

Jump to

Keyboard shortcuts

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