Documentation ¶
Index ¶
- func AnswerToCSV(ans []*wenda.AnswersTab, mem wenda.GroupMembers) (r []byte)
- func Exists(path string) bool
- func HandleAnswer(m *message.Message)
- func HandleTest(m *message.Message)
- func HashForSHA1(d string) string
- func PushDigestData(tab *public.QuestionsTab) (err error)
- func PushDigestToDingtalk(accessToken string, secret string, md dingtalk.Message) (err error)
- func PushDigestToQQ(target uint64, data *message.Message)
- type APIs
- func (a *APIs) DeleteQuestions(v *DeleteQuestionsReq) *kongchuanhujiao.Response
- func (a *APIs) GetAnswers(v *GetAnswersReq) *kongchuanhujiao.Response
- func (a *APIs) GetCsv(v *GetAnswerCSVReq, c *context.Context)
- func (a *APIs) GetMarkets(v *GetMarketsReq) *kongchuanhujiao.Response
- func (a *APIs) GetQuestions(v *GetQuestionsReq, c *context.Context) *kongchuanhujiao.Response
- func (a *APIs) GetRuntime(v *GetRuntimeReq, c *context.Context)
- func (a *APIs) PostMarkets(v *PostMarketsReq, c *context.Context) *kongchuanhujiao.Response
- func (a *APIs) PostPraise(v *PostPraiseReq, c *context.Context) *kongchuanhujiao.Response
- func (a *APIs) PostPushcenter(v *PostPushcenterReq, c *context.Context) *kongchuanhujiao.Response
- func (a *APIs) PostQuestions(v *public.QuestionsTab) *kongchuanhujiao.Response
- func (a *APIs) PostUploadPicture(c *context.Context) *kongchuanhujiao.Response
- func (a *APIs) PutQuestions(v *public.QuestionsTab) *kongchuanhujiao.Response
- func (a *APIs) PutQuestionsStatus(v *PutQuestionStatusReq, c *context.Context) *kongchuanhujiao.Response
- type DeleteQuestionsReq
- type GetAnswerCSVReq
- type GetAnswersReq
- type GetMarketsReq
- type GetQuestionsReq
- type GetQuestionsRes
- type GetRuntimeReq
- type PostMarketsReq
- type PostPraiseReq
- type PostPushcenterReq
- type PutQuestionStatusReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnswerToCSV ¶
func AnswerToCSV(ans []*wenda.AnswersTab, mem wenda.GroupMembers) (r []byte)
AnswerToCSV 将答案转换为 CSV
func PushDigestData ¶
func PushDigestData(tab *public.QuestionsTab) (err error)
PushDigestData 推送答题数据
func PushDigestToDingtalk ¶
PushDigestToDingtalk 推送摘要至钉钉平台
func PushDigestToQQ ¶
PushDigestToQQ 推送摘要至QQ平台
Types ¶
type APIs ¶
type APIs struct{} // APIs 问答 APIs
func (*APIs) DeleteQuestions ¶
func (a *APIs) DeleteQuestions(v *DeleteQuestionsReq) *kongchuanhujiao.Response
DeleteQuestions 删除问题 APIs。 调用方法:Delete /apis/wenda/questions
func (*APIs) GetAnswers ¶
func (a *APIs) GetAnswers(v *GetAnswersReq) *kongchuanhujiao.Response
GetAnswers 获取作答 APIs。 调用方法:GET /apis/wenda/answers
func (*APIs) GetCsv ¶
func (a *APIs) GetCsv(v *GetAnswerCSVReq, c *context.Context)
GetCsv 获取 CSV APIs。 调用方法:GET /apis/wenda/csv
func (*APIs) GetMarkets ¶
func (a *APIs) GetMarkets(v *GetMarketsReq) *kongchuanhujiao.Response
GetMarkets 获取市场列表 APIs。 调用方法:GET /apis/wenda/markets
func (*APIs) GetQuestions ¶
func (a *APIs) GetQuestions(v *GetQuestionsReq, c *context.Context) *kongchuanhujiao.Response
GetQuestions 获取问题列表或问题 APIs。 调用方法:GET /apis/wenda/questions
func (*APIs) GetRuntime ¶
func (a *APIs) GetRuntime(v *GetRuntimeReq, c *context.Context)
GetRuntime 运行时。 GET /apis/wenda/runtime 升级为 Websocket
func (*APIs) PostMarkets ¶
func (a *APIs) PostMarkets(v *PostMarketsReq, c *context.Context) *kongchuanhujiao.Response
PostMarkets 复制市场问题 APIs。 调用方法:POST /apis/wenda/markets
func (*APIs) PostPraise ¶
func (a *APIs) PostPraise(v *PostPraiseReq, c *context.Context) *kongchuanhujiao.Response
PostPraise 推送表扬列表 APIs。 调用方法:POST /apis/wenda/praise
func (*APIs) PostPushcenter ¶
func (a *APIs) PostPushcenter(v *PostPushcenterReq, c *context.Context) *kongchuanhujiao.Response
PostPushcenter 推送数据到钉钉 APIs。 调用方法:POST /apis/wenda/pushcenter
func (*APIs) PostQuestions ¶
func (a *APIs) PostQuestions(v *public.QuestionsTab) *kongchuanhujiao.Response
PostQuestions 新建问题 APIs。 调用方法:POST /apis/wenda/questions
func (*APIs) PostUploadPicture ¶
func (a *APIs) PostUploadPicture(c *context.Context) *kongchuanhujiao.Response
PostUploadPicture 上传图片 APIs。 调用方法:POST /apis/wenda/upload
func (*APIs) PutQuestions ¶
func (a *APIs) PutQuestions(v *public.QuestionsTab) *kongchuanhujiao.Response
PutQuestions 更新问题 APIs。 调用方法:PUT /apis/wenda/questions
func (*APIs) PutQuestionsStatus ¶
func (a *APIs) PutQuestionsStatus(v *PutQuestionStatusReq, c *context.Context) *kongchuanhujiao.Response
PutQuestionsStatus 更新问题状态 APIs。 调用方法:PUT /apis/wenda/questions/status
type DeleteQuestionsReq ¶
type DeleteQuestionsReq struct {
ID uint32 // 标识号
}
DeleteQuestionsReq 删除问题 请求结构
type GetMarketsReq ¶
GetMarketsReq 市场请求
type GetQuestionsReq ¶
GetQuestionsReq 获取问题列表或问题 请求结构
type GetQuestionsRes ¶
type GetQuestionsRes struct { Questions []*public.QuestionsTab `json:"questions"` // 问题 Groups *public.Groups `json:"groups"` // 群 GroupName string `json:"group_name"` // 群名称 Members *public.GroupMembers `json:"members"` // 群成员 Result *public.Result `json:"result"` // 结果 }
GetQuestionsReq 获取问题列表或问题 数据响应结构
type GetRuntimeReq ¶
type GetRuntimeReq struct {
ID uint32 // 唯一识别码
}
type PostMarketsReq ¶
PostMarketsReq 复制市场问题 请求结构
type PostPushcenterReq ¶
PostPushcenterReq 推送数据到钉钉 请求结构
type PutQuestionStatusReq ¶
PutQuestionStatusReq 更新问题状态 请求结构