module

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudbaseEntity = Cloudbase{}
View Source
var DataAnalysisEntity = DataAnalysis{}
View Source
var GamematchEntity = Gamematch{}
View Source
var LockStepEntity = LockStep{}
View Source
var LoginEntity = Login{}
View Source
var SafetyControlCapabilityEntity = SafetyControlCapability{}
View Source
var SecCheckEntity = SecCheck{}
View Source
var StorageEntity = Storage{}
View Source
var SubscribeMessageEntity = SubscribeMessage{}
View Source
var UpdatableMessageEntity = UpdatableMessage{}
View Source
var UrlLinkEntity = UrlLink{}
View Source
var UrlSchemeEntity = UrlScheme{}
View Source
var WxacodeEntity = Wxacode{}

Functions

This section is empty.

Types

type Acode

type Acode struct {
	Scene     string      `json:"scene,omitempty"`
	Page      string      `json:"page,omitempty"`
	Width     int         `json:"width,omitempty"`
	AutoColor bool        `json:"auto_color,omitempty"`
	LineColor interface{} `json:"line_color,omitempty"`
	IsHyaline bool        `json:"is_hyaline,omitempty"`
}

line_color Object {"r":0,"g":0,"b":0}

type CheckMedia

type CheckMedia struct {
	MediaUrl  string `json:"media_url"`
	MediaType int    `json:"media_type"`
}

type Cloudbase

type Cloudbase struct {
	App utils.App
}

func (*Cloudbase) DescribeExtensionUploadInfo

func (a *Cloudbase) DescribeExtensionUploadInfo(body []byte) (interface{}, error)

DescribeExtensionUploadInfo 描述扩展上传文件信息 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.describeExtensionUploadInfo.html

func (*Cloudbase) GetStatistics

func (a *Cloudbase) GetStatistics(body []byte) (interface{}, error)

GetStatistics 获取云开发数据接口 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getStatistics.html

func (*Cloudbase) Init

func (a *Cloudbase) Init(app utils.App) *Cloudbase

func (*Cloudbase) Report

func (a *Cloudbase) Report(body []byte) (interface{}, error)

Report 云开发通用上报接口 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.report.html

type DataAnalysis

type DataAnalysis struct {
	App utils.App
}

func (*DataAnalysis) GetGameAnalysisData

func (a *DataAnalysis) GetGameAnalysisData(body []byte) (interface{}, error)

GetGameAnalysisData 获取小游戏分析数据。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data-analysis/analysis.getGameAnalysisData.html

func (*DataAnalysis) Init

func (a *DataAnalysis) Init(app utils.App) *DataAnalysis

type Gamematch

type Gamematch struct {
	App utils.App
}

func (*Gamematch) CreateMatchRule

func (a *Gamematch) CreateMatchRule(body []byte) (interface{}, error)

CreateMatchRule 小游戏创建对局匹配规则,并返回一个matchid。每个小游戏可以创建多个matchid对应不同的匹配规则。小游戏持有的matchid数量上限为20。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.createMatchRule.html

func (*Gamematch) DeleteMatchRule

func (a *Gamematch) DeleteMatchRule(body []byte) (interface{}, error)

DeleteMatchRule 小游戏删除对局匹配规则,每个规则对应一个唯一的matchid。 每个小游戏持有的matchid数量有限制,可以通过此接口删除无效的matchid。 删除接口在删除matchid的同时,也会释放掉matchid对应的匹配池。如果是线上正在使用的matchid,请谨慎使用该接口。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.deleteMatchRule.html

func (*Gamematch) Getallmatchrule

func (a *Gamematch) Getallmatchrule(body []byte) (interface{}, error)

Getallmatchrule 获取小游戏拥有的所有matchid及其对应的匹配规则,以及matchid的打开状态。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.getallmatchrule.html

func (*Gamematch) Init

func (a *Gamematch) Init(app utils.App) *Gamematch

func (*Gamematch) SetMatchIdOpenState

func (a *Gamematch) SetMatchIdOpenState(body []byte) (interface{}, error)

SetMatchIdOpenState 修改matchid对应的打开状态。 每个matchid都有两种状态:打开(1)和关闭(0) 用户在调用加入匹配接口时,只能加入状态为打开的matchid。状态为打开的matchid才会分配匹配池。 小程序通过updateMatchRule修改matchid对应的规则时,只能修改状态为关闭的matchid 可以通过getAllMatchRule拉取小程序所有matchid的配置信息和打开状态。 将打开状态设置为关闭(0)时,匹配服务会释放掉matchid对应的匹配池。如果是线上正在使用的matchid,请谨慎变更matchid的状态。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.setMatchIdOpenState.html

func (*Gamematch) UpdateMatchRule

func (a *Gamematch) UpdateMatchRule(body []byte) (interface{}, error)

UpdateMatchRule 修改matchid对应的匹配规则。 小游戏修改matchid对应的规则时,只能修改状态为关闭的matchid。 matchid的状态可以通过setMatchIdOpenState修改。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.updateMatchRule.html

type LockStep

type LockStep struct {
	App utils.App
}

func (*LockStep) CreateGameRoom

func (a *LockStep) CreateGameRoom(body []byte) (interface{}, error)

CreateGameRoom 第三方后台创建帧同步游戏房间 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.createGameRoom.html

func (*LockStep) GetGameFrame

func (a *LockStep) GetGameFrame(accessInfo, beginFrameId, endFrameId string) (interface{}, error)

GetGameFrame 分片拉取对局游戏帧 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.getGameFrame.html

func (*LockStep) GetGameIdentityInfo

func (a *LockStep) GetGameIdentityInfo(accessInfo string) (interface{}, error)

GetGameIdentityInfo 获取对局玩家位次信息 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.getGameIdentityInfo.html

func (*LockStep) GetGameRoomInfo

func (a *LockStep) GetGameRoomInfo(accessInfo string) (interface{}, error)

GetGameRoomInfo 获取指定房间信息 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.getGameRoomInfo.html

func (*LockStep) Init

func (a *LockStep) Init(app utils.App) *LockStep

type Login

type Login struct {
	App utils.App
}

func (*Login) CheckSessionKey

func (a *Login) CheckSessionKey(openid, signature, sigMethod string) (interface{}, error)

CheckSessionKey 校验服务器所保存的登录态 session_key 是否合法。为了保持 session_key 私密性,接口不明文传输 session_key,而是通过校验登录态签名完成。 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/login/auth.checkSessionKey.html

func (*Login) Code2Session

func (a *Login) Code2Session(code string) (User, error)

Code2Session 登录凭证校验。通过 wx.login 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录。 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html

func (*Login) Init

func (a *Login) Init(app utils.App) *Login

type Response

type Response struct {
	Errcode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type SafetyControlCapability

type SafetyControlCapability struct {
	App utils.App
}

func (*SafetyControlCapability) GetUserRiskRank

func (a *SafetyControlCapability) GetUserRiskRank(body []byte) (interface{}, error)

GetUserRiskRank 根据提交的用户信息数据获取用户的安全等级 risk_rank,无需用户授权。 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/safety-control-capability/riskControl.getUserRiskRank.html

func (*SafetyControlCapability) Init

type SecCheck

type SecCheck struct {
	App utils.App
}

func (*SecCheck) ImgSecCheck

func (a *SecCheck) ImgSecCheck(file io.Reader, fileName string) (Response, error)

ImgSecCheck 校验一张图片是否含有违法违规内容。详见内容安全解决方案 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.imgSecCheck.html

func (*SecCheck) Init

func (a *SecCheck) Init(app utils.App) *SecCheck

func (*SecCheck) MediaCheckAsync

func (a *SecCheck) MediaCheckAsync(body []byte) (interface{}, error)

MediaCheckAsync 异步校验图片/音频是否含有违法违规内容。 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html

func (*SecCheck) MsgSecCheck

func (a *SecCheck) MsgSecCheck(body []byte) (Response, error)

MsgSecCheck 检查一段文本是否含有违法违规内容。 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.msgSecCheck.html

type SendImage

type SendImage struct {
	Touser  string `json:"touser"`
	Msgtype string `json:"msgtype"`
	Image   struct {
		MediaId string `json:"media_id"`
	} `json:"image"`
}
type SendLink struct {
	Touser  string `json:"touser"`
	Msgtype string `json:"msgtype"`
	Link    struct {
		Title       string `json:"title"`
		Description string `json:"description"`
		Url         string `json:"url"`
		ThumbUrl    string `json:"thumb_url"`
	} `json:"link"`
}

type SendMini

type SendMini struct {
	Touser          string `json:"touser"`
	Msgtype         string `json:"msgtype"`
	Miniprogrampage struct {
		Title        string `json:"title"`
		Pagepath     string `json:"pagepath"`
		ThumbMediaId string `json:"thumb_media_id"`
	} `json:"miniprogrampage"`
}

type SendText

type SendText struct {
	Touser  string `json:"touser"`
	Msgtype string `json:"msgtype"`
	Text    struct {
		Content string `json:"content"`
	} `json:"text"`
}

type Session

type Session struct {
	Openid     string `json:"openid"`
	SessionKey string `json:"session_key"`
	Unionid    string `json:"unionid"`
	Errcode    int    `json:"errcode"`
	ErrMsg     string `json:"errmsg"`
}

type Storage

type Storage struct {
	App utils.App
}

func (*Storage) Init

func (a *Storage) Init(app utils.App) *Storage

func (*Storage) RemoveUserStorage

func (a *Storage) RemoveUserStorage(body []byte) (interface{}, error)

RemoveUserStorage 删除已经上报到微信的key-value数据 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.removeUserStorage.html

func (*Storage) SetUserInteractiveData

func (a *Storage) SetUserInteractiveData(body []byte) (interface{}, error)

SetUserInteractiveData 删除已经上报到微信的key-value数据 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserInteractiveData.html

func (*Storage) SetUserStorage

func (a *Storage) SetUserStorage(body []byte) (interface{}, error)

SetUserStorage 删除已经上报到微信的key-value数据 https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserStorage.html

type Subscribe

type Subscribe struct {
	Touser     string      `json:"touser,omitempty"`
	TemplateId string      `json:"template_id,omitempty"`
	Page       string      `json:"page,omitempty"`
	Data       interface{} `json:"data,omitempty"`
}

type SubscribeAdd

type SubscribeAdd struct {
	Tid       string `json:"tid,omitempty"`
	KidList   []int  `json:"kidList,omitempty"`
	SceneDesc string `json:"sceneDesc,omitempty"`
}

type SubscribeMessage

type SubscribeMessage struct {
	App utils.App
}

func (*SubscribeMessage) Init

type Template

type Template struct {
	Touser     string      `json:"touser,omitempty"`
	TemplateId string      `json:"template_id,omitempty"`
	Page       string      `json:"page,omitempty"`
	Data       interface{} `json:"data,omitempty"`
}

type Text

type Text struct {
	Content string `json:"content"`
}

type TextResponse

type TextResponse struct {
	Errcode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type UpdatableMessage

type UpdatableMessage struct {
	App utils.App
}

func (*UpdatableMessage) CreateActivityId

func (a *UpdatableMessage) CreateActivityId(openid, unionid string) (interface{}, error)

CreateActivityId 创建被分享动态消息或私密消息的 activity_id。详见动态消息。 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html

func (*UpdatableMessage) Init

func (*UpdatableMessage) SetUpdatableMsg

func (a *UpdatableMessage) SetUpdatableMsg(body []byte) (interface{}, error)

SetUpdatableMsg 修改被分享的动态消息。详见动态消息。 http://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.setUpdatableMsg.html

type UrlLink struct {
	App utils.App
}

func (*UrlLink) Init

func (a *UrlLink) Init(app utils.App) *UrlLink

type UrlScheme

type UrlScheme struct {
	App utils.App
}

func (*UrlScheme) Init

func (a *UrlScheme) Init(app utils.App) *UrlScheme

type User

type User struct {
	Session string `json:"session,omitempty"`
	Openid  string `json:"openid,omitempty"`
	Appid   string `json:"appid,omitempty"`
	Unionid string `json:"unionid,omitempty"`
	Status  bool   `json:"status,omitempty"`
}

type Wxacode

type Wxacode struct {
	App utils.App
}

func (*Wxacode) CreateQRCode

func (a *Wxacode) CreateQRCode(path, scene string) (interface{}, error)

CreateQRCode 获取小程序二维码,适用于需要的码数量较少的业务场景。通过该接口生成的小程序码,永久有效,有数量限制,详见获取二维码。 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.createQRCode.html

func (*Wxacode) Get

func (a *Wxacode) Get(path, scene string) (interface{}, error)

Get 获取小程序码,适用于需要的码数量较少的业务场景。通过该接口生成的小程序码,永久有效,有数量限制,详见获取二维码。 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.get.html

func (*Wxacode) GetUnlimited

func (a *Wxacode) GetUnlimited(path, scene string) (interface{}, error)

GetUnlimited 获取小程序码,适用于需要的码数量极多的业务场景。通过该接口生成的小程序码,永久有效,数量暂无限制。 更多用法详见 获取二维码。 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html

func (*Wxacode) Init

func (a *Wxacode) Init(app utils.App) *Wxacode

Jump to

Keyboard shortcuts

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