parent
515d671827
commit
0bd911d6bf
4 changed files with 121 additions and 130 deletions
@ -0,0 +1,28 @@ |
||||
package models |
||||
|
||||
type Board struct { |
||||
ID string `json:"_id"` |
||||
URI string `json:"uri,omitempty"` |
||||
Path string `json:"path,omitempty"` |
||||
LastPostTimestamp LastPostTimestamp `json:"lastPostTimestamp"` |
||||
Tags []interface{} `json:"tags,omitempty"` |
||||
SiteName string `json:"siteName,omitempty"` |
||||
SequenceValue int `json:"sequence_value"` |
||||
Pph int `json:"pph"` |
||||
Ips int `json:"ips"` |
||||
Settings Settings `json:"settings,omitempty"` |
||||
Webring bool `json:"webring"` |
||||
Ppd int `json:"ppd,omitempty"` |
||||
} |
||||
|
||||
type Settings struct { |
||||
Sfw bool `json:"sfw"` |
||||
Name string `json:"name"` |
||||
Description string `json:"description"` |
||||
UnlistedLocal bool `json:"unlistedLocal,omitempty"` |
||||
} |
||||
|
||||
type LastPostTimestamp struct { |
||||
Text string `json:"text"` |
||||
Color string `json:"color"` |
||||
} |
@ -0,0 +1,87 @@ |
||||
package models |
||||
|
||||
import ( |
||||
"time" |
||||
) |
||||
|
||||
type Post struct { |
||||
ID string `json:"_id"` |
||||
Date time.Time `json:"date"` |
||||
U int64 `json:"u"` |
||||
Name string `json:"name"` |
||||
Country interface{} `json:"country"` |
||||
Board string `json:"board"` |
||||
Tripcode interface{} `json:"tripcode"` |
||||
Capcode string `json:"capcode"` |
||||
Subject string `json:"subject"` |
||||
Message string `json:"message"` |
||||
Messagehash string `json:"messagehash"` |
||||
Nomarkup string `json:"nomarkup"` |
||||
Thread interface{} `json:"thread"` |
||||
Email string `json:"email"` |
||||
Spoiler bool `json:"spoiler"` |
||||
Banmessage interface{} `json:"banmessage"` |
||||
UserID interface{} `json:"userId"` |
||||
Files []Files `json:"files"` |
||||
Quotes []interface{} `json:"quotes"` |
||||
Crossquotes []interface{} `json:"crossquotes"` |
||||
Backlinks []Backlinks `json:"backlinks"` |
||||
Replyposts int `json:"replyposts"` |
||||
Replyfiles int `json:"replyfiles"` |
||||
Sticky int `json:"sticky"` |
||||
Locked int `json:"locked"` |
||||
Bumplocked int `json:"bumplocked"` |
||||
Cyclic int `json:"cyclic"` |
||||
Bumped time.Time `json:"bumped"` |
||||
PostID int `json:"postId"` |
||||
Replies []Post `json:"replies"` |
||||
Previewbacklinks []interface{} `json:"previewbacklinks,omitempty"` |
||||
Omittedfiles int `json:"omittedfiles,omitempty"` |
||||
Omittedposts int `json:"omittedposts,omitempty"` |
||||
Edited Edited `json:"edited,omitempty"` |
||||
} |
||||
|
||||
type Files struct { |
||||
Spoiler interface{} `json:"spoiler"` |
||||
Hash string `json:"hash"` |
||||
Filename string `json:"filename"` |
||||
OriginalFilename string `json:"originalFilename"` |
||||
Mimetype string `json:"mimetype"` |
||||
Size int `json:"size"` |
||||
Extension string `json:"extension"` |
||||
Thumbextension string `json:"thumbextension"` |
||||
Geometry Geometry `json:"geometry"` |
||||
GeometryString string `json:"geometryString"` |
||||
HasThumb bool `json:"hasThumb"` |
||||
SizeString string `json:"sizeString"` |
||||
} |
||||
|
||||
type Geometry struct { |
||||
Width int `json:"width"` |
||||
Height int `json:"height"` |
||||
Thumbwidth int `json:"thumbwidth"` |
||||
Thumbheight int `json:"thumbheight"` |
||||
} |
||||
|
||||
type Country struct { |
||||
Name string `json:"name"` |
||||
Code string `json:"code"` |
||||
Src string `json:"src"` |
||||
Custom bool `json:"custom"` |
||||
} |
||||
|
||||
type Quotes struct { |
||||
ID string `json:"_id"` |
||||
Thread int `json:"thread"` |
||||
PostID int `json:"postId"` |
||||
} |
||||
|
||||
type Backlinks struct { |
||||
ID string `json:"_id"` |
||||
PostID int `json:"postId"` |
||||
} |
||||
|
||||
type Edited struct { |
||||
Username string `json:"username"` |
||||
Date time.Time `json:"date"` |
||||
} |
Loading…
Reference in new issue