params

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 16:37:00 * @LastEditTime: 2022-05-14 16:37:03 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\access_token.go

* @Author: i@douxuefeng.cn * @Date: 2023-01-07 00:34:46 * @LastEditTime: 2023-01-07 17:18:28 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /iris-api/Volumes/Data/jobs/go-utils/wechat/mp/params/base_msg.go

* @Author: i@douxuefeng.cn * @Date: 2023-01-07 14:46:01 * @LastEditTime: 2023-01-07 14:49:45 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/mp/params/media.go

* @Author: i@douxuefeng.cn * @Date: 2022-06-02 16:04:48 * @LastEditTime: 2022-06-02 16:07:11 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\mp_msg.go

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 16:37:54 * @LastEditTime: 2022-05-14 16:38:01 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\openapi.go

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 16:38:13 * @LastEditTime: 2022-06-02 15:27:08 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\params.go

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 16:38:26 * @LastEditTime: 2022-05-14 16:38:28 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\serve.go

* @Author: i@douxuefeng.cn * @Date: 2022-05-14 16:38:39 * @LastEditTime: 2022-05-14 16:38:42 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\sns.go

* @Author: i@douxuefeng.cn * @Date: 2022-06-02 15:11:15 * @LastEditTime: 2022-06-02 16:15:32 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\mp\params\template_msg.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken added in v0.2.0

type AccessToken struct {
	AccessToken string `json:"access_token,omitempty"`
	ExpiresIn   int64  `json:"expires_in,omitempty"`
	Errcode     int    `json:"errcode,omitempty"`
	Errmsg      string `json:"errmsg,omitempty"`
}

type Article added in v0.2.5

type Article struct {
	XMLName     xml.Name `xml:"item"`
	Title       string   `xml:"Title"`
	Description string   `xml:"Description"`
	PicUrl      string   `xml:"PicUrl"`
	Url         string   `xml:"Url"`
}

type BaseMsg added in v0.2.5

type BaseMsg struct {
	ToUserName   string `xml:"ToUserName"`
	FromUserName string `xml:"FromUserName"`
	CreateTime   int64  `xml:"CreateTime"`
	MsgType      string `xml:"MsgType"`
	MsgId        int64  `xml:"MsgId"`
	MsgDataId    string `xml:"MsgDataId"`
	Idx          int    `xml:"Idx"`
	Content      string `xml:"Content"`
	PicUrl       string `xml:"PicUrl"`
	MediaId      string `xml:"MediaId"`

	Format       string `xml:"Format"`
	ThumbMediaId string `xml:"ThumbMediaId"`

	Location_X string `xml:"Location_X"`
	Location_Y string `xml:"Location_Y"`
	Scale      string `xml:"Scale"`
	Label      string `xml:"Label"`

	Title       string `xml:"Title"`
	Url         string `xml:"Url"`
	Description string `xml:"Description"`

	Event    string `xml:"Event"`
	EventKey string `xml:"EventKey"`
	Ticket   string `xml:"Ticket"`

	// EventLocation
	Latitude  string `xml:"Latitude"`
	Longitude string `xml:"Longitude"`
	Precision string `xml:"Precision"`
}

type BaseMsgReply added in v0.2.5

type BaseMsgReply struct {
	XMLName      struct{} `xml:"xml"`
	ToUserName   string   `xml:"ToUserName"`
	FromUserName string   `xml:"FromUserName"`
	CreateTime   int64    `xml:"CreateTime"`
	MsgType      string   `xml:"MsgType"`
	// text消息
	Content CDATA `xml:"Content,omitempty"`
	// image消息
	Image struct {
		MediaId string `xml:"MediaId"`
	} `xml:"Image,omitempty"`
	// voice消息
	Voice struct {
		MediaId string `xml:"MediaId"`
	} `xml:"Voice,omitempty"`
	// video消息
	Video struct {
		MediaId     string `xml:"MediaId"`
		Title       string `xml:"Title"`
		Description string `xml:"Description" `
	} `xml:"Video,omitempty"`
	// music 消息
	Music struct {
		Title        string `xml:"Title"`
		Description  string `xml:"Description"`
		MusicUrl     string `xml:"MusicUrl"`
		HQMusicUrl   string `xml:"HQMusicUrl"`
		ThumbMediaId string `xml:"ThumbMediaId"`
	} `xml:"Music,omitempty"`
	// news消息
	ArticleCount int        `xml:"ArticleCount"`
	Articles     *[]Article `xml:"Articles>Article"`
}

type CDATA added in v0.2.5

type CDATA string

func (CDATA) MarshalXML added in v0.2.5

func (c CDATA) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type CheckQuota added in v0.2.0

type CheckQuota struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
	Quota   Quota  `json:"quota,omitempty"`
}

type CheckRid added in v0.2.0

type CheckRid struct {
	Errcode int        `json:"errcode"`
	Errmsg  string     `json:"errmsg"`
	Request RidRequest `json:"request"`
}

type Err added in v0.2.0

type Err struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
	Msgid   string `json:"msgid,omitempty"`
}

type JsapiSignature added in v0.2.0

type JsapiSignature struct {
	Errcode     int    `json:"errcode"`
	Errmsg      string `json:"errmsg"`
	AppId       string `json:"appId"`
	Timestamp   int64  `json:"timestamp"`
	NonceStr    string `json:"noncestr"`
	Signature   string `json:"signature"`
	JsapiTicket string `json:"jsapi_ticket"`
	Url         string `json:"url"`
}

type JsapiTicket added in v0.2.0

type JsapiTicket struct {
	Errcode   int    `json:"errcode"`
	Errmsg    string `json:"errmsg"`
	Ticket    string `json:"ticket"`
	ExpiresIn int64  `json:"expires_in"`
}

type MediaResponse added in v0.2.5

type MediaResponse struct {
	ErrCode   int    `json:"errcode"`
	ErrMsg    string `json:"errmsg,omitempty"`
	VideoUrl  string `json:"video_url,omitempty"`
	Type      string `json:"type,omitempty"`
	MediaId   string `json:"media_id,omitempty"`
	CreatedAt int64  `json:"created_at,omitempty"`
	Url       string `json:"url,omitempty"`
}

type MpMsg added in v0.2.1

type MpMsg struct {
	XMLName      struct{} `xml:"xml" json:"-"`
	ToUserName   string   `xml:"ToUserName"`
	FromUserName string   `xml:"FromUserName"`
	CreateTime   int64    `xml:"CreateTime"`
	MsgType      string   `xml:"MsgType"`
	MsgId        int64    `xml:"MsgId,omitempty"`
	//text
	Content string `xml:"Content,omitempty"`
	// image
	PicUrl  string `xml:"PicUrl,omitempty"`
	MediaId string `xml:"MediaId,omitempty"`
	// voice
	Format string `xml:"Format,omitempty"`
	// 语音识别
	Recognition string `xml:"Recognition,omitempty"`
	//  video / shortvideo
	ThumbMediaId string `xml:"ThumbMediaId,omitempty"`
	// location
	Location_X string `xml:"Location_X,omitempty"`
	Location_Y string `xml:"Location_Y,omitempty"`
	Scale      string `xml:"Scale,omitempty"`
	Label      string `xml:"Label,omitempty"`
	// link
	Title       string `xml:"Title,omitempty"`
	Description string `xml:"Description,omitempty"`
	Url         string `xml:"Url,omitempty"`
	// event subscribe unsubscribe SCAN LOCATION CLICK
	Event     string `xml:"Event,omitempty"`
	EventKey  string `xml:"EventKey,omitempty"`
	Ticket    string `xml:"Ticket,omitempty"`
	Latitude  string `xml:"Latitude,omitempty"`
	Longitude string `xml:"Longitude,omitempty"`
	Precision string `xml:"Precision,omitempty"`
}

type Quota added in v0.2.0

type Quota struct {
	DailyLimit int `json:"daily_limit"`
	Used       int `json:"used"`
	Remain     int `json:"remain"`
}

type RidRequest added in v0.2.0

type RidRequest struct {
	InvokeTime   string `json:"invoke_time"`
	CostInMs     string `json:"cost_in_ms"`
	RequestUrl   string `json:"request_url"`
	RequestBody  string `json:"request_body"`
	ResponseBody string `json:"response_body"`
}

type Serve

type Serve struct {
	Echostr   string `url:"echostr"`
	Timestamp string `url:"timestamp"`
	Nonce     string `url:"nonce"`
	Signature string `url:"signature"`
}

type SnsBaseInfo added in v0.2.0

type SnsBaseInfo struct {
	Errcode       int    `json:"errcode"`
	Errmsg        string `json:"errmsg"`
	AccessToken   string `json:"access_token"`
	ExpiresIn     int64  `json:"expires_in"`
	Refresh_token string `json:"refresh_token"`
	Openid        string `json:"openid"`
	Scope         string `json:"scope"`
}

type SnsUserInfo

type SnsUserInfo struct {
	Errcode    int    `json:"errcode"`
	Errmsg     string `json:"errmsg"`
	Openid     string `json:"openid"`
	Nickname   string `json:"nickname"`
	Sex        *int   `json:"sex"`
	Province   string `json:"province"`
	City       string `json:"city"`
	Country    string `json:"country"`
	Headimgurl string `json:"headimgurl"`
	Privilege  string `json:"privilege"`
	Unionid    string `json:"unionid"`
}

type TemplateMsgItem added in v0.2.1

type TemplateMsgItem struct {
	Value string `json:"value"`
	Color string `json:"color"`
}

type TemplateMsgMiniprogram added in v0.2.1

type TemplateMsgMiniprogram struct {
	Appid    string `json:"appid"`
	Pagepath string `json:"pagepath"`
}

type TemplateMsgParams added in v0.2.1

type TemplateMsgParams struct {
	Touser      string                     `json:"touser"` //openid
	TemplateId  string                     `json:"template_id"`
	Url         string                     `json:"url"`
	Miniprogram TemplateMsgMiniprogram     `json:"miniprogram"`
	Data        map[string]TemplateMsgItem `json:"data"`
}

Jump to

Keyboard shortcuts

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