Documentation
¶
Index ¶
- type User
- func (u *User) AppendTorrent(t *torrent.Torrent) error
- func (u *User) BeforeInsert(db orm.DB) error
- func (u *User) BeforeUpdate(db orm.DB) error
- func (u *User) ClearTorrents() (int, error)
- func (u *User) CountTorrents() (int, error)
- func (u *User) FeedURL() string
- func (u *User) GenerateFeed() (string, error)
- func (u *User) GetByFeedID() (*User, error)
- func (u *User) IsFeedActive() bool
- func (u *User) RenewFeedChecked() error
- type UserTorrent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
ID int
CreatedAt time.Time
UpdatedAt time.Time
TelegramID int
TelegramName string
FeedID string
FeedCheckedAt time.Time
Torrents []torrent.Torrent `pg:",many2many:user_torrents"`
}
User (i.e. Downloader)
func (*User) AppendTorrent ¶
AppendTorrent apeend Torrent to User
func (*User) ClearTorrents ¶
ClearTorrents clear User Torrent history
func (*User) CountTorrents ¶
CountTorrents count User Torrents
func (*User) GenerateFeed ¶
GenerateFeed returns User’s feed
func (*User) GetByFeedID ¶
GetByFeedID find User by FeedID
func (*User) IsFeedActive ¶
IsFeedActive tells if the User’s feed has been requested recently
func (*User) RenewFeedChecked ¶
RenewFeedChecked renews User’s FeedCheckedAt
Click to show internal directories.
Click to hide internal directories.