Documentation ¶
Index ¶
- Variables
- type Session
- func (s *Session) GetCurrentIHMessage() string
- func (s *Session) GetCurrentInfohash() string
- func (s *Session) GetCurrentTorrent() string
- func (s *Session) GetLastModTime() time.Time
- func (s *Session) GetPeers() (peers []string)
- func (sess *Session) GetShareId() id.Id
- func (s *Session) GetTarget() string
- func (s *Session) SaveIHMessage(mess []byte) error
- func (s *Session) SavePeer(peer string, shouldKeep func(peer string) bool) error
- func (s *Session) SaveSession(target string, theid id.Id) error
- func (s *Session) SaveTorrent(torrent []byte, infohash, lastModTime string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Q_SELECT_TORRENT = `SELECT torrent FROM meta` Q_SELECT_INFOHASH = `SELECT infohash FROM meta` Q_SELECT_LASTMODTIME = `SELECT lastmodtime FROM meta` Q_SELECT_IHMESSAGE = `SELECT ihmessage FROM meta` Q_SELECT_FOLDER = `SELECT folder FROM meta` Q_INSERT_TORRENT = `UPDATE meta SET torrent=?, infohash=?, lastmodtime=?` Q_INSERT_IHMESSAGE = `UPDATE meta SET ihmessage=?` )
View Source
var (
CREATESTRINGS = []string{
`CREATE TABLE meta(
torrent string,
infohash string,
lastmodtime string,
ihmessage string,
folder string,
wrs string,
rs string,
s string
)`,
`CREATE TABLE peers(
hostport string primary key,
valid_until string
)`,
}
)
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) GetCurrentIHMessage ¶
func (*Session) GetCurrentInfohash ¶
func (*Session) GetCurrentTorrent ¶
func (*Session) GetLastModTime ¶
func (*Session) GetShareId ¶
func (*Session) SaveIHMessage ¶
Click to show internal directories.
Click to hide internal directories.