tracker/storage/data.go

47 lines
771 B
Go
Raw Normal View History

2013-06-22 01:31:32 +02:00
// Copyright 2013 The Chihaya Authors. All rights reserved.
// Use of this source code is governed by the BSD 2-Clause license,
// which can be found in the LICENSE file.
package storage
type Peer struct {
2013-06-28 22:29:02 +02:00
ID string
UserID uint64
TorrentID uint64
2013-06-22 01:31:32 +02:00
2013-06-28 22:29:02 +02:00
IP string
2013-07-12 06:36:24 +02:00
Port uint64
2013-06-22 01:31:32 +02:00
Uploaded uint64
Downloaded uint64
Left uint64
2013-07-12 06:36:24 +02:00
LastAnnounce int64
2013-06-22 01:31:32 +02:00
}
type Torrent struct {
2013-06-28 22:29:02 +02:00
ID uint64
Infohash string
2013-06-22 01:31:32 +02:00
UpMultiplier float64
DownMultiplier float64
2013-07-12 06:36:24 +02:00
Seeders map[string]Peer
Leechers map[string]Peer
2013-06-22 01:31:32 +02:00
2013-07-12 06:36:24 +02:00
Snatches uint
Pruned bool
2013-06-22 01:31:32 +02:00
LastAction int64
}
type User struct {
2013-07-12 06:36:24 +02:00
ID uint64
Passkey string
2013-06-22 01:31:32 +02:00
UpMultiplier float64
DownMultiplier float64
2013-07-12 06:36:24 +02:00
Slots int64
UsedSlots int64
2013-06-22 01:31:32 +02:00
SlotsLastChecked int64
}