mp

package
v0.0.0-...-0747d37 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AppID appid
	AppID string

	// AppSecret app secret
	AppSecret string

	// SessionKey sessionKey
	SessionKey string
)

Functions

This section is empty.

Types

type MP

type MP struct {
	NickName  string `json:"nickName,omitempty"`          // 用户昵称
	Gender    int    `json:"gender,omitempty"`            // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
	Language  string `json:"language,omitempty"`          // 语言
	City      string `json:"city,omitempty"`              // 普通用户个人资料填写的城市
	Province  string `json:"province,omitempty"`          // 用户个人资料填写的省份
	Country   string `json:"country,omitempty"`           // 国家,如中国为CN
	AvatarURL string `json:"avatarUrl,omitempty"`         // 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空。若用户更换头像,原有头像URL将失效。
	OpenID    string `json:"openid,omitempty,omitempty"`  // 用户的唯一标识
	UnionID   string `json:"unionid,omitempty,omitempty"` // 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。详见:获取用户个人信息(UnionID机制)
	OpenGID   string `json:"openGId,omitempty"`           // 群对当前小程序的唯一 ID
}

MP mini program

func NewMP

func NewMP() *MP

NewMP new mini program

func (MP) User

func (m MP) User(encryptedData, iv string) (MP, error)

User user date 2017-06-19 author andy.jiang

func (MP) Verify

func (m MP) Verify(rawData MP, signature string) bool

Verify verify date 2017-06-19 author andy.jiang

type WMP

type WMP struct {
	MP
	Watermark Watermark `json:"watermark"` // 水印
}

WMP watermark mp

type Watermark

type Watermark struct {
	AppID     string `json:"appid,omitempty"`
	TimeStamp int    `json:"timestamp,omitempty"`
}

Watermark water mark

Jump to

Keyboard shortcuts

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