Documentation
¶
Index ¶
- func NewSite(name string, siteConfig *config.SiteConfigStruct, config *config.ConfigStruct) (site.Site, error)
- type Site
- func (gpwsite *Site) DownloadTorrent(torrentUrl string) (content []byte, filename string, id string, err error)
- func (gpwsite *Site) DownloadTorrentById(id string) ([]byte, string, error)
- func (gpwsite *Site) GetAllTorrents(sort string, desc bool, pageMarker string, baseUrl string) (torrents []*site.Torrent, nextPageMarker string, err error)
- func (gpwsite *Site) GetDefaultHttpHeaders() [][]string
- func (gpwsite *Site) GetLatestTorrents(full bool) ([]*site.Torrent, error)
- func (gpwsite *Site) GetName() string
- func (gpwsite *Site) GetSiteConfig() *config.SiteConfigStruct
- func (gpwsite *Site) GetStatus() (*site.Status, error)
- func (gpwsite *Site) PublishTorrent(contents []byte, metadata url.Values) (id string, err error)
- func (gpwsite *Site) PurgeCache()
- func (gpwsite *Site) SearchTorrents(keyword string, baseUrl string) ([]*site.Torrent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSite ¶
func NewSite(name string, siteConfig *config.SiteConfigStruct, config *config.ConfigStruct) (site.Site, error)
Types ¶
type Site ¶
type Site struct { Name string Location *time.Location SiteConfig *config.SiteConfigStruct Config *config.ConfigStruct HttpClient *azuretls.Session HttpHeaders [][]string }
func (*Site) DownloadTorrent ¶
func (*Site) DownloadTorrentById ¶
func (*Site) GetAllTorrents ¶
func (*Site) GetDefaultHttpHeaders ¶ added in v0.1.9
func (*Site) GetLatestTorrents ¶
func (*Site) GetSiteConfig ¶
func (gpwsite *Site) GetSiteConfig() *config.SiteConfigStruct
func (*Site) PublishTorrent ¶ added in v0.1.10
PublishTorrent implements site.Site.
func (*Site) PurgeCache ¶
func (gpwsite *Site) PurgeCache()
Click to show internal directories.
Click to hide internal directories.