PlatformProvider

package
v0.0.0-...-8a14603 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageFrame

type ImageFrame struct {
	MediaId string `json:"media_id"`
}
type TextResponse struct {
	XMLName      xml.Name `xml:"xml"`
	ToUserName   string   `xml:"ToUserName"`
	FromUserName string   `xml:"FromUserName"`
	CreateTime   int64    `xml:"CreateTime"`
	MsgType      string   `xml:"MsgType"`
	Content      string   `xml:"Content"`
}

type ImageResponse

type ImageResponse struct {
	ToUser  string     `json:"touser"`
	MsgType string     `json:"msgtype"`
	Image   ImageFrame `json:"image"`
}

type PlatformProvider

type PlatformProvider interface {
	GetName() string
	GetMeta() map[string]string
	ReConfigure(f string) (bool, error)
	SendMsg(msg *Protocol.Message) bool
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

type TextFrame

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

type TextResponse

type TextResponse struct {
	ToUser  string    `json:"touser"`
	MsgType string    `json:"msgtype"`
	Video   TextFrame `json:"text"`
}

type VideoFrame

type VideoFrame struct {
	MediaId     string `json:"media_id"`
	ThumbMediaI string `json:"thumb_media_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type VideoResponse

type VideoResponse struct {
	ToUser  string     `json:"touser"`
	MsgType string     `json:"msgtype"`
	Video   VideoFrame `json:"video"`
}

type VoiceFrame

type VoiceFrame struct {
	MediaId string `json:"media_id"`
}

type VoiceResponse

type VoiceResponse struct {
	ToUser  string     `json:"touser"`
	MsgType string     `json:"msgtype"`
	Voice   VoiceFrame `json:"voice"`
}

type WechatPlatformProvider

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

func CreateWechatPlatformProvider

func CreateWechatPlatformProvider(f string) (*WechatPlatformProvider, error)

func (*WechatPlatformProvider) GetMeta

func (wPP *WechatPlatformProvider) GetMeta() map[string]string

func (*WechatPlatformProvider) GetName

func (wPP *WechatPlatformProvider) GetName() string

func (*WechatPlatformProvider) ReConfigure

func (wPP *WechatPlatformProvider) ReConfigure(f string) (bool, error)

func (*WechatPlatformProvider) SendMsg

func (wPP *WechatPlatformProvider) SendMsg(msg *Protocol.Message) bool

func (*WechatPlatformProvider) ServeHTTP

func (wPP *WechatPlatformProvider) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*WechatPlatformProvider) UpdateToken

func (wPP *WechatPlatformProvider) UpdateToken()

Jump to

Keyboard shortcuts

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