encryptor

package
v0.0.0-...-ac39816 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(appid string) *ctx

New 消息解密

Types

type Ctx

type Ctx interface {
	GetPhoneNumber(session, iv, encryptData string) (*PhoneNumber, error)
	GetUserInfo(session, iv, encryptData string) (*UserInfo, error)
	DecryptData(session, iv, encryptData string) ([]byte, error)
}

type PhoneNumber

type PhoneNumber struct {
	PhoneNumber     string    `json:"phoneNumber"`
	PurePhoneNumber string    `json:"purePhoneNumber"`
	CountryCode     string    `json:"countryCode"`
	Watermark       watermark `json:"watermark"`
}

type UserInfo

type UserInfo struct {
	Openid    string    `json:"openId"`
	NickName  string    `json:"nickName"`
	Gender    int       `json:"gender"`
	City      string    `json:"city"`
	Province  string    `json:"province"`
	Country   string    `json:"country"`
	AvatarURL string    `json:"avatarUrl"`
	Unionid   string    `json:"unionId"`
	Watermark watermark `json:"watermark"`
}

Jump to

Keyboard shortcuts

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