-
Notifications
You must be signed in to change notification settings - Fork 0
/
nenews_types.go
74 lines (59 loc) · 1.57 KB
/
nenews_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package nenews_types
import "github.com/EyciaZhou/msghub.go/interface"
type News interface {
Convert() (*Interface.Message, error)
}
type Topic struct {
Newss []News
Id string
Title string
}
type NormalNews struct {
CoverURL string `json:"-"`
URL string `json:"-"`
ID string `json:"docid"`
ReplyCount int `json:"replyCount"`
Title string `json:"title"`
SubTitle string `json:"digest"`
BoardId string `json:"replyBoard"`
PubTime string `json:"ptime"`
SnapTime string `json:"-"`
Body string `json:"body"`
Images []*NewsImage `json:"img"`
Replys []Reply `json:"-"`
}
type PhotoSet struct {
ReplyCount int `json:"-"`
SnapTime string `json:"-"`
Body string `json:"-"`
ID string `json:"postid"`
CoverURL string `json:"cover"`
URL string `json:"url"`
Title string `json:"setname"`
SubTitle string `json:"desc"`
BoardId string `json:"boardid"`
PubTime string `json:"createdate"`
Images []*PhototSetImage `json:"photos"`
Replys []Reply `json:"-"`
}
type PhototSetImage struct {
Desc string `json:"note"`
URL string `json:"imgurl"`
}
type ReplyFloor struct {
//Floor int `json:"-"`
Time string `json:"t"`
Name string `json:"f"`
Content string `json:"b"`
Digg string `json:"v"`
}
type Reply map[string]*ReplyFloor
type Reply_tmp struct {
HotPosts []Reply `json:"hotPosts"`
}
type NewsImage struct {
Ref string `json:"ref"` //not set if not have
Size string `json:"pixel"`
Title string `json:"alt"`
URL string `json:"src"`
}