| dummyInto, | dummyInto, | ||||
| } | } | ||||
| func dummyInit() { | |||||
| func dummyInit(ss *openIDSessionData) { | |||||
| } | } | ||||
| func dummyClean() { | |||||
| func dummyClean(ss *openIDSessionData) { | |||||
| } | } | ||||
| func dummyStart(*openIDSessionData, InWechatMsg) { | |||||
| func dummyStart(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func dummyServe(*openIDSessionData, InWechatMsg) { | |||||
| func dummyServe(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func dummySummary() { | |||||
| func dummySummary(ss *openIDSessionData) { | |||||
| } | } | ||||
| func dummyInto() { | |||||
| func dummyInto(ss *openIDSessionData) { | |||||
| } | |||||
| } |
| echoInto, | echoInto, | ||||
| } | } | ||||
| func echoInit() { | |||||
| func echoInit(ss *openIDSessionData) { | |||||
| } | } | ||||
| func echoClean() { | |||||
| func echoClean(ss *openIDSessionData) { | |||||
| } | } | ||||
| func echoStart(*openIDSessionData, InWechatMsg) { | |||||
| func echoStart(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func echoServe(*openIDSessionData, InWechatMsg) { | |||||
| func echoServe(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func echoSummary() { | |||||
| func echoSummary(ss *openIDSessionData) { | |||||
| } | } | ||||
| func echoInto() { | |||||
| func echoInto(ss *openIDSessionData) { | |||||
| } | } |
| getBasicUserInfoInto, | getBasicUserInfoInto, | ||||
| } | } | ||||
| func getBasicUserInfoInit() { | |||||
| func getBasicUserInfoInit(ss *openIDSessionData) { | |||||
| } | } | ||||
| func getBasicUserInfoClean() { | |||||
| func getBasicUserInfoClean(ss *openIDSessionData) { | |||||
| } | } | ||||
| func getBasicUserInfoStart(*openIDSessionData, InWechatMsg) { | |||||
| func getBasicUserInfoStart(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func getBasicUserInfoServe(*openIDSessionData, InWechatMsg) { | |||||
| func getBasicUserInfoServe(ss *openIDSessionData, in InWechatMsg) { | |||||
| } | } | ||||
| func getBasicUserInfoSummary() { | |||||
| func getBasicUserInfoSummary(ss *openIDSessionData) { | |||||
| } | } | ||||
| func getBasicUserInfoInto() { | |||||
| func getBasicUserInfoInto(ss *openIDSessionData) { | |||||
| } | } |
| // a description of | // a description of | ||||
| type chatProcedure struct { | type chatProcedure struct { | ||||
| init func() //house keeping | |||||
| clean func() //house keeping | |||||
| init func(*openIDSessionData) //house keeping | |||||
| clean func(*openIDSessionData) //house keeping | |||||
| start func(*openIDSessionData, InWechatMsg) //for first message | start func(*openIDSessionData, InWechatMsg) //for first message | ||||
| serve func(*openIDSessionData, InWechatMsg) //for all subsequent message | serve func(*openIDSessionData, InWechatMsg) //for all subsequent message | ||||
| summary func() //after all message has been done | |||||
| intro func() //initial text/video/voice introduction | |||||
| summary func(*openIDSessionData) //after all message has been done | |||||
| intro func(*openIDSessionData) //initial text/video/voice introduction | |||||
| } | } | ||||
| //AllProc all procedure that we implemented | //AllProc all procedure that we implemented |
| } | } | ||||
| func cmdEcho(ss *openIDSessionData, in InWechatMsg) (processed bool) { | func cmdEcho(ss *openIDSessionData, in InWechatMsg) (processed bool) { | ||||
| procEcho.init() | |||||
| in.immediateResponse("请输入不同类型的微信信息,比如文字,图片,视频,地址,链接,我们将原样回应您") | |||||
| procEcho.init(ss) | |||||
| procEcho.start(ss, in) | procEcho.start(ss, in) | ||||
| return | return | ||||
| } | } |