Documentation ¶
Index ¶
- Constants
- Variables
- func ContentTypeNames() []string
- func FacetLogicNames() []string
- func FileTypeNames() []string
- func FilesStatusNames() []string
- func InferVideoCodecAndReleaseGroup(input string) (NullVideoCodec, NullString)
- func LanguageNames() []string
- func LanguageValueStrings() []string
- func QueueJobStatusNames() []string
- func ValidateTagName(name string) error
- func Video3dNames() []string
- func VideoCodecNames() []string
- func VideoModifierNames() []string
- func VideoResolutionNames() []string
- func VideoSourceNames() []string
- type BloomFilter
- type Content
- type ContentAttribute
- type ContentCollection
- type ContentCollectionContent
- type ContentCollectionRef
- type ContentRef
- type ContentType
- func (c ContentType) IsNil() bool
- func (x ContentType) IsValid() bool
- func (c ContentType) IsVideo() bool
- func (c ContentType) Label() string
- func (x ContentType) MarshalText() ([]byte, error)
- func (x *ContentType) Scan(value interface{}) (err error)
- func (x ContentType) String() string
- func (x *ContentType) UnmarshalText(text []byte) error
- func (x ContentType) Value() (driver.Value, error)
- type Date
- func (d Date) End() Date
- func (d Date) EndOfDayTime() time.Time
- func (d Date) EndTime() time.Time
- func (d Date) IsNil() bool
- func (d Date) IsoDateString() string
- func (d Date) MarshalGQL(w io.Writer)
- func (d *Date) Scan(value interface{}) error
- func (d Date) Start() Date
- func (d Date) StartTime() time.Time
- func (d Date) Time() time.Time
- func (d *Date) UnmarshalGQL(v interface{}) error
- func (d Date) Value() (driver.Value, error)
- func (d Date) YearString() string
- type DateRange
- type Duration
- type Episodes
- type ExternalLink
- type FacetLogic
- type FileType
- func (ft FileType) Extensions() []string
- func (x FileType) IsValid() bool
- func (ft FileType) Label() string
- func (x FileType) MarshalText() ([]byte, error)
- func (x *FileType) Scan(value interface{}) (err error)
- func (x FileType) String() string
- func (x *FileType) UnmarshalText(text []byte) error
- func (x FileType) Value() (driver.Value, error)
- type FilesStatus
- type KeyValue
- type Language
- func (l Language) Aliases() []string
- func (l Language) Alpha2() string
- func (l Language) Alpha3() string
- func (l Language) Id() string
- func (l Language) IsValid() bool
- func (l Language) Name() string
- func (l *Language) Scan(value interface{}) error
- func (l Language) String() string
- func (l Language) Value() (driver.Value, error)
- type Languages
- type Maybe
- type MetadataSource
- type NullBool
- type NullContentType
- func (n NullContentType) MarshalGQL(w io.Writer)
- func (n NullContentType) MarshalJSON() ([]byte, error)
- func (x *NullContentType) Scan(value interface{}) (err error)
- func (n *NullContentType) UnmarshalGQL(v any) error
- func (n *NullContentType) UnmarshalJSON(b []byte) error
- func (x NullContentType) Value() (driver.Value, error)
- type NullFacetLogic
- func (n NullFacetLogic) MarshalGQL(w io.Writer)
- func (n NullFacetLogic) MarshalJSON() ([]byte, error)
- func (x *NullFacetLogic) Scan(value interface{}) (err error)
- func (n *NullFacetLogic) UnmarshalGQL(v any) error
- func (n *NullFacetLogic) UnmarshalJSON(b []byte) error
- func (x NullFacetLogic) Value() (driver.Value, error)
- type NullFileType
- func (n NullFileType) MarshalGQL(w io.Writer)
- func (n NullFileType) MarshalJSON() ([]byte, error)
- func (x *NullFileType) Scan(value interface{}) (err error)
- func (n *NullFileType) UnmarshalGQL(v any) error
- func (n *NullFileType) UnmarshalJSON(b []byte) error
- func (x NullFileType) Value() (driver.Value, error)
- type NullFilesStatus
- func (n NullFilesStatus) MarshalGQL(w io.Writer)
- func (n NullFilesStatus) MarshalJSON() ([]byte, error)
- func (x *NullFilesStatus) Scan(value interface{}) (err error)
- func (n *NullFilesStatus) UnmarshalGQL(v any) error
- func (n *NullFilesStatus) UnmarshalJSON(b []byte) error
- func (x NullFilesStatus) Value() (driver.Value, error)
- type NullFloat32
- type NullFloat64
- type NullInt
- type NullLanguage
- type NullQueueJobStatus
- func (n NullQueueJobStatus) MarshalGQL(w io.Writer)
- func (n NullQueueJobStatus) MarshalJSON() ([]byte, error)
- func (x *NullQueueJobStatus) Scan(value interface{}) (err error)
- func (n *NullQueueJobStatus) UnmarshalGQL(v any) error
- func (n *NullQueueJobStatus) UnmarshalJSON(b []byte) error
- func (x NullQueueJobStatus) Value() (driver.Value, error)
- type NullString
- func (n NullString) MarshalGQL(w io.Writer)
- func (n NullString) MarshalJSON() ([]byte, error)
- func (n *NullString) Scan(value interface{}) error
- func (n *NullString) UnmarshalGQL(v interface{}) error
- func (n *NullString) UnmarshalJSON(b []byte) error
- func (n NullString) Value() (driver.Value, error)
- type NullUint
- type NullUint16
- type NullUint64
- type NullVideo3d
- func (n NullVideo3d) MarshalGQL(w io.Writer)
- func (n NullVideo3d) MarshalJSON() ([]byte, error)
- func (x *NullVideo3d) Scan(value interface{}) (err error)
- func (n *NullVideo3d) UnmarshalGQL(v any) error
- func (n *NullVideo3d) UnmarshalJSON(b []byte) error
- func (x NullVideo3d) Value() (driver.Value, error)
- type NullVideoCodec
- func (n NullVideoCodec) MarshalGQL(w io.Writer)
- func (n NullVideoCodec) MarshalJSON() ([]byte, error)
- func (x *NullVideoCodec) Scan(value interface{}) (err error)
- func (n *NullVideoCodec) UnmarshalGQL(v any) error
- func (n *NullVideoCodec) UnmarshalJSON(b []byte) error
- func (x NullVideoCodec) Value() (driver.Value, error)
- type NullVideoModifier
- func (n NullVideoModifier) MarshalGQL(w io.Writer)
- func (n NullVideoModifier) MarshalJSON() ([]byte, error)
- func (x *NullVideoModifier) Scan(value interface{}) (err error)
- func (n *NullVideoModifier) UnmarshalGQL(v any) error
- func (n *NullVideoModifier) UnmarshalJSON(b []byte) error
- func (x NullVideoModifier) Value() (driver.Value, error)
- type NullVideoResolution
- func (n NullVideoResolution) MarshalGQL(w io.Writer)
- func (n NullVideoResolution) MarshalJSON() ([]byte, error)
- func (x *NullVideoResolution) Scan(value interface{}) (err error)
- func (n *NullVideoResolution) UnmarshalGQL(v any) error
- func (n *NullVideoResolution) UnmarshalJSON(b []byte) error
- func (x NullVideoResolution) Value() (driver.Value, error)
- type NullVideoSource
- func (n NullVideoSource) MarshalGQL(w io.Writer)
- func (n NullVideoSource) MarshalJSON() ([]byte, error)
- func (x *NullVideoSource) Scan(value interface{}) (err error)
- func (n *NullVideoSource) UnmarshalGQL(v any) error
- func (n *NullVideoSource) UnmarshalJSON(b []byte) error
- func (x NullVideoSource) Value() (driver.Value, error)
- type QueueJob
- type QueueJobOption
- type QueueJobStatus
- func (x QueueJobStatus) IsValid() bool
- func (x QueueJobStatus) MarshalText() ([]byte, error)
- func (x *QueueJobStatus) Scan(value interface{}) (err error)
- func (x QueueJobStatus) String() string
- func (x *QueueJobStatus) UnmarshalText(text []byte) error
- func (x QueueJobStatus) Value() (driver.Value, error)
- type Season
- type Torrent
- func (t *Torrent) AfterFind(tx *gorm.DB) error
- func (t Torrent) FileExtensions() []string
- func (t Torrent) FileType() NullFileType
- func (t Torrent) FileTypes() []FileType
- func (t Torrent) HasFileType(fts ...FileType) NullBool
- func (t Torrent) HasFilesInfo() bool
- func (t Torrent) Leechers() NullUint
- func (t Torrent) MagnetUri() string
- func (t Torrent) Seeders() NullUint
- func (t Torrent) SingleFile() bool
- func (*Torrent) TableName() string
- func (t Torrent) TagNames() []string
- func (t Torrent) WantFilesInfo() bool
- type TorrentContent
- type TorrentFile
- type TorrentHint
- type TorrentPieces
- type TorrentSource
- type TorrentTag
- type TorrentsTorrentSource
- type Video3d
- type VideoCodec
- func (x VideoCodec) IsValid() bool
- func (v VideoCodec) Label() string
- func (x VideoCodec) MarshalText() ([]byte, error)
- func (x *VideoCodec) Scan(value interface{}) (err error)
- func (x VideoCodec) String() string
- func (x *VideoCodec) UnmarshalText(text []byte) error
- func (x VideoCodec) Value() (driver.Value, error)
- type VideoModifier
- func (x VideoModifier) IsValid() bool
- func (v VideoModifier) Label() string
- func (x VideoModifier) MarshalText() ([]byte, error)
- func (x *VideoModifier) Scan(value interface{}) (err error)
- func (x VideoModifier) String() string
- func (x *VideoModifier) UnmarshalText(text []byte) error
- func (x VideoModifier) Value() (driver.Value, error)
- type VideoResolution
- func (x VideoResolution) IsValid() bool
- func (v VideoResolution) Label() string
- func (x VideoResolution) MarshalText() ([]byte, error)
- func (x *VideoResolution) Scan(value interface{}) (err error)
- func (x VideoResolution) String() string
- func (x *VideoResolution) UnmarshalText(text []byte) error
- func (x VideoResolution) Value() (driver.Value, error)
- type VideoSource
- func (x VideoSource) IsValid() bool
- func (v VideoSource) Label() string
- func (x VideoSource) MarshalText() ([]byte, error)
- func (x *VideoSource) Scan(value interface{}) (err error)
- func (x VideoSource) String() string
- func (x *VideoSource) UnmarshalText(text []byte) error
- func (x VideoSource) Value() (driver.Value, error)
- type Year
- func (Year) GormDataType() string
- func (y Year) GormValue(context.Context, *gorm.DB) clause.Expr
- func (y Year) IsNil() bool
- func (y Year) MarshalGQL(w io.Writer)
- func (y *Year) Scan(src interface{}) error
- func (y Year) String() string
- func (y *Year) UnmarshalGQL(v interface{}) error
- func (y Year) Value() (interface{}, error)
Constants ¶
const TableNameBloomFilter = "bloom_filters"
const TableNameContent = "content"
const TableNameContentAttribute = "content_attributes"
const TableNameContentCollection = "content_collections"
const TableNameContentCollectionContent = "content_collections_content"
const TableNameKeyValue = "key_values"
const TableNameMetadataSource = "metadata_sources"
const TableNameQueueJob = "queue_jobs"
const TableNameTorrent = "torrents"
const TableNameTorrentContent = "torrent_contents"
const TableNameTorrentFile = "torrent_files"
const TableNameTorrentHint = "torrent_hints"
const TableNameTorrentPieces = "torrent_pieces"
const TableNameTorrentSource = "torrent_sources"
const TableNameTorrentTag = "torrent_tags"
const TableNameTorrentsTorrentSource = "torrents_torrent_sources"
Variables ¶
var EpisodesToken = rex.Group.Composite(
episodesRegularTokens,
episodesXFormatTokens,
)
var ErrInvalidContentType = fmt.Errorf("not a valid ContentType, try [%s]", strings.Join(_ContentTypeNames, ", "))
var ErrInvalidFacetLogic = fmt.Errorf("not a valid FacetLogic, try [%s]", strings.Join(_FacetLogicNames, ", "))
var ErrInvalidFileType = fmt.Errorf("not a valid FileType, try [%s]", strings.Join(_FileTypeNames, ", "))
var ErrInvalidFilesStatus = fmt.Errorf("not a valid FilesStatus, try [%s]", strings.Join(_FilesStatusNames, ", "))
var ErrInvalidQueueJobStatus = fmt.Errorf("not a valid QueueJobStatus, try [%s]", strings.Join(_QueueJobStatusNames, ", "))
var ErrInvalidVideo3d = fmt.Errorf("not a valid Video3d, try [%s]", strings.Join(_Video3dNames, ", "))
var ErrInvalidVideoCodec = fmt.Errorf("not a valid VideoCodec, try [%s]", strings.Join(_VideoCodecNames, ", "))
var ErrInvalidVideoModifier = fmt.Errorf("not a valid VideoModifier, try [%s]", strings.Join(_VideoModifierNames, ", "))
var ErrInvalidVideoResolution = fmt.Errorf("not a valid VideoResolution, try [%s]", strings.Join(_VideoResolutionNames, ", "))
var ErrInvalidVideoSource = fmt.Errorf("not a valid VideoSource, try [%s]", strings.Join(_VideoSourceNames, ", "))
Functions ¶
func ContentTypeNames ¶
func ContentTypeNames() []string
ContentTypeNames returns a list of possible string values of ContentType.
func FacetLogicNames ¶
func FacetLogicNames() []string
FacetLogicNames returns a list of possible string values of FacetLogic.
func FileTypeNames ¶
func FileTypeNames() []string
FileTypeNames returns a list of possible string values of FileType.
func FilesStatusNames ¶ added in v0.0.3
func FilesStatusNames() []string
FilesStatusNames returns a list of possible string values of FilesStatus.
func InferVideoCodecAndReleaseGroup ¶
func InferVideoCodecAndReleaseGroup(input string) (NullVideoCodec, NullString)
func LanguageNames ¶
func LanguageNames() []string
func LanguageValueStrings ¶
func LanguageValueStrings() []string
func QueueJobStatusNames ¶ added in v0.7.0
func QueueJobStatusNames() []string
QueueJobStatusNames returns a list of possible string values of QueueJobStatus.
func ValidateTagName ¶ added in v0.3.0
func Video3dNames ¶
func Video3dNames() []string
Video3dNames returns a list of possible string values of Video3d.
func VideoCodecNames ¶
func VideoCodecNames() []string
VideoCodecNames returns a list of possible string values of VideoCodec.
func VideoModifierNames ¶
func VideoModifierNames() []string
VideoModifierNames returns a list of possible string values of VideoModifier.
func VideoResolutionNames ¶
func VideoResolutionNames() []string
VideoResolutionNames returns a list of possible string values of VideoResolution.
func VideoSourceNames ¶
func VideoSourceNames() []string
VideoSourceNames returns a list of possible string values of VideoSource.
Types ¶
type BloomFilter ¶ added in v0.3.0
type BloomFilter struct { Key string `gorm:"column:key;primaryKey" json:"key"` Filter bloom.StableBloomFilter `gorm:"column:bytes;not null" json:"bytes"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
BloomFilter mapped from table <bloom_filters>
func (*BloomFilter) TableName ¶ added in v0.3.0
func (*BloomFilter) TableName() string
TableName BloomFilter's table name
type Content ¶
type Content struct { Type ContentType `gorm:"column:type;primaryKey;<-:create" json:"type"` Source string `gorm:"column:source;primaryKey;<-:create" json:"source"` ID string `gorm:"column:id;primaryKey;<-:create" json:"id"` Title string `gorm:"column:title;not null" json:"title"` ReleaseDate Date `gorm:"column:release_date" json:"releaseDate"` ReleaseYear Year `gorm:"column:release_year" json:"releaseYear"` Adult NullBool `gorm:"column:adult" json:"adult"` OriginalLanguage NullLanguage `gorm:"column:original_language" json:"originalLanguage"` OriginalTitle NullString `gorm:"column:original_title" json:"originalTitle"` Overview NullString `gorm:"column:overview" json:"overview"` Runtime NullUint16 `gorm:"column:runtime" json:"runtime"` Popularity NullFloat32 `gorm:"column:popularity" json:"popularity"` VoteAverage NullFloat32 `gorm:"column:vote_average" json:"voteAverage"` VoteCount NullUint `gorm:"column:vote_count" json:"voteCount"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` Tsv fts.Tsvector `gorm:"column:tsv" json:"tsv"` Collections []ContentCollection `gorm:"many2many:content_collections_content" json:"collections"` Attributes []ContentAttribute `json:"attributes"` MetadataSource MetadataSource `gorm:"foreignKey:Source" json:"metadata_source"` }
Content mapped from table <content>
func (Content) ExternalLinks ¶
func (c Content) ExternalLinks() []ExternalLink
func (Content) Ref ¶
func (c Content) Ref() ContentRef
type ContentAttribute ¶
type ContentAttribute struct { ContentType ContentType `gorm:"column:content_type;primaryKey;<-:create" json:"contentType"` ContentSource string `gorm:"column:content_source;primaryKey;<-:create" json:"contentSource"` ContentID string `gorm:"column:content_id;primaryKey;<-:create" json:"contentId"` Source string `gorm:"column:source;primaryKey" json:"source"` Key string `gorm:"column:key;primaryKey;<-:create" json:"key"` Value string `gorm:"column:value;not null" json:"value"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` MetadataSource MetadataSource `gorm:"foreignKey:Source" json:"metadata_source"` }
ContentAttribute mapped from table <content_attributes>
func (*ContentAttribute) TableName ¶
func (*ContentAttribute) TableName() string
TableName ContentAttribute's table name
type ContentCollection ¶
type ContentCollection struct { Type string `gorm:"column:type;primaryKey;<-:create" json:"type"` Source string `gorm:"column:source;primaryKey" json:"source"` ID string `gorm:"column:id;primaryKey;<-:create" json:"id"` Name string `gorm:"column:name;not null" json:"name"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` MetadataSource MetadataSource `gorm:"foreignKey:Source" json:"metadata_source"` }
ContentCollection mapped from table <content_collections>
func (*ContentCollection) TableName ¶
func (*ContentCollection) TableName() string
TableName ContentCollection's table name
type ContentCollectionContent ¶
type ContentCollectionContent struct { ContentType ContentType `gorm:"column:content_type;primaryKey" json:"contentType"` ContentSource string `gorm:"column:content_source;primaryKey" json:"contentSource"` ContentID string `gorm:"column:content_id;primaryKey" json:"contentId"` ContentCollectionType string `gorm:"column:content_collection_type;primaryKey" json:"contentCollectionType"` ContentCollectionSource string `gorm:"column:content_collection_source;primaryKey" json:"contentCollectionSource"` ContentCollectionID string `gorm:"column:content_collection_id;primaryKey" json:"contentCollectionId"` Content Content `json:"content"` Collection ContentCollection `` /* 127-byte string literal not displayed */ }
ContentCollectionContent mapped from table <content_collections_content>
func (*ContentCollectionContent) TableName ¶
func (*ContentCollectionContent) TableName() string
TableName ContentCollectionContent's table name
type ContentCollectionRef ¶
type ContentRef ¶
type ContentRef struct { Type ContentType Source string ID string }
type ContentType ¶
type ContentType string
ContentType represents the type of content ENUM(movie, tv_show, music, game, software, book, xxx)
const ( ContentTypeMovie ContentType = "movie" ContentTypeTvShow ContentType = "tv_show" ContentTypeMusic ContentType = "music" ContentTypeGame ContentType = "game" ContentTypeSoftware ContentType = "software" ContentTypeBook ContentType = "book" ContentTypeXxx ContentType = "xxx" )
func ContentTypeValues ¶
func ContentTypeValues() []ContentType
ContentTypeValues returns a list of the values for ContentType
func ParseContentType ¶
func ParseContentType(name string) (ContentType, error)
ParseContentType attempts to convert a string to a ContentType.
func (ContentType) IsNil ¶ added in v0.5.0
func (c ContentType) IsNil() bool
func (ContentType) IsValid ¶
func (x ContentType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (ContentType) IsVideo ¶
func (c ContentType) IsVideo() bool
func (ContentType) Label ¶
func (c ContentType) Label() string
func (ContentType) MarshalText ¶
func (x ContentType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*ContentType) Scan ¶
func (x *ContentType) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (ContentType) String ¶
func (x ContentType) String() string
String implements the Stringer interface.
func (*ContentType) UnmarshalText ¶
func (x *ContentType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Date ¶
func NewDateFromIsoString ¶
func NewDateFromTime ¶
func (Date) EndOfDayTime ¶
func (Date) IsoDateString ¶
func (Date) MarshalGQL ¶
func (*Date) UnmarshalGQL ¶
func (Date) YearString ¶
type DateRange ¶
func NewDateRangeFromDates ¶
func NewDateRangeFromString ¶
func NewDateRangeFromYear ¶
func NewNilDateRange ¶
func NewNilDateRange() DateRange
type Episodes ¶
func EpisodesMatchToEpisodes ¶ added in v0.6.2
func ParseEpisodes ¶ added in v0.6.2
func (Episodes) AddEpisode ¶
func (Episodes) HasEpisode ¶
func (Episodes) SeasonEntries ¶
type ExternalLink ¶
type ExternalLink struct { MetadataSource ID string Url string }
type FacetLogic ¶
type FacetLogic string
FacetLogic represents the logic used to filter and aggregate facets ENUM(and, or)
const ( FacetLogicAnd FacetLogic = "and" FacetLogicOr FacetLogic = "or" )
func FacetLogicValues ¶
func FacetLogicValues() []FacetLogic
FacetLogicValues returns a list of the values for FacetLogic
func ParseFacetLogic ¶
func ParseFacetLogic(name string) (FacetLogic, error)
ParseFacetLogic attempts to convert a string to a FacetLogic.
func (FacetLogic) IsValid ¶
func (x FacetLogic) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (FacetLogic) MarshalText ¶
func (x FacetLogic) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*FacetLogic) Scan ¶
func (x *FacetLogic) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (FacetLogic) String ¶
func (x FacetLogic) String() string
String implements the Stringer interface.
func (*FacetLogic) UnmarshalText ¶
func (x *FacetLogic) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type FileType ¶
type FileType string
FileType represents the general type of a file
ENUM( archive, audio, data, document, image, software, subtitles, video,
)
func FileTypeValues ¶
func FileTypeValues() []FileType
FileTypeValues returns a list of the values for FileType
func ParseFileType ¶
ParseFileType attempts to convert a string to a FileType.
func (FileType) Extensions ¶
func (FileType) IsValid ¶
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (FileType) MarshalText ¶
MarshalText implements the text marshaller method.
func (*FileType) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type FilesStatus ¶ added in v0.0.3
type FilesStatus string
FilesStatus represents what we know about the files in a Torrent ENUM(no_info, single, multi, over_threshold)
const ( FilesStatusNoInfo FilesStatus = "no_info" FilesStatusSingle FilesStatus = "single" FilesStatusMulti FilesStatus = "multi" FilesStatusOverThreshold FilesStatus = "over_threshold" )
func FilesStatusValues ¶ added in v0.0.3
func FilesStatusValues() []FilesStatus
FilesStatusValues returns a list of the values for FilesStatus
func ParseFilesStatus ¶ added in v0.0.3
func ParseFilesStatus(name string) (FilesStatus, error)
ParseFilesStatus attempts to convert a string to a FilesStatus.
func (FilesStatus) IsValid ¶ added in v0.0.3
func (x FilesStatus) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (FilesStatus) MarshalText ¶ added in v0.0.3
func (x FilesStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*FilesStatus) Scan ¶ added in v0.0.3
func (x *FilesStatus) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (FilesStatus) String ¶ added in v0.0.3
func (x FilesStatus) String() string
String implements the Stringer interface.
func (*FilesStatus) UnmarshalText ¶ added in v0.0.3
func (x *FilesStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type KeyValue ¶ added in v0.5.0
type KeyValue struct { Key string `gorm:"column:key;primaryKey" json:"key"` Value string `gorm:"column:value;not null" json:"value"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
KeyValue mapped from table <key_values>
type Languages ¶
type Languages map[Language]struct{}
func InferLanguages ¶
func (Languages) MarshalJSON ¶
func (*Languages) UnmarshalJSON ¶
type Maybe ¶
type Maybe[T interface{}] struct { Val T Valid bool }
func MaybeValid ¶
func MaybeValid[T interface{}](v T) Maybe[T]
type MetadataSource ¶
type MetadataSource struct { Key string `gorm:"column:key;primaryKey;<-:create" json:"key"` Name string `gorm:"column:name;not null" json:"name"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
MetadataSource mapped from table <metadata_sources>
func (*MetadataSource) TableName ¶
func (*MetadataSource) TableName() string
TableName MetadataSource's table name
type NullBool ¶
NullBool - nullable bool
func NewNullBool ¶
func (NullBool) MarshalGQL ¶
func (*NullBool) UnmarshalGQL ¶
type NullContentType ¶
type NullContentType struct { ContentType ContentType Valid bool Set bool }
func NewNullContentType ¶
func NewNullContentType(val interface{}) (x NullContentType)
func (NullContentType) MarshalGQL ¶
func (n NullContentType) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullContentType to GraphQL.
func (NullContentType) MarshalJSON ¶
func (n NullContentType) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullContentType to JSON.
func (*NullContentType) Scan ¶
func (x *NullContentType) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullContentType) UnmarshalGQL ¶
func (n *NullContentType) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullContentType from GraphQL.
func (*NullContentType) UnmarshalJSON ¶
func (n *NullContentType) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullContentType from JSON.
type NullFacetLogic ¶
type NullFacetLogic struct { FacetLogic FacetLogic Valid bool Set bool }
func NewNullFacetLogic ¶
func NewNullFacetLogic(val interface{}) (x NullFacetLogic)
func (NullFacetLogic) MarshalGQL ¶
func (n NullFacetLogic) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullFacetLogic to GraphQL.
func (NullFacetLogic) MarshalJSON ¶
func (n NullFacetLogic) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullFacetLogic to JSON.
func (*NullFacetLogic) Scan ¶
func (x *NullFacetLogic) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullFacetLogic) UnmarshalGQL ¶
func (n *NullFacetLogic) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullFacetLogic from GraphQL.
func (*NullFacetLogic) UnmarshalJSON ¶
func (n *NullFacetLogic) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullFacetLogic from JSON.
type NullFileType ¶
func FileTypeFromExtension ¶
func FileTypeFromExtension(ext string) NullFileType
func NewNullFileType ¶
func NewNullFileType(val interface{}) (x NullFileType)
func (NullFileType) MarshalGQL ¶
func (n NullFileType) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullFileType to GraphQL.
func (NullFileType) MarshalJSON ¶
func (n NullFileType) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullFileType to JSON.
func (*NullFileType) Scan ¶
func (x *NullFileType) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullFileType) UnmarshalGQL ¶
func (n *NullFileType) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullFileType from GraphQL.
func (*NullFileType) UnmarshalJSON ¶
func (n *NullFileType) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullFileType from JSON.
type NullFilesStatus ¶ added in v0.0.3
type NullFilesStatus struct { FilesStatus FilesStatus Valid bool Set bool }
func NewNullFilesStatus ¶ added in v0.0.3
func NewNullFilesStatus(val interface{}) (x NullFilesStatus)
func (NullFilesStatus) MarshalGQL ¶ added in v0.0.3
func (n NullFilesStatus) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullFilesStatus to GraphQL.
func (NullFilesStatus) MarshalJSON ¶ added in v0.0.3
func (n NullFilesStatus) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullFilesStatus to JSON.
func (*NullFilesStatus) Scan ¶ added in v0.0.3
func (x *NullFilesStatus) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullFilesStatus) UnmarshalGQL ¶ added in v0.0.3
func (n *NullFilesStatus) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullFilesStatus from GraphQL.
func (*NullFilesStatus) UnmarshalJSON ¶ added in v0.0.3
func (n *NullFilesStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullFilesStatus from JSON.
type NullFloat32 ¶
NullFloat32 - nullable float32
func NewNullFloat32 ¶
func NewNullFloat32(f float32) NullFloat32
func (NullFloat32) MarshalGQL ¶
func (n NullFloat32) MarshalGQL(w io.Writer)
func (*NullFloat32) Scan ¶
func (n *NullFloat32) Scan(value interface{}) error
func (*NullFloat32) UnmarshalGQL ¶
func (n *NullFloat32) UnmarshalGQL(v interface{}) error
type NullFloat64 ¶ added in v0.6.0
NullFloat64 - nullable float64
func NewNullFloat64 ¶ added in v0.6.0
func NewNullFloat64(f float64) NullFloat64
func (NullFloat64) MarshalGQL ¶ added in v0.6.0
func (n NullFloat64) MarshalGQL(w io.Writer)
func (*NullFloat64) Scan ¶ added in v0.6.0
func (n *NullFloat64) Scan(value interface{}) error
func (*NullFloat64) UnmarshalGQL ¶ added in v0.6.0
func (n *NullFloat64) UnmarshalGQL(v interface{}) error
type NullLanguage ¶
func NewNullLanguage ¶
func NewNullLanguage(l Language) NullLanguage
func ParseLanguage ¶
func ParseLanguage(name string) NullLanguage
func (*NullLanguage) Scan ¶
func (l *NullLanguage) Scan(value interface{}) error
type NullQueueJobStatus ¶ added in v0.7.0
type NullQueueJobStatus struct { QueueJobStatus QueueJobStatus Valid bool Set bool }
func NewNullQueueJobStatus ¶ added in v0.7.0
func NewNullQueueJobStatus(val interface{}) (x NullQueueJobStatus)
func (NullQueueJobStatus) MarshalGQL ¶ added in v0.7.0
func (n NullQueueJobStatus) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullQueueJobStatus to GraphQL.
func (NullQueueJobStatus) MarshalJSON ¶ added in v0.7.0
func (n NullQueueJobStatus) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullQueueJobStatus to JSON.
func (*NullQueueJobStatus) Scan ¶ added in v0.7.0
func (x *NullQueueJobStatus) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullQueueJobStatus) UnmarshalGQL ¶ added in v0.7.0
func (n *NullQueueJobStatus) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullQueueJobStatus from GraphQL.
func (*NullQueueJobStatus) UnmarshalJSON ¶ added in v0.7.0
func (n *NullQueueJobStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullQueueJobStatus from JSON.
type NullString ¶
NullString - nullable string
func NewNullString ¶
func NewNullString(s string) NullString
func (NullString) MarshalGQL ¶
func (n NullString) MarshalGQL(w io.Writer)
func (NullString) MarshalJSON ¶ added in v0.5.0
func (n NullString) MarshalJSON() ([]byte, error)
func (*NullString) Scan ¶
func (n *NullString) Scan(value interface{}) error
func (*NullString) UnmarshalGQL ¶
func (n *NullString) UnmarshalGQL(v interface{}) error
func (*NullString) UnmarshalJSON ¶ added in v0.5.0
func (n *NullString) UnmarshalJSON(b []byte) error
type NullUint ¶
NullUint - nullable uint
func NewNullUint ¶
func (NullUint) MarshalGQL ¶
func (*NullUint) UnmarshalGQL ¶
type NullUint16 ¶
NullUint16 - nullable uint16
func NewNullUint16 ¶
func NewNullUint16(n uint16) NullUint16
func (NullUint16) MarshalGQL ¶
func (n NullUint16) MarshalGQL(w io.Writer)
func (*NullUint16) Scan ¶
func (n *NullUint16) Scan(value interface{}) error
func (*NullUint16) UnmarshalGQL ¶
func (n *NullUint16) UnmarshalGQL(v interface{}) error
type NullUint64 ¶
NullUint64 - nullable uint64
func NewNullUint64 ¶
func NewNullUint64(n uint64) NullUint64
func (*NullUint64) Scan ¶
func (n *NullUint64) Scan(value interface{}) error
type NullVideo3d ¶
func InferVideo3d ¶
func InferVideo3d(input string) NullVideo3d
func NewNullVideo3d ¶
func NewNullVideo3d(val interface{}) (x NullVideo3d)
func (NullVideo3d) MarshalGQL ¶
func (n NullVideo3d) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullVideo3d to GraphQL.
func (NullVideo3d) MarshalJSON ¶
func (n NullVideo3d) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullVideo3d to JSON.
func (*NullVideo3d) Scan ¶
func (x *NullVideo3d) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullVideo3d) UnmarshalGQL ¶
func (n *NullVideo3d) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullVideo3d from GraphQL.
func (*NullVideo3d) UnmarshalJSON ¶
func (n *NullVideo3d) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullVideo3d from JSON.
type NullVideoCodec ¶
type NullVideoCodec struct { VideoCodec VideoCodec Valid bool Set bool }
func NewNullVideoCodec ¶
func NewNullVideoCodec(val interface{}) (x NullVideoCodec)
func (NullVideoCodec) MarshalGQL ¶
func (n NullVideoCodec) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullVideoCodec to GraphQL.
func (NullVideoCodec) MarshalJSON ¶
func (n NullVideoCodec) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullVideoCodec to JSON.
func (*NullVideoCodec) Scan ¶
func (x *NullVideoCodec) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullVideoCodec) UnmarshalGQL ¶
func (n *NullVideoCodec) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullVideoCodec from GraphQL.
func (*NullVideoCodec) UnmarshalJSON ¶
func (n *NullVideoCodec) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullVideoCodec from JSON.
type NullVideoModifier ¶
type NullVideoModifier struct { VideoModifier VideoModifier Valid bool Set bool }
func InferVideoModifier ¶
func InferVideoModifier(input string) NullVideoModifier
func NewNullVideoModifier ¶
func NewNullVideoModifier(val interface{}) (x NullVideoModifier)
func (NullVideoModifier) MarshalGQL ¶
func (n NullVideoModifier) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullVideoModifier to GraphQL.
func (NullVideoModifier) MarshalJSON ¶
func (n NullVideoModifier) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullVideoModifier to JSON.
func (*NullVideoModifier) Scan ¶
func (x *NullVideoModifier) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullVideoModifier) UnmarshalGQL ¶
func (n *NullVideoModifier) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullVideoModifier from GraphQL.
func (*NullVideoModifier) UnmarshalJSON ¶
func (n *NullVideoModifier) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullVideoModifier from JSON.
type NullVideoResolution ¶
type NullVideoResolution struct { VideoResolution VideoResolution Valid bool Set bool }
func InferVideoResolution ¶
func InferVideoResolution(input string) NullVideoResolution
func NewNullVideoResolution ¶
func NewNullVideoResolution(val interface{}) (x NullVideoResolution)
func (NullVideoResolution) MarshalGQL ¶
func (n NullVideoResolution) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullVideoResolution to GraphQL.
func (NullVideoResolution) MarshalJSON ¶
func (n NullVideoResolution) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullVideoResolution to JSON.
func (*NullVideoResolution) Scan ¶
func (x *NullVideoResolution) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullVideoResolution) UnmarshalGQL ¶
func (n *NullVideoResolution) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullVideoResolution from GraphQL.
func (*NullVideoResolution) UnmarshalJSON ¶
func (n *NullVideoResolution) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullVideoResolution from JSON.
type NullVideoSource ¶
type NullVideoSource struct { VideoSource VideoSource Valid bool Set bool }
func InferVideoSource ¶
func InferVideoSource(input string) NullVideoSource
func NewNullVideoSource ¶
func NewNullVideoSource(val interface{}) (x NullVideoSource)
func (NullVideoSource) MarshalGQL ¶
func (n NullVideoSource) MarshalGQL(w io.Writer)
MarshalGQL correctly serializes a NullVideoSource to GraphQL.
func (NullVideoSource) MarshalJSON ¶
func (n NullVideoSource) MarshalJSON() ([]byte, error)
MarshalJSON correctly serializes a NullVideoSource to JSON.
func (*NullVideoSource) Scan ¶
func (x *NullVideoSource) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (*NullVideoSource) UnmarshalGQL ¶
func (n *NullVideoSource) UnmarshalGQL(v any) error
UnmarshalGQL correctly deserializes a NullVideoSource from GraphQL.
func (*NullVideoSource) UnmarshalJSON ¶
func (n *NullVideoSource) UnmarshalJSON(b []byte) error
UnmarshalJSON correctly deserializes a NullVideoSource from JSON.
type QueueJob ¶ added in v0.7.0
type QueueJob struct { ID string `gorm:"column:id;primaryKey;default:gen_random_uuid();<-:false" json:"id"` Fingerprint string `gorm:"column:fingerprint;not null;<-:create" json:"fingerprint"` Queue string `gorm:"column:queue;not null;<-:create" json:"queue"` Status QueueJobStatus `gorm:"column:status;not null;default:pending" json:"status"` Payload string `gorm:"column:payload;not null;<-:create" json:"payload"` Retries uint `gorm:"column:retries;not null" json:"retries"` MaxRetries uint `gorm:"column:max_retries;not null;<-:create" json:"maxRetries"` RunAfter time.Time `gorm:"column:run_after;not null" json:"runAfter"` RanAt sql.NullTime `gorm:"column:ran_at" json:"ranAt"` Error NullString `gorm:"column:error" json:"error"` Deadline sql.NullTime `gorm:"column:deadline;<-:create" json:"deadline"` ArchivalDuration Duration `gorm:"column:archival_duration;not null;<-:create" json:"archivalDuration"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` }
QueueJob mapped from table <queue_jobs>
func NewQueueJob ¶ added in v0.7.0
func NewQueueJob(queue string, payload any, opts ...QueueJobOption) (QueueJob, error)
type QueueJobOption ¶ added in v0.7.0
type QueueJobOption func(*QueueJob)
func QueueJobMaxRetries ¶ added in v0.7.0
func QueueJobMaxRetries(maxRetries uint) QueueJobOption
type QueueJobStatus ¶ added in v0.7.0
type QueueJobStatus string
QueueJobStatus represents the status of a job in the queue ENUM(pending, processed, retry, failed)
const ( QueueJobStatusPending QueueJobStatus = "pending" QueueJobStatusProcessed QueueJobStatus = "processed" QueueJobStatusRetry QueueJobStatus = "retry" QueueJobStatusFailed QueueJobStatus = "failed" )
func ParseQueueJobStatus ¶ added in v0.7.0
func ParseQueueJobStatus(name string) (QueueJobStatus, error)
ParseQueueJobStatus attempts to convert a string to a QueueJobStatus.
func QueueJobStatusValues ¶ added in v0.7.0
func QueueJobStatusValues() []QueueJobStatus
QueueJobStatusValues returns a list of the values for QueueJobStatus
func (QueueJobStatus) IsValid ¶ added in v0.7.0
func (x QueueJobStatus) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (QueueJobStatus) MarshalText ¶ added in v0.7.0
func (x QueueJobStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*QueueJobStatus) Scan ¶ added in v0.7.0
func (x *QueueJobStatus) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (QueueJobStatus) String ¶ added in v0.7.0
func (x QueueJobStatus) String() string
String implements the Stringer interface.
func (*QueueJobStatus) UnmarshalText ¶ added in v0.7.0
func (x *QueueJobStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Torrent ¶
type Torrent struct { InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` Name string `gorm:"column:name;not null" json:"name"` Size uint64 `gorm:"column:size;not null" json:"size"` Private bool `gorm:"column:private;not null" json:"private"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` FilesStatus FilesStatus `gorm:"column:files_status;not null" json:"filesStatus"` Extension NullString `gorm:"column:extension;<-:false" json:"extension"` Hint TorrentHint `gorm:"foreignKey:InfoHash" json:"hint"` Contents []TorrentContent `gorm:"foreignKey:InfoHash" json:"contents"` Sources []TorrentsTorrentSource `gorm:"foreignKey:InfoHash" json:"sources"` Files []TorrentFile `gorm:"foreignKey:InfoHash" json:"files"` Pieces TorrentPieces `gorm:"foreignKey:InfoHash" json:"-"` Tags []TorrentTag `gorm:"foreignKey:InfoHash" json:"tags"` }
Torrent mapped from table <torrents>
func (Torrent) FileExtensions ¶
func (Torrent) FileType ¶
func (t Torrent) FileType() NullFileType
func (Torrent) HasFileType ¶
func (Torrent) HasFilesInfo ¶
HasFilesInfo returns true if we know about the files in this torrent.
func (Torrent) Seeders ¶
Seeders returns the highest number of seeders from all sources todo: Add up bloom filters
func (Torrent) SingleFile ¶
func (Torrent) WantFilesInfo ¶ added in v0.0.3
type TorrentContent ¶
type TorrentContent struct { ID string `gorm:"column:id;primaryKey;<-:false" json:"id"` InfoHash protocol.ID `gorm:"column:info_hash;not null;<-:create" json:"infoHash"` ContentType NullContentType `gorm:"column:content_type" json:"contentType"` ContentSource NullString `gorm:"column:content_source" json:"contentSource"` ContentID NullString `gorm:"column:content_id" json:"contentId"` Languages Languages `gorm:"column:languages;serializer:json" json:"languages"` Episodes Episodes `gorm:"column:episodes;serializer:json" json:"episodes"` VideoResolution NullVideoResolution `gorm:"column:video_resolution" json:"videoResolution"` VideoSource NullVideoSource `gorm:"column:video_source" json:"videoSource"` VideoCodec NullVideoCodec `gorm:"column:video_codec" json:"videoCodec"` Video3d NullVideo3d `gorm:"column:video_3d" json:"video3D"` VideoModifier NullVideoModifier `gorm:"column:video_modifier" json:"videoModifier"` ReleaseGroup NullString `gorm:"column:release_group" json:"releaseGroup"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` Tsv fts.Tsvector `gorm:"column:tsv" json:"tsv"` Torrent Torrent `gorm:"foreignKey:InfoHash;references:InfoHash" json:"torrent"` Content Content `gorm:"foreignKey:ContentType,ContentSource,ContentID;references:Type,Source,ID" json:"content"` }
TorrentContent mapped from table <torrent_contents>
func (TorrentContent) ContentRef ¶ added in v0.5.0
func (tc TorrentContent) ContentRef() Maybe[ContentRef]
func (*TorrentContent) TableName ¶
func (*TorrentContent) TableName() string
TableName TorrentContent's table name
func (TorrentContent) Title ¶
func (tc TorrentContent) Title() string
func (*TorrentContent) UpdateTsv ¶ added in v0.5.0
func (tc *TorrentContent) UpdateTsv()
type TorrentFile ¶
type TorrentFile struct { InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` Index uint32 `gorm:"column:index;not null;<-:create" json:"index"` Path string `gorm:"column:path;primaryKey;<-:create" json:"path"` Extension NullString `gorm:"column:extension;<-:false" json:"extension"` Size uint64 `gorm:"column:size;not null" json:"size"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
TorrentFile mapped from table <torrent_files>
func (*TorrentFile) BeforeCreate ¶ added in v0.1.0
func (f *TorrentFile) BeforeCreate(tx *gorm.DB) (err error)
func (TorrentFile) FileType ¶
func (f TorrentFile) FileType() NullFileType
func (*TorrentFile) TableName ¶
func (*TorrentFile) TableName() string
TableName TorrentFile's table name
type TorrentHint ¶ added in v0.5.0
type TorrentHint struct { InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` ContentType ContentType `gorm:"column:content_type;not null" json:"contentType"` ContentSource NullString `gorm:"column:content_source" json:"contentSource"` ContentID NullString `gorm:"column:content_id" json:"contentId"` Title NullString `gorm:"column:title" json:"title"` ReleaseYear Year `gorm:"column:release_year" json:"releaseYear"` Languages Languages `gorm:"column:languages;serializer:json" json:"languages"` Episodes Episodes `gorm:"column:episodes;serializer:json" json:"episodes"` VideoResolution NullVideoResolution `gorm:"column:video_resolution" json:"videoResolution"` VideoSource NullVideoSource `gorm:"column:video_source" json:"videoSource"` VideoCodec NullVideoCodec `gorm:"column:video_codec" json:"videoCodec"` Video3d NullVideo3d `gorm:"column:video_3d" json:"video3D"` VideoModifier NullVideoModifier `gorm:"column:video_modifier" json:"videoModifier"` ReleaseGroup NullString `gorm:"column:release_group" json:"releaseGroup"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
TorrentHint mapped from table <torrent_hints>
func (*TorrentHint) BeforeCreate ¶ added in v0.5.0
func (f *TorrentHint) BeforeCreate(tx *gorm.DB) (err error)
func (TorrentHint) ContentRef ¶ added in v0.5.0
func (h TorrentHint) ContentRef() Maybe[ContentRef]
func (TorrentHint) IsNil ¶ added in v0.5.0
func (h TorrentHint) IsNil() bool
func (TorrentHint) NullContentType ¶ added in v0.5.0
func (h TorrentHint) NullContentType() NullContentType
func (*TorrentHint) TableName ¶ added in v0.5.0
func (*TorrentHint) TableName() string
TableName TorrentHint's table name
type TorrentPieces ¶ added in v0.7.1
type TorrentPieces struct { InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` PieceLength int64 `gorm:"column:piece_length;not null" json:"pieceLength"` Pieces []byte `gorm:"column:pieces;not null" json:"-"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` }
TorrentPieces mapped from table <torrent_pieces>
func (*TorrentPieces) BeforeCreate ¶ added in v0.7.1
func (f *TorrentPieces) BeforeCreate(tx *gorm.DB) (err error)
func (*TorrentPieces) TableName ¶ added in v0.7.1
func (*TorrentPieces) TableName() string
TableName TorrentPieces's table name
type TorrentSource ¶
type TorrentSource struct { Key string `gorm:"column:key;primaryKey;<-:create" json:"key"` Name string `gorm:"column:name;not null" json:"name"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
TorrentSource mapped from table <torrent_sources>
func (*TorrentSource) TableName ¶
func (*TorrentSource) TableName() string
TableName TorrentSource's table name
type TorrentTag ¶ added in v0.3.0
type TorrentTag struct { InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` Name string `gorm:"column:name;primaryKey;<-:create" json:"name"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` }
TorrentTag mapped from table <torrent_tags>
func (*TorrentTag) BeforeCreate ¶ added in v0.3.0
func (t *TorrentTag) BeforeCreate(*gorm.DB) error
func (*TorrentTag) TableName ¶ added in v0.3.0
func (*TorrentTag) TableName() string
TableName TorrentTag's table name
type TorrentsTorrentSource ¶
type TorrentsTorrentSource struct { Source string `gorm:"column:source;primaryKey;<-:create" json:"source"` InfoHash protocol.ID `gorm:"column:info_hash;primaryKey;<-:create" json:"infoHash"` ImportID NullString `gorm:"column:import_id" json:"importId"` Bfsd []byte `gorm:"column:bfsd" json:"bfsd"` Bfpe []byte `gorm:"column:bfpe" json:"bfpe"` Seeders NullUint `gorm:"column:seeders" json:"seeders"` Leechers NullUint `gorm:"column:leechers" json:"leechers"` PublishedAt time.Time `gorm:"column:published_at" json:"publishedAt"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updatedAt"` TorrentSource TorrentSource `gorm:"foreignKey:Source" json:"torrent_source"` }
TorrentsTorrentSource mapped from table <torrents_torrent_sources>
func (*TorrentsTorrentSource) TableName ¶
func (*TorrentsTorrentSource) TableName() string
TableName TorrentsTorrentSource's table name
type Video3d ¶
type Video3d string
Video3d represents the 3D type of a video ENUM(V3D, V3DSBS, V3DOU)
func ParseVideo3d ¶
ParseVideo3d attempts to convert a string to a Video3d.
func Video3dValues ¶
func Video3dValues() []Video3d
Video3dValues returns a list of the values for Video3d
func (Video3d) IsValid ¶
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Video3d) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Video3d) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type VideoCodec ¶
type VideoCodec string
VideoCodec represents the codec of a video ENUM(H264, x264, x265, XviD, DivX, MPEG2, MPEG4)
const ( VideoCodecH264 VideoCodec = "H264" VideoCodecX264 VideoCodec = "x264" VideoCodecX265 VideoCodec = "x265" VideoCodecXviD VideoCodec = "XviD" VideoCodecDivX VideoCodec = "DivX" VideoCodecMPEG2 VideoCodec = "MPEG2" VideoCodecMPEG4 VideoCodec = "MPEG4" )
func ParseVideoCodec ¶
func ParseVideoCodec(name string) (VideoCodec, error)
ParseVideoCodec attempts to convert a string to a VideoCodec.
func VideoCodecValues ¶
func VideoCodecValues() []VideoCodec
VideoCodecValues returns a list of the values for VideoCodec
func (VideoCodec) IsValid ¶
func (x VideoCodec) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (VideoCodec) Label ¶
func (v VideoCodec) Label() string
func (VideoCodec) MarshalText ¶
func (x VideoCodec) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*VideoCodec) Scan ¶
func (x *VideoCodec) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (VideoCodec) String ¶
func (x VideoCodec) String() string
String implements the Stringer interface.
func (*VideoCodec) UnmarshalText ¶
func (x *VideoCodec) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type VideoModifier ¶
type VideoModifier string
VideoModifier represents the modifier of a video ENUM(REGIONAL, SCREENER, RAWHD, BRDISK, REMUX)
const ( VideoModifierREGIONAL VideoModifier = "REGIONAL" VideoModifierSCREENER VideoModifier = "SCREENER" VideoModifierRAWHD VideoModifier = "RAWHD" VideoModifierBRDISK VideoModifier = "BRDISK" VideoModifierREMUX VideoModifier = "REMUX" )
func ParseVideoModifier ¶
func ParseVideoModifier(name string) (VideoModifier, error)
ParseVideoModifier attempts to convert a string to a VideoModifier.
func VideoModifierValues ¶
func VideoModifierValues() []VideoModifier
VideoModifierValues returns a list of the values for VideoModifier
func (VideoModifier) IsValid ¶
func (x VideoModifier) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (VideoModifier) Label ¶
func (v VideoModifier) Label() string
func (VideoModifier) MarshalText ¶
func (x VideoModifier) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*VideoModifier) Scan ¶
func (x *VideoModifier) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (VideoModifier) String ¶
func (x VideoModifier) String() string
String implements the Stringer interface.
func (*VideoModifier) UnmarshalText ¶
func (x *VideoModifier) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type VideoResolution ¶
type VideoResolution string
VideoResolution represents the resolution of a video ENUM(V360p, V480p, V540p, V576p, V720p, V1080p, V1440p, V2160p, V4320p)
const ( VideoResolutionV360p VideoResolution = "V360p" VideoResolutionV480p VideoResolution = "V480p" VideoResolutionV540p VideoResolution = "V540p" VideoResolutionV576p VideoResolution = "V576p" VideoResolutionV720p VideoResolution = "V720p" VideoResolutionV1080p VideoResolution = "V1080p" VideoResolutionV1440p VideoResolution = "V1440p" VideoResolutionV2160p VideoResolution = "V2160p" VideoResolutionV4320p VideoResolution = "V4320p" )
func ParseVideoResolution ¶
func ParseVideoResolution(name string) (VideoResolution, error)
ParseVideoResolution attempts to convert a string to a VideoResolution.
func VideoResolutionValues ¶
func VideoResolutionValues() []VideoResolution
VideoResolutionValues returns a list of the values for VideoResolution
func (VideoResolution) IsValid ¶
func (x VideoResolution) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (VideoResolution) Label ¶
func (v VideoResolution) Label() string
func (VideoResolution) MarshalText ¶
func (x VideoResolution) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*VideoResolution) Scan ¶
func (x *VideoResolution) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (VideoResolution) String ¶
func (x VideoResolution) String() string
String implements the Stringer interface.
func (*VideoResolution) UnmarshalText ¶
func (x *VideoResolution) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type VideoSource ¶
type VideoSource string
VideoSource represents the source of a video ENUM(CAM, TELESYNC, TELECINE, WORKPRINT, DVD, TV, WEBDL, WEBRip, BluRay)
const ( VideoSourceCAM VideoSource = "CAM" VideoSourceTELESYNC VideoSource = "TELESYNC" VideoSourceTELECINE VideoSource = "TELECINE" VideoSourceWORKPRINT VideoSource = "WORKPRINT" VideoSourceDVD VideoSource = "DVD" VideoSourceTV VideoSource = "TV" VideoSourceWEBDL VideoSource = "WEBDL" VideoSourceWEBRip VideoSource = "WEBRip" VideoSourceBluRay VideoSource = "BluRay" )
func ParseVideoSource ¶
func ParseVideoSource(name string) (VideoSource, error)
ParseVideoSource attempts to convert a string to a VideoSource.
func VideoSourceValues ¶
func VideoSourceValues() []VideoSource
VideoSourceValues returns a list of the values for VideoSource
func (VideoSource) IsValid ¶
func (x VideoSource) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (VideoSource) Label ¶
func (v VideoSource) Label() string
func (VideoSource) MarshalText ¶
func (x VideoSource) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*VideoSource) Scan ¶
func (x *VideoSource) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (VideoSource) String ¶
func (x VideoSource) String() string
String implements the Stringer interface.
func (*VideoSource) UnmarshalText ¶
func (x *VideoSource) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Year ¶
type Year uint16
func (Year) GormDataType ¶ added in v0.5.0
func (Year) MarshalGQL ¶
func (*Year) UnmarshalGQL ¶
Source Files ¶
- bloom_filters.gen.go
- content.gen.go
- content.go
- content_attributes.gen.go
- content_collections.gen.go
- content_collections.go
- content_collections_content.gen.go
- content_type.go
- content_type_enum.go
- date.go
- daterange.go
- duration.go
- enums.go
- episodes.go
- episodes_parser.go
- facet_logic.go
- facet_logic_enum.go
- file_type.go
- file_type_enum.go
- files_status.go
- files_status_enum.go
- key_values.gen.go
- language.go
- maybe.go
- metadata_sources.gen.go
- null.go
- queue_job_status.go
- queue_job_status_enum.go
- queue_jobs.gen.go
- queue_jobs.go
- torrent_contents.gen.go
- torrent_contents.go
- torrent_files.gen.go
- torrent_files.go
- torrent_hints.gen.go
- torrent_hints.go
- torrent_pieces.gen.go
- torrent_pieces.go
- torrent_sources.gen.go
- torrent_tags.gen.go
- torrent_tags.go
- torrents.gen.go
- torrents.go
- torrents_torrent_sources.gen.go
- video_3d.go
- video_3d_enum.go
- video_codec.go
- video_codec_enum.go
- video_modifier.go
- video_modifier_enum.go
- video_resolution.go
- video_resolution_enum.go
- video_source.go
- video_source_enum.go
- year.go