wenda

package
v1.4.3-RC Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClient

func AddClient(id uint32, conn *websocket.Conn)

AddClient 新增客户端

func CalculateResult

func CalculateResult(i uint32) (r *public.Result, err error)

CalculateResult 计算结果。 参数 i:问题标识号

func CopyQuestions

func CopyQuestions(id uint32, creator string, target uint64) (err error)

CopyQuestions 复制问题

func DeleteActiveGroup

func DeleteActiveGroup(k uint64)

DeleteActiveGroup 删除 ActiveGroup 字段

func DeleteQuestion

func DeleteQuestion(id uint32) (err error)

DeleteQuestion 删除问题

func GetActiveGroup

func GetActiveGroup(k uint64) uint32

GetActiveGroup 获取 ActiveGroup 字段

func GetAllActiveGroup

func GetAllActiveGroup() map[uint64]uint32

GetAllActiveGroup 获取 ActiveGroup 数据

func GetCaches

func GetCaches(k uint32) *wenda.Detail

GetCaches 获取 Caches 字段

func InsertAnswer

func InsertAnswer(a *wenda.AnswersTab) (err error)

InsertAnswer 插入回答 结构体中无需传 ID、Time

func InsertQuestion

func InsertQuestion(q *wenda.QuestionsTab) (err error)

InsertQuestion 新增问题

func PushData

func PushData(id uint32, data *wenda.Result)

PushData 推送数据

func RemoveClient

func RemoveClient(id uint32, conn *websocket.Conn)

RemoveClient 移除客户端

func SelectAnswers

func SelectAnswers(qid uint32) (data []*wenda.AnswersTab, err error)

SelectAnswers 获取回答 qid 问题 ID

func SelectQuestions

func SelectQuestions(v *wenda.QuestionsTab, page uint32) (data []*wenda.QuestionsTab, err error)

SelectQuestions 获取问题

func UpdateQuestion

func UpdateQuestion(q *wenda.QuestionsTab) (err error)

UpdateQuestion 更新问题

func UpdateQuestionStatus

func UpdateQuestionStatus(q *wenda.QuestionsTab, status uint8) (err error)

UpdateQuestionStatus 更新问题状态

func WriteActiveGroup

func WriteActiveGroup(k uint64, u uint32)

WriteActiveGroup 写入 ActiveGroup 字段

func WriteCaches

func WriteCaches(k uint32, d *wenda.Detail)

WriteCaches 写入 Cahces 字段

Types

This section is empty.

Jump to

Keyboard shortcuts

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