Documentation ¶
Index ¶
- Constants
- Variables
- func Db() *gorm.DB
- func GenerateIyuu2LocalSiteMap(iyuuSites []Site, localSites []*config.SiteConfigStruct) map[int64]string
- func IyuuApiBind(token string, site string, uid int64, passkey string) (map[string]any, error)
- func IyuuApiGetUser(token string) (data map[string]any, err error)
- func IyuuApiHash(token string, infoHashes []string) (map[string][]IyuuTorrentInfoHash, error)
- type IyuuApiGetUserResponse
- type IyuuApiHashResponse
- type IyuuApiRecommendSite
- type IyuuApiResponse
- type IyuuApiSite
- type IyuuApiSitesResponse
- type IyuuGetRecommendSitesResponse
- type IyuuTorrentInfoHash
- type Meta
- type Site
- type Torrent
Constants ¶
View Source
const IYUU_VERSION = "2.0.0"
Variables ¶
View Source
var Command = &cobra.Command{
Use: "iyuu",
Short: "Cross seed automation tool using iyuu API.",
Long: `Cross seed automation tool using iyuu API.`,
}
Functions ¶
func GenerateIyuu2LocalSiteMap ¶
func GenerateIyuu2LocalSiteMap(iyuuSites []Site, localSites []*config.SiteConfigStruct) map[int64]string
return iyuuSid => localSiteName map
func IyuuApiBind ¶
func IyuuApiHash ¶
func IyuuApiHash(token string, infoHashes []string) (map[string][]IyuuTorrentInfoHash, error)
https://api.iyuu.cn/docs.php?service=App.Api.Infohash&detail=1&type=fold
Types ¶
type IyuuApiGetUserResponse ¶
type IyuuApiHashResponse ¶
type IyuuApiHashResponse struct { Ret int64 `json:"ret"` Msg string `json:"msg"` Data []struct { Hash string `json:"hash"` Torrent []IyuuTorrentInfoHash `json:"torrent"` } `json:"data"` }
type IyuuApiRecommendSite ¶
type IyuuApiRecommendSite struct { Id int64 `json:"id"` Site string `json:"site"` Bind_check string `json:"bind_check"` }
func IyuuApiGetRecommendSites ¶
func IyuuApiGetRecommendSites() ([]IyuuApiRecommendSite, error)
type IyuuApiResponse ¶
type IyuuApiSite ¶
type IyuuApiSite struct { Id int64 `json:"id"` Site string `json:"site"` Base_url string `json:"base_url"` Nickname string `json:"nickname"` // "朋友" / "馒头" Download_page string `json:"download_page"` // torrent download url. params: {passkey}, {authkey}, {} (id) Is_https int64 `json:"is_https"` // 1 / 0 Reseed_check string `json:"reseed_check"` // "passkey" }
func IyuuApiSites ¶
func IyuuApiSites(token string) ([]IyuuApiSite, error)
func (*IyuuApiSite) GetUrl ¶
func (site *IyuuApiSite) GetUrl() string
func (IyuuApiSite) ToSite ¶
func (iyuuApiSite IyuuApiSite) ToSite() Site
type IyuuApiSitesResponse ¶
type IyuuApiSitesResponse struct { Ret int64 `json:"ret"` Msg string `json:"msg"` Data struct { Sites []IyuuApiSite `json:"sites"` } `json:"data"` }
type IyuuGetRecommendSitesResponse ¶
type IyuuGetRecommendSitesResponse struct { Ret int64 `json:"ret"` Msg string `json:"msg"` Data struct { Recommend []IyuuApiRecommendSite `json:"recommend"` } `json:"data"` }
type IyuuTorrentInfoHash ¶
type Site ¶
type Site struct { Sid int64 `gorm:"primaryKey"` Name string `gorm:"index"` Nickname string Url string // site homepage url. e.g.: https://hdvideo.one/ DownloadPage string // (relative) torrent download url. e.g.: "download.php?id={}&passkey={passkey}" }
gorm "sites" table
func (*Site) MatchFilter ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.