Documentation ¶
Overview ¶
*
- Project Name:wechat-robot
- File Name:txairobot.go
- Package Name:model
- Date:2019年07月16日 14:19
- Function:
- Copyright (c) 2019, Jason.Wang All Rights Reserved.
Index ¶
- Constants
- Variables
- func EventReceived(msg *message.MixMessage) *message.Reply
- func QykRecevie(msg *message.MixMessage) *message.Reply
- func Recevie(msg *message.MixMessage) *message.Reply
- func SendMessageV2(fromUserName string, content string) string
- func SendTxAiMessage(fromUserName string, content string) (data string)
- func TxAiRecevie(msg *message.MixMessage) *message.Reply
- type AiRequest
- type AiResponse
- type AiResponseData
- type Map
- type QyRobot
- type Robot
- type Wechat
Constants ¶
View Source
const ( // DevelopmentMode 开发模式 DevelopmentMode = "development" // TestMode 测试模式 TestMode = "test" // ProductionMode 产品模式 ProductionMode = "production" )
Variables ¶
View Source
var DB *gorm.DB
DB 数据库连接
View Source
var RedisPool *redis.Pool
RedisPool Redis连接池
Functions ¶
func EventReceived ¶
func EventReceived(msg *message.MixMessage) *message.Reply
func QykRecevie ¶
func QykRecevie(msg *message.MixMessage) *message.Reply
func SendMessageV2 ¶
func TxAiRecevie ¶
func TxAiRecevie(msg *message.MixMessage) *message.Reply
Types ¶
type AiResponse ¶
type AiResponse struct { Ret int64 `json:"ret"` Msg string `json:"msg"` Data AiResponseData `json:"data"` }
type AiResponseData ¶
type Map ¶
func (Map) MarshalXML ¶
MarshalXML marshals the map to XML, with each key in the map being a tag and it's corresponding value being it's contents.
func (*Map) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a map of string to strings, creating a key in the map for each tag and setting it's value to the tags contents.
The fact this function is on the pointer of Map is important, so that if m is nil it can be initialized, which is often the case if m is nested in another xml structurel. This is also why the first thing done on the first line is initialize it.
type QyRobot ¶
type QyRobot struct { Content string `json:"content"` // contains filtered or unexported fields }
青云客的数据结构
Click to show internal directories.
Click to hide internal directories.