Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReactionsBatchHandler ¶
GetReactionsBatchHandler 处理获取多个帖子 reactions 的 HTTP 请求 GET /reactions_batch?id=1&id=2&id=3 或 /reactions_batch?id=1,2,3
func GetReactionsHandler ¶
GetReactionsHandler 处理获取帖子 reactions 的 HTTP 请求 GET /reactions/:tid
func GetReactionsHandlerAlt ¶
GetReactionsHandler 处理获取帖子 reactions 的 HTTP 请求 GET /reactions/:tid
func SetReactionHandler ¶
SetReactionHandler 处理设置/更新/取消用户 reaction 的 HTTP 请求 POST /reactions/:tid
func SetReactionHandlerAlt ¶
SetReactionHandler 处理设置/更新/取消用户 reaction 的 HTTP 请求 POST /reactions/:tid
Types ¶
type Board ¶
type Board struct {
TID uint `db:"tid" json:"tid,omitempty"`
BID uint `db:"bid" json:"bid,omitempty"`
ReplyNum uint `db:"num"`
}
表结构对应的结构体(根据图片中的列定义)
type ReactionResult ¶
type ReactionResult struct {
TID int
Counts *orderedmap.OrderedMap
MyReaction string
Error error
}
定义一个结构体来封装每个帖子 reactions 的结果,用于并发处理
type Thread ¶
type Thread struct {
T string `db:"t" json:"t,omitempty"` // title (无标题)
N string `db:"n" json:"n,omitempty"` // name (无名氏)
Ts string `db:"ts" json:"ts"` // timestamp
ID string `db:"id" json:"id"` // user identity
No uint `db:"no" json:"no"` // number
P string `db:"p" json:"p,omitempty"` // picture src
Txt string `db:"txt" json:"txt"` // content
R uint `db:"r" json:"r,omitempty"` // reply to
Del int8 `db:"del" json:"-"` // is deleted?
C string `db:"c" json:"-"` // country
IP string `db:"ip" json:"-"` // ip address
Num int `json:"num,omitempty"` // from board
List []*Thread `json:"list,omitempty"` // replies
}
表结构对应的结构体(根据图片中的列定义)
Directories
¶
| Path | Synopsis |
|---|---|
|
my_fetch/my_if
封装,直接得到一个包含了ipv6地址的http.Client
|
封装,直接得到一个包含了ipv6地址的http.Client |
|
sqlite/main
command
|
|
Click to show internal directories.
Click to hide internal directories.