diff options
| author | admin | 2024-09-11 11:02:32 +0200 |
|---|---|---|
| committer | admin | 2024-09-11 11:02:32 +0200 |
| commit | 6b091dc7ab2c4fdaed0675ab57ea05e4ddb81e5b (patch) | |
| tree | 0745ad06f9a5e61c3e24f97cdd8c3636f76c1e42 /struct.go | |
| download | hncrawler-6b091dc7ab2c4fdaed0675ab57ea05e4ddb81e5b.tar.gz | |
init
Diffstat (limited to 'struct.go')
| -rw-r--r-- | struct.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/struct.go b/struct.go new file mode 100644 index 0000000..a20c244 --- /dev/null +++ b/struct.go @@ -0,0 +1,26 @@ +package main + +type Story struct { + Id int + //Deleted bool + Type string /* story, comment (or job, poll, pollopt) */ + Title string /* title (only story) */ + Text string /* comment text or possible text on story (HTML) */ + Dead bool + Url string /* verbatim parsed URL */ + //NormalizedUrl string /* normalized */ + Score int /* only story */ + Descendants int /* comments on score or kids on comments */ + //Kids []int /* id of the item's comments */ + Time int /* posted at */ + By string /* hn commenter */ + Links []Link /* matched urls */ +} + +type Link struct { + Url string + Field int /* 2 = video, 1 = movies, 0 = bug */ +} + +type URL struct { +} |
