miniprogram

package
v0.0.0-...-15a7b9f Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(encryptedData []byte, sessionKey string, iv string) (*gjson.Json, error)

小程序敏感信息解密 @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html

Types

type AppCode

type AppCode struct {
	Mp  *MiniProgram
	Raw []byte
}

小程序码

func (*AppCode) CreateQrCode

func (c *AppCode) CreateQrCode(path string, width ...int) *AppCode

获取小程序码

func (*AppCode) Get

func (c *AppCode) Get(path string, config ...g.Map) *AppCode

获取小程序码 有数量限制,详细查看@see https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.get.html

func (*AppCode) GetUnlimit

func (c *AppCode) GetUnlimit(scene string, config ...g.Map) *AppCode

获取小程序码 不限制数量

func (*AppCode) Save

func (c *AppCode) Save(path string, name ...string) (string, *AppCodeError)

Save 保存小程序码到文件

type AppCodeError

type AppCodeError struct {
	ErrCode int    //错误代码
	ErrMsg  string //错误信息
}

错误

type Config

type Config struct {
	AppID  string //appid
	Secret string //secret
	Cache  *gcache.Cache
	Logger *log.Logger
}

type Credentials

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

func (*Credentials) Get

func (c *Credentials) Get() map[string]string

type MiniProgram

type MiniProgram struct {
	Config      Config
	AccessToken auth.AccessToken
	Logger      *log.Logger
	Cache       *gcache.Cache
}

func New

func New(config Config) *MiniProgram

New

func NewWithOutToken

func NewWithOutToken(config Config) *MiniProgram

func (*MiniProgram) AppCode

func (mp *MiniProgram) AppCode() *AppCode

AppCode

func (*MiniProgram) CheckMediaAsync

func (mp *MiniProgram) CheckMediaAsync(url string, mediaType int) *http.ResponseData

CheckMediaAsync 异步检查图片音频 !!!异步通知 @see https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html

func (*MiniProgram) GetClient

func (mp *MiniProgram) GetClient() *base.Client

func (*MiniProgram) GetClientWithToken

func (mp *MiniProgram) GetClientWithToken() *base.Client

func (*MiniProgram) Session

func (mp *MiniProgram) Session(code string) *http.ResponseData

登录凭证校验

Jump to

Keyboard shortcuts

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