Documentation ¶
Index ¶
- Constants
- func ConnectDataBase(c DBConfig) *gorm.DB
- func Translatename(filename string, regexes map[string]string) string
- func Trash(f string, trash string) (trashcan string, err error)
- type Cast
- type Credits
- type Crew
- type DBConfig
- type File
- type Fulltext
- type Genres
- type HTTPClients
- type Movie
- func (m *Movie) AfterCreate(scope *gorm.Scope) (err error)
- func (m *Movie) AfterDelete(scope *gorm.Scope) (err error)
- func (m *Movie) AfterUpdate(scope *gorm.Scope) (err error)
- func (m *Movie) DeleteMeta(db *gorm.DB, movie *Movie) (err error)
- func (m *Movie) FullTextIndex(tx *gorm.DB) error
- func (m *Movie) GetCredits() string
- func (m *Movie) GetMeta(t TMDBClients) (err error)
- func (m *Movie) MetaByID(t TMDBClients, wp *workerpool.WorkerPool, metaid int) error
- type MovieSearchResults
- type MovieShort
- type ProductionCompanies
- type ProductionCountries
- type Recently
- type SpokenLanguages
- type TMDBClients
- type TMDBMovie
- type Token
- type User
- type Watchlist
Constants ¶
View Source
const (
//DEFLANG = "de-DE"
WATCHLIST = "watchlist"
)
Variables ¶
This section is empty.
Functions ¶
func ConnectDataBase ¶
Types ¶
type Cast ¶
type Cast struct { //ID int64 `gorm:"primary_key"` //TMDBMovieMovieID uint `gorm:"index"` //CreditsID uint `gorm:"index"` //CastID int `json:"cast_id"` PersonID int `json:"ID" gorm:"index"` ID string `json:"credit_id" gorm:"index"` Character string Name string XGender int `json:"gender"` Order int ProfilePath string `json:"profile_path"` }
type Crew ¶
type Crew struct { //ID int64 `gorm:"primary_key"` //TMDBMovieMovieID uint `gorm:"index"` //CreditsID uint `gorm:"index"` PersonID int `json:"ID" gorm:"index"` ID string `json:"credit_id" gorm:"index"` Department string Gender int `json:"gender"` // ID int Job string Name string ProfilePath string `json:"profile_path"` }
type File ¶
type File struct { gorm.Model FullPath string `json:"FullPath" gorm:"Type:text;UNIQUE;index"` FileName string `json:"FileName"` }
func (*File) BeforeSave ¶
type HTTPClients ¶
var (
HttpClient HTTPClients
)
type Movie ¶
type Movie struct { ID int64 `json:"id" gorm:"primary_key"` CreatedAt time.Time `sql:"index"` UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` FileID uint `json:"file_id"` TMDBMovieID uint `sql:"index"` MovieSearchResultsID uint Title string `json:"title" binding:"required"` OrgName string `json:"org_name"` Meta *TMDBMovie `json:"meta" gorm:"foreignkey:TMDBMovieID"` Multiplechoice *MovieSearchResults `json:"multiplechoice" gorm:"foreignkey:MovieSearchResultsID"` File File `json:"File" binding:"required"` IsTv bool `json:"is_tv" gorm:"index"` Rating int `json:"rating"` Watchlist bool `json:"watchlist" gorm:"-"` LastScanned time.Time Deleted bool `gorm:"-"` }
func (*Movie) GetCredits ¶
func (*Movie) GetMeta ¶
func (m *Movie) GetMeta(t TMDBClients) (err error)
func (*Movie) MetaByID ¶
func (m *Movie) MetaByID(t TMDBClients, wp *workerpool.WorkerPool, metaid int) error
type MovieSearchResults ¶
type MovieSearchResults struct { ID int `gorm:"AUTO_INCREMENT"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time DeletedAt *time.Time `gorm:"index"` Page int Results []MovieShort `json:"Results" gorm:"many2many:movie_search_results_movie_short"` TotalPages int `json:"total_pages"` TotalResults int `json:"total_results"` }
type MovieShort ¶
type MovieShort struct { gorm.Model MovieSearchResultsID uint Adult bool `json:"adult"` BackdropPath string `json:"backdrop_path"` //ID int `json:"id"` OriginalTitle string `json:"original_title"` //GenreIDs []int32 `json:"genre_ids"` Popularity float32 `json:"popularity"` PosterPath string `json:"poster_path"` ReleaseDate string `json:"release_date"` Title string `json:"title"` Overview string `json:"overview"` Video bool `json:"video"` VoteAverage float32 `json:"vote_average"` VoteCount uint32 `json:"vote_count"` }
type ProductionCompanies ¶
type ProductionCountries ¶
type SpokenLanguages ¶
type TMDBClients ¶
type TMDBMovie ¶
type TMDBMovie struct { ID int `gorm:"AUTO_INCREMENT"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time DeletedAt *time.Time `gorm:"index"` //TMDBMovieID int `json:"ID"` Adult bool //MovieID int64 `gorm:"primary_key" json:"id"` BackdropPath string `json:"backdrop_path"` // BelongsToCollection bool `json:"belongs_to_collection"` //BelongsToCollection CollectionShort `json:"belongs_to_collection"` Budget uint32 Genres []Genres `json:"Genres" gorm:"many2many:tmdb_movie_genres"` Homepage string //ID int ImdbID string `json:"imdb_id"` OriginalLanguage string `json:"original_language"` OriginalTitle string `json:"original_title"` Overview string Popularity float32 PosterPath string `json:"poster_path"` ProductionCompanies []ProductionCompanies `json:"production_companies" gorm:"many2many:tmdb_movie_production_companies"` ProductionCountries []ProductionCountries `json:"production_countries" gorm:"many2many:tmdb_movie_production_countries"` ReleaseDate string `json:"release_date"` Revenue uint32 Runtime uint32 SpokenLanguages []SpokenLanguages `json:"spoken_languages" gorm:"many2many:tmdb_movie_spoken_languages"` Status string Tagline string Title string Video bool VoteAverage float32 `json:"vote_average"` VoteCount uint32 `json:"vote_count"` // AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"` Credits Credits `json:",omitempty"` }
type Token ¶
type Token struct { UserID int64 Name string IsAdmin bool *jwt.StandardClaims }
Token struct declaration
Click to show internal directories.
Click to hide internal directories.