wechat

package
v0.0.0-...-3cd5d6d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken() (string, error)

Types

type AuthLinkRequest

type AuthLinkRequest struct {
	CallbackUrl string `form:"callback_url" json:"callback_url"`
	AuthType    int    `json:"auth_type" form:"auth_type"`
	BizAppID    string `form:"auth_type"`
	IsMobile    bool   `form:"is_mobile"`
}

func (*AuthLinkRequest) Init

func (a *AuthLinkRequest) Init()

type AuthLinkRsp

type AuthLinkRsp struct {
	Code string `json:"code"`
	Link string `json:"link"`
}

type Authorizer

type Authorizer struct {
	AuthorizerAppid string `xml:"AuthorizerAppid"`
}

type BaseMessageDecEncrypt

type BaseMessageDecEncrypt struct {
	InfoType   string `xml:"InfoType"`
	AppId      string `xml:"AppId"`
	CreateTime int64  `xml:"CreateTime"`
	XmlByte    string
	OriginXml  string
	ComponentVerifyTicketEncrypt
	NotifyThirdFasterRegister
	Authorizer
}

func (*BaseMessageDecEncrypt) Init

func (o *BaseMessageDecEncrypt) Init()

func (*BaseMessageDecEncrypt) SaveMessage

func (o *BaseMessageDecEncrypt) SaveMessage()

type ComponentVerifyTicketEncrypt

type ComponentVerifyTicketEncrypt struct {
	ComponentVerifyTicket string `xml:"ComponentVerifyTicket"`
}

type IOpenPlatform

type IOpenPlatform interface {
	Platform(isToken bool) *openplatform.OpenPlatform
	DecryptMsg(message []byte) (*BaseMessageDecEncrypt, error)
	GetLinkByCode(code string) (string, error)
	AuthLink(req *AuthLinkRequest) (authLin *AuthLinkRsp, err error)
	AccountInfo(authCode string) error
	DaiLiAuth() (string, error)
	Open(ctx *gin.Context, appid string)
}

func NewOpenPlatform

func NewOpenPlatform(isToken bool) (IOpenPlatform, error)

type MessageEncrypt

type MessageEncrypt struct {
	AppId   string `xml:"AppId"`
	Encrypt string `xml:"Encrypt"`
}

type NotifyThirdFasterRegister

type NotifyThirdFasterRegister struct {
	Status int    `xml:"status"`
	Msg    string `xml:"msg"`
	Info   struct {
		Name               string `xml:"name"`
		Code               string `xml:"code"`
		CodeType           int    `xml:"code_type"`
		LegalPersonaWechat string `xml:"legal_persona_wechat"`
		LegalPersonaName   string `xml:"legal_persona_name"`
		ComponentPhone     string `xml:"component_phone"`
	} `xml:"info"`
}

type OpenPlatform

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

func (*OpenPlatform) AccountInfo

func (o *OpenPlatform) AccountInfo(authCode string) error
func (o *OpenPlatform) AuthLink(req *AuthLinkRequest) (authLin *AuthLinkRsp, err error)

func (*OpenPlatform) DaiLiAuth

func (o *OpenPlatform) DaiLiAuth() (string, error)

func (*OpenPlatform) DecryptMsg

func (o *OpenPlatform) DecryptMsg(message []byte) (*BaseMessageDecEncrypt, error)

func (*OpenPlatform) GetLinkByCode

func (o *OpenPlatform) GetLinkByCode(code string) (string, error)

func (*OpenPlatform) Open

func (o *OpenPlatform) Open(ctx *gin.Context, appid string)

func (*OpenPlatform) Platform

func (o *OpenPlatform) Platform(isToken bool) *openplatform.OpenPlatform

type Tick

type Tick struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data string `json:"data"`
}

Jump to

Keyboard shortcuts

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