hasaki_wechat_tpp

package
v0.0.0-...-94578c2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	WeappAuditSuccess message.EventType = "weapp_audit_success"
	WeappAuditFail    message.EventType = "weapp_audit_fail"
	WeappAuditDelay   message.EventType = "weapp_audit_delay"
)
View Source
const ApiBindOpenAccount = "https://api.weixin.qq.com/cgi-bin/open/bind"
View Source
const ApiCreateOpenAccount = "https://api.weixin.qq.com/cgi-bin/open/create"
View Source
const ApiGetOpenAccount = "https://api.weixin.qq.com/cgi-bin/open/get"
View Source
const ApiUnbindOpenAccount = "https://api.weixin.qq.com/cgi-bin/open/unbind"

Variables

View Source
var IsStartCheckSyncAuthrAccessTokenTask = true
View Source
var OpenPlatformCache cache.Cache
View Source
var SyncRelease = false

Functions

func AdminInitialize

func AdminInitialize(router *hskgin.GinHelper)

func BindOpenAccount

func BindOpenAccount(appid string, openAppid string) (err error)

func CreateLimitQr

func CreateLimitQr(appid string, scene interface{}) (string, error)

func CreateOpenAccount

func CreateOpenAccount(appid string) (openAppid string, err error)

func CreateTmpQr

func CreateTmpQr(appid string, scene interface{}, expired ...time.Duration) (string, error)

func CustomLimitQr

func CustomLimitQr(appid string, scene interface{}, width int) (string, error)

func DecryptPlainData

func DecryptPlainData(appid, sessionKey, encryptedData, iv string) (*encryptor.PlainData, error)

func EnableOpenPlatformRelease

func EnableOpenPlatformRelease()

func FastUnbindOpenAccount

func FastUnbindOpenAccount(appid string) (err error)

func GetAuditStatus

func GetAuditStatus(event message.EventType) int

func GetCodeTemplateByDraftId

func GetCodeTemplateByDraftId(draftId, timestamp interface{}) (*model.CodeTemplate, bool, error)

func GetMiniProgram

func GetMiniProgram(appid string) *miniprogram.MiniProgram

func GetOfficialAccount

func GetOfficialAccount(appid string) *officialaccount.OfficialAccount

func GetOpenAccount

func GetOpenAccount(appid string) (openAppid string, err error)

func GetOpenPlatform

func GetOpenPlatform() *openplatform.OpenPlatform

func GetWXACodeUnlimit

func GetWXACodeUnlimit(appid string, qr qrcode.QRCoder) ([]byte, error)
func GetWXACodeUnlimitLink(appid string, qr qrcode.QRCoder) (string, error)

func InsertCodeTemplate

func InsertCodeTemplate(ct *model.CodeTemplate) error

func StartCheckSyncAuthrAccessTokenTask

func StartCheckSyncAuthrAccessTokenTask()

func SyncOpenAccount

func SyncOpenAccount(appid string, openAppid string) (err error)

子开放平台相关

func UnbindOpenAccount

func UnbindOpenAccount(appid string, openAppid string) (err error)

Types

type AuditReason

type AuditReason struct {
	Reason     string `json:"reason"`
	ScreenShot string `json:"screen_shot"`
}

func GetAuditReason

func GetAuditReason(body []byte) (*AuditReason, error)

getMessage 解析微信返回的消息

type MiniParam

type MiniParam struct {
	Appids []string               `json:"appids"`
	Commit *code.CommitParam      `json:"commit"`
	Submit *code.SubmitAuditParam `json:"submit"`
}

一键审核

type OpenAccountResult

type OpenAccountResult struct {
	OpenAppid string `json:"open_appid"`
}

type TokenHandleExt

type TokenHandleExt struct {
	Appid string
	// contains filtered or unexported fields
}

func (*TokenHandleExt) GetAccessToken

func (t *TokenHandleExt) GetAccessToken() (string, error)

type Wxopens

type Wxopens struct {
	Items []struct {
		Status              int    `json:"status"`
		Username            string `json:"username"`
		Appid               string `json:"appid,omitempty"`
		Source              string `json:"source"`
		Nickname            string `json:"nickname"`
		Selected            int    `json:"selected,omitempty"`
		NearbyDisplayStatus int    `json:"nearby_display_status,omitempty"`
		Released            int    `json:"released,omitempty"`
		HeadimgURL          string `json:"headimg_url"`
		FuncInfos           []struct {
			Status int    `json:"status"`
			ID     int    `json:"id"`
			Name   string `json:"name"`
		} `json:"func_infos"`
		CopyVerifyStatus int    `json:"copy_verify_status,omitempty"`
		Email            string `json:"email,omitempty"`
	} `json:"items"`
}

func WxaMpLinkGet

func WxaMpLinkGet(appid string) (*Wxopens, error)

type WxopensResult

type WxopensResult struct {
	Errcode int     `json:"errcode"`
	Errmsg  string  `json:"errmsg"`
	Wxopens Wxopens `json:"wxopens"`
}

Jump to

Keyboard shortcuts

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