Documentation
¶
Index ¶
- func WithBackupBaseURL(baseURL string) func(*SeaDexBackup)
- func WithBackupHTTPClient(client *http.Client) func(*SeaDexBackup)
- func WithBaseURL(baseURL string) func(*SeaDexEntry)
- func WithHTTPClient(client *http.Client) func(*SeaDexEntry)
- type BackupFile
- type BadBackupFileError
- type EntryNotFoundError
- type EntryRecord
- type EntryStream
- type File
- type SeaDexBackup
- func (b *SeaDexBackup) BaseURL() string
- func (b *SeaDexBackup) Close()
- func (b *SeaDexBackup) Create(filename string) (BackupFile, error)
- func (b *SeaDexBackup) Delete(file BackupFile) error
- func (b *SeaDexBackup) Download(file *BackupFile, destination string, overwrite bool) (string, error)
- func (b *SeaDexBackup) GetBackups() ([]BackupFile, error)
- func (b *SeaDexBackup) GetLatestBackup() (BackupFile, error)
- type SeaDexEntry
- func (s *SeaDexEntry) AnilistTitle(searchTerm string) string
- func (s *SeaDexEntry) BaseURL() string
- func (s *SeaDexEntry) Close()
- func (s *SeaDexEntry) FromFilename(filename string) ([]EntryRecord, error)
- func (s *SeaDexEntry) FromFilenameStream(filename string) *EntryStream
- func (s *SeaDexEntry) FromFilter(filter string) ([]EntryRecord, error)
- func (s *SeaDexEntry) FromFilterContext(ctx context.Context, filter string) ([]EntryRecord, error)
- func (s *SeaDexEntry) FromFilterStream(filter string) (*EntryStream, error)
- func (s *SeaDexEntry) FromID(id any) (EntryRecord, error)
- func (s *SeaDexEntry) FromIDContext(ctx context.Context, id any) (EntryRecord, error)
- func (s *SeaDexEntry) FromInfohash(infohash string) ([]EntryRecord, error)
- func (s *SeaDexEntry) FromInfohashStream(infohash string) (*EntryStream, error)
- func (s *SeaDexEntry) FromTitle(title string) (EntryRecord, error)
- func (s *SeaDexEntry) FromTitleContext(ctx context.Context, title string) (EntryRecord, error)
- func (s *SeaDexEntry) Iterator() ([]EntryRecord, error)
- func (s *SeaDexEntry) IteratorStream() *EntryStream
- type SeaDexError
- type SeaDexTorrent
- type Tag
- type TorrentRecord
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBackupBaseURL ¶
func WithBackupBaseURL(baseURL string) func(*SeaDexBackup)
func WithBackupHTTPClient ¶
func WithBackupHTTPClient(client *http.Client) func(*SeaDexBackup)
func WithBaseURL ¶
func WithBaseURL(baseURL string) func(*SeaDexEntry)
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) func(*SeaDexEntry)
Types ¶
type BackupFile ¶
type BackupFile struct {
Name string `json:"name"`
Size int64 `json:"size"`
ModifiedTime time.Time `json:"modified_time"`
}
func (BackupFile) String ¶
func (b BackupFile) String() string
type BadBackupFileError ¶
type BadBackupFileError struct {
SeaDexError
}
type EntryNotFoundError ¶
type EntryNotFoundError struct {
SeaDexError
}
type EntryRecord ¶
type EntryRecord struct {
AnilistID int `json:"anilist_id"`
CollectionID string `json:"collection_id"`
CollectionName string `json:"collection_name"`
Comparisons []string `json:"comparisons"`
CreatedAt time.Time `json:"created_at"`
ID string `json:"id"`
IsIncomplete bool `json:"is_incomplete"`
Notes string `json:"notes"`
TheoreticalBest *string `json:"theoretical_best"`
Torrents []TorrentRecord `json:"torrents"`
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
Size int64 `json:"size"`
}
func Entries ¶
func Entries() ([]EntryRecord, error)
func EntryRecordFromJSON ¶
func EntryRecordFromJSON(data []byte) (EntryRecord, error)
func (EntryRecord) ToDict ¶
func (e EntryRecord) ToDict() map[string]any
func (EntryRecord) ToJSON ¶
func (e EntryRecord) ToJSON() (string, error)
type EntryStream ¶
type EntryStream struct {
// contains filtered or unexported fields
}
func (*EntryStream) Err ¶
func (s *EntryStream) Err() error
func (*EntryStream) Next ¶
func (s *EntryStream) Next() bool
func (*EntryStream) Value ¶
func (s *EntryStream) Value() EntryRecord
type SeaDexBackup ¶
type SeaDexBackup struct {
// contains filtered or unexported fields
}
func NewSeaDexBackup ¶
func NewSeaDexBackup(email, password string, opts ...func(*SeaDexBackup)) (*SeaDexBackup, error)
func (*SeaDexBackup) BaseURL ¶
func (b *SeaDexBackup) BaseURL() string
func (*SeaDexBackup) Close ¶
func (b *SeaDexBackup) Close()
func (*SeaDexBackup) Create ¶
func (b *SeaDexBackup) Create(filename string) (BackupFile, error)
func (*SeaDexBackup) Delete ¶
func (b *SeaDexBackup) Delete(file BackupFile) error
func (*SeaDexBackup) Download ¶
func (b *SeaDexBackup) Download(file *BackupFile, destination string, overwrite bool) (string, error)
func (*SeaDexBackup) GetBackups ¶
func (b *SeaDexBackup) GetBackups() ([]BackupFile, error)
func (*SeaDexBackup) GetLatestBackup ¶
func (b *SeaDexBackup) GetLatestBackup() (BackupFile, error)
type SeaDexEntry ¶
type SeaDexEntry struct {
// contains filtered or unexported fields
}
func NewSeaDexEntry ¶
func NewSeaDexEntry(opts ...func(*SeaDexEntry)) *SeaDexEntry
func (*SeaDexEntry) AnilistTitle ¶
func (s *SeaDexEntry) AnilistTitle(searchTerm string) string
func (*SeaDexEntry) BaseURL ¶
func (s *SeaDexEntry) BaseURL() string
func (*SeaDexEntry) Close ¶
func (s *SeaDexEntry) Close()
func (*SeaDexEntry) FromFilename ¶
func (s *SeaDexEntry) FromFilename(filename string) ([]EntryRecord, error)
func (*SeaDexEntry) FromFilenameStream ¶
func (s *SeaDexEntry) FromFilenameStream(filename string) *EntryStream
func (*SeaDexEntry) FromFilter ¶
func (s *SeaDexEntry) FromFilter(filter string) ([]EntryRecord, error)
func (*SeaDexEntry) FromFilterContext ¶
func (s *SeaDexEntry) FromFilterContext(ctx context.Context, filter string) ([]EntryRecord, error)
func (*SeaDexEntry) FromFilterStream ¶
func (s *SeaDexEntry) FromFilterStream(filter string) (*EntryStream, error)
func (*SeaDexEntry) FromID ¶
func (s *SeaDexEntry) FromID(id any) (EntryRecord, error)
func (*SeaDexEntry) FromIDContext ¶
func (s *SeaDexEntry) FromIDContext(ctx context.Context, id any) (EntryRecord, error)
func (*SeaDexEntry) FromInfohash ¶
func (s *SeaDexEntry) FromInfohash(infohash string) ([]EntryRecord, error)
func (*SeaDexEntry) FromInfohashStream ¶
func (s *SeaDexEntry) FromInfohashStream(infohash string) (*EntryStream, error)
func (*SeaDexEntry) FromTitle ¶
func (s *SeaDexEntry) FromTitle(title string) (EntryRecord, error)
func (*SeaDexEntry) FromTitleContext ¶
func (s *SeaDexEntry) FromTitleContext(ctx context.Context, title string) (EntryRecord, error)
func (*SeaDexEntry) Iterator ¶
func (s *SeaDexEntry) Iterator() ([]EntryRecord, error)
func (*SeaDexEntry) IteratorStream ¶
func (s *SeaDexEntry) IteratorStream() *EntryStream
type SeaDexError ¶
type SeaDexError struct {
Message string
}
func (*SeaDexError) Error ¶
func (e *SeaDexError) Error() string
type SeaDexTorrent ¶
type SeaDexTorrent struct {
// contains filtered or unexported fields
}
func NewSeaDexTorrent ¶
func NewSeaDexTorrent(filePath string) (*SeaDexTorrent, error)
func (*SeaDexTorrent) File ¶
func (t *SeaDexTorrent) File() string
func (*SeaDexTorrent) FileList ¶
func (t *SeaDexTorrent) FileList() ([]File, error)
func (*SeaDexTorrent) IsPrivate ¶
func (t *SeaDexTorrent) IsPrivate() bool
type Tag ¶
type Tag string
const ( TagDolbyVision Tag = "Dolby Vision" TagHDR Tag = "HDR" TagDebandRequired Tag = "Deband Required" TagDebandRecommended Tag = "Deband Recommended" TagYUV444P Tag = "YUV444P" TagPatchRequired Tag = "Patch Required" TagMisplacedSpecial Tag = "Misplaced Special" TagVFR Tag = "VFR" TagIncomplete Tag = "Incomplete" TagBroken Tag = "Broken" )
type TorrentRecord ¶
type TorrentRecord struct {
CollectionID string `json:"collection_id"`
CollectionName string `json:"collection_name"`
CreatedAt time.Time `json:"created_at"`
IsDualAudio bool `json:"is_dual_audio"`
Files []File `json:"files"`
ID string `json:"id"`
Infohash *string `json:"infohash"`
IsBest bool `json:"is_best"`
ReleaseGroup string `json:"release_group"`
Tags []Tag `json:"tags"`
Tracker Tracker `json:"tracker"`
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
GroupedURL *string `json:"grouped_url"`
Size int64 `json:"size"`
}
func TorrentRecordFromJSON ¶
func TorrentRecordFromJSON(data []byte) (TorrentRecord, error)
func (TorrentRecord) ToDict ¶
func (t TorrentRecord) ToDict() map[string]any
func (TorrentRecord) ToJSON ¶
func (t TorrentRecord) ToJSON() (string, error)
type Tracker ¶
type Tracker string
const ( TrackerNyaa Tracker = "Nyaa" TrackerAnimeTosho Tracker = "AnimeTosho" TrackerAniDex Tracker = "AniDex" TrackerRuTracker Tracker = "RuTracker" TrackerOther Tracker = "Other" TrackerAnimeBytes Tracker = "AB" TrackerBeyondHD Tracker = "BeyondHD" TrackerPassThePopcorn Tracker = "PassThePopcorn" TrackerBroadcastTheNet Tracker = "BroadcastTheNet" TrackerHDBits Tracker = "HDBits" TrackerBlutopia Tracker = "Blutopia" TrackerAither Tracker = "Aither" TrackerOtherPrivate Tracker = "OtherPrivate" )
func ParseTracker ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.