aboutsummaryrefslogtreecommitdiff
path: root/torrent
diff options
context:
space:
mode:
Diffstat (limited to 'torrent')
-rw-r--r--torrent/torrent.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/torrent/torrent.go b/torrent/torrent.go
index 0f7d673..533db86 100644
--- a/torrent/torrent.go
+++ b/torrent/torrent.go
@@ -1,5 +1,7 @@
package torrent
+import "time"
+
type File struct {
Length int `bencode:"length"`
MD5Sum []byte `bencode:"md5sum,optional"`
@@ -16,12 +18,12 @@ type Info struct {
}
type Torrent struct {
- Announce string `bencode:"announce"`
- AnnounceList []string `bencode:"announce-list,optional"`
- Comment string `bencode:"comment"`
- CreatedBy string `bencode:"created by,optional"`
- CreationDate int `bencode:"creation date"` // time.Time (unix time)
- HTTPSeeds []string `bencode:"httpseeds,optional"` // not in draft
- Info Info `bencode:"info"`
- URLList string `bencode:"url-list,optional"` // not in draft
+ Announce string `bencode:"announce"`
+ AnnounceList []string `bencode:"announce-list,optional"`
+ Comment string `bencode:"comment"`
+ CreatedBy string `bencode:"created by,optional"`
+ CreationDate time.Time `bencode:"creation date"` // time.Time (unix time)
+ HTTPSeeds []string `bencode:"httpseeds,optional"` // not in draft
+ Info Info `bencode:"info"`
+ URLList string `bencode:"url-list,optional"` // not in draft
}