Documentation ¶
Overview ¶
package uguu implements uguu-tracker storage driver using postgres
Index ¶
- type UguuSQL
- func (u *UguuSQL) AddTorrent(torrent *models.Torrent) (err error)
- func (u *UguuSQL) AddUser(user *models.User) (err error)
- func (u *UguuSQL) Close() (err error)
- func (u *UguuSQL) DeleteTorrent(torrent *models.Torrent) (err error)
- func (u *UguuSQL) DeleteUser(user *models.User) (err error)
- func (u *UguuSQL) GeneratePasskey() (key string)
- func (u *UguuSQL) GetCategories() (cats []*models.TorrentCategory, err error)
- func (u *UguuSQL) GetTorrentByInfoHash(infohash string) (t *models.Torrent, err error)
- func (u *UguuSQL) GetUserByPassKey(passkey string) (user *models.User, err error)
- func (u *UguuSQL) InitTables() (err error)
- func (u *UguuSQL) LatestVersion(version string) (latest bool)
- func (u *UguuSQL) LoadTorrents(ids []uint64) (torrents []*models.Torrent, err error)
- func (u *UguuSQL) LoadUsers(ids []uint64) (users []*models.User, err error)
- func (u *UguuSQL) Migrate() (err error)
- func (u *UguuSQL) Ping() (err error)
- func (u *UguuSQL) RecordAnnounce(delta *models.AnnounceDelta) (err error)
- func (u *UguuSQL) UpgradeToNext(version string) (err error)
- func (u *UguuSQL) Version() (version string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UguuSQL ¶
type UguuSQL struct {
// contains filtered or unexported fields
}
func (*UguuSQL) AddTorrent ¶
add a torrent to the database
func (*UguuSQL) DeleteTorrent ¶
delete an already existing torrent
func (*UguuSQL) GeneratePasskey ¶
generate a new passkey that doesn't exist in the database already
func (*UguuSQL) GetCategories ¶
func (u *UguuSQL) GetCategories() (cats []*models.TorrentCategory, err error)
func (*UguuSQL) GetTorrentByInfoHash ¶
func (*UguuSQL) GetUserByPassKey ¶
func (*UguuSQL) InitTables ¶
create initial version 0 tables
func (*UguuSQL) LatestVersion ¶
return true if the version string is the latest version
func (*UguuSQL) LoadTorrents ¶
func (*UguuSQL) RecordAnnounce ¶
func (u *UguuSQL) RecordAnnounce(delta *models.AnnounceDelta) (err error)
record that a bittorrent announce happened
func (*UguuSQL) UpgradeToNext ¶
upgrade to the next database version given the current version
Click to show internal directories.
Click to hide internal directories.