mirror of
https://github.com/sot-tech/mochi.git
synced 2026-04-27 08:00:00 -07:00
redis restructured to use strings of JSON
This commit is contained in:
@@ -5,42 +5,34 @@
|
||||
package storage
|
||||
|
||||
type Peer struct {
|
||||
ID string
|
||||
UserID uint64
|
||||
TorrentID uint64
|
||||
|
||||
IP string
|
||||
Port uint64
|
||||
|
||||
Uploaded uint64
|
||||
Downloaded uint64
|
||||
Left uint64
|
||||
|
||||
LastAnnounce int64
|
||||
ID string `json:"id"`
|
||||
UserID uint64 `json:"user_id"`
|
||||
TorrentID uint64 `json:"torrent_id"`
|
||||
IP string `json:"ip"`
|
||||
Port uint64 `json:"port"`
|
||||
Uploaded uint64 `json:"uploaded"`
|
||||
Downloaded uint64 `json:"downloaded`
|
||||
Left uint64 `json:"left"`
|
||||
LastAnnounce int64 `json:"last_announce"`
|
||||
}
|
||||
|
||||
type Torrent struct {
|
||||
ID uint64
|
||||
Infohash string
|
||||
UpMultiplier float64
|
||||
DownMultiplier float64
|
||||
|
||||
Seeders map[string]Peer
|
||||
Leechers map[string]Peer
|
||||
|
||||
Snatches uint
|
||||
Pruned bool
|
||||
LastAction int64
|
||||
ID uint64 `json:"id"`
|
||||
Infohash string `json:"infohash"`
|
||||
Pruned bool `json:"pruned"`
|
||||
Seeders map[string]Peer `json:"seeders"`
|
||||
Leechers map[string]Peer `json:"leechers"`
|
||||
Snatches uint `json:"snatches"`
|
||||
UpMultiplier float64 `json:"up_multiplier"`
|
||||
DownMultiplier float64 `json:"down_multipler"`
|
||||
LastAction int64 `json:"last_action"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID uint64
|
||||
Passkey string
|
||||
|
||||
UpMultiplier float64
|
||||
DownMultiplier float64
|
||||
|
||||
Slots int64
|
||||
UsedSlots int64
|
||||
SlotsLastChecked int64
|
||||
ID uint64 `json:"id"`
|
||||
Passkey string `json:"passkey"`
|
||||
UpMultiplier float64 `json:"up_multiplier"`
|
||||
DownMultiplier float64 `json:"down_multiplier"`
|
||||
Slots int64 `json:"slots"`
|
||||
SlotsUsed int64 `json:"slots_used"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user