models

package
v0.0.0-...-8f55857 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Id        int64  `json:"id"`
	Status    string `json:"status"`
	Progress  string `json:"progress"`
	CreatedAt int64  `json:"createdAt"`
	Media     Manga  `json:"media"`
}

type AnilistData

type AnilistData struct {
	Page Page `json:"Page"`
}

type AnilistResponse

type AnilistResponse struct {
	Data AnilistData `json:"data"`
}

type ComboDBMediaItem

type ComboDBMediaItem struct {
	ID              uint                `json:"id" db:"id"`
	OccuredAt       int64               `json:"occurred_at" db:"created_at"`
	Title           string              `json:"title" db:"title"`
	Subtitle        string              `json:"subtitle" db:"subtitle"`
	Category        string              `json:"category" db:"category"`
	IsActive        bool                `json:"is_active" db:"is_active"`
	Elapsed         int                 `json:"elapsed_ms" db:"-"`
	Duration        int                 `json:"duration_ms" db:"duration_ms"`
	Source          string              `json:"source" db:"source"`
	Image           string              `json:"image" db:"image"`
	DominantColours SerializableColours `json:"dominant_colours" db:"dominant_colours"`
	Backfilled      bool                `json:"-" db:"-"`
}

Used in V4 but not renamed until V3 is deprecated

type Director

type Director struct {
	Name string `json:"tag"`
}

type Manga

type Manga struct {
	Id         int64      `json:"id"`
	Title      MangaTitle `json:"title"`
	Chapters   int        `json:"chapters"`
	CoverImage MangaCover `json:"coverImage"`
}

type MangaCover

type MangaCover struct {
	ExtraLarge string `json:"extraLarge"`
}

type MangaTitle

type MangaTitle struct {
	UserPreferred string `json:"userPreferred"`
}

type MediaContainer

type MediaContainer struct {
	Size     int        `json:"size"`
	Metadata []Metadata `json:"Metadata"`
}

type MediaItem

type MediaItem struct {
	CreatedAt       int64               `json:"-"`
	Title           string              `json:"title"`
	Subtitle        string              `json:"subtitle"`
	Category        string              `json:"category"`
	IsActive        bool                `json:"is_active"`
	Elapsed         int                 `json:"elapsed_ms"`
	Duration        int                 `json:"duration_ms"`
	Source          string              `json:"source"`
	Image           string              `json:"image"`
	DominantColours SerializableColours `json:"dominant_colours"`
	Backfilled      bool                `json:"-"`
}

func (MediaItem) Hash

func (m MediaItem) Hash() string

type Metadata

type Metadata struct {
	Attribution      string     `json:"attribution"`
	Duration         int        `json:"duration"`
	GrandparentTitle string     `json:"grandparentTitle"`
	Thumb            string     `json:"thumb"`
	ParentThumb      string     `json:"parentThumb"`
	Index            int        `json:"index"`
	ParentIndex      int        `json:"parentIndex"`
	Title            string     `json:"title"`
	Type             string     `json:"type"`
	ViewOffset       int        `json:"viewOffset"`
	Director         []Director `json:"Director"`
	Player           Player     `json:"Player"`
	User             User       `json:"User"`
}

type NowPlayingResponse

type NowPlayingResponse struct {
	ExpiresAt      string       `json:"expires_at"`
	StartedAt      string       `json:"started_at"`
	Action         string       `json:"action"`
	Type           string       `json:"type"`
	Movie          TraktSummary `json:"movie"`
	Episode        TraktEpisode `json:"episode"`
	Show           TraktSummary `json:"show"`
	PodcastEpisode TraktEpisode `json:"podcast_episode"`
	Podcast        TraktSummary `json:"podcast"`
}

type Page

type Page struct {
	Activities []Activity `json:"activities"`
}

type Player

type Player struct {
	State string `json:"state"`
}

type PlexResponse

type PlexResponse struct {
	MediaContainer MediaContainer `json:"MediaContainer"`
}

type ResponseMediaItem

type ResponseMediaItem struct {
	OccuredAt       string              `json:"occurred_at"`
	Title           string              `json:"title"`
	Subtitle        string              `json:"subtitle"`
	Category        string              `json:"category"`
	Source          string              `json:"source"`
	Image           string              `json:"image"`
	Duration        int                 `json:"duration_ms"`
	DominantColours SerializableColours `json:"dominant_colours"`
}

type SerializableColours

type SerializableColours []string

SerializableColours is a custom DB extension type that stores a string slice as a comma separate value in the database Example input: []string{"#020304", "#6581be"} Example DB value: #020304,#6581be

func (*SerializableColours) Scan

func (s *SerializableColours) Scan(src interface{}) error

func (SerializableColours) Value

func (s SerializableColours) Value() (driver.Value, error)

type SteamAppDetail

type SteamAppDetail struct {
	Type        string   `json:"type"`
	Name        string   `json:"name"`
	HeaderImage string   `json:"header_image"`
	Developers  []string `json:"developers"`
}

type SteamAppResponse

type SteamAppResponse struct {
	Data SteamAppDetail `json:"data"`
}

type SteamPlayerSummary

type SteamPlayerSummary struct {
	Response SteamResponse `json:"response"`
}

type SteamResponse

type SteamResponse struct {
	Players []SteamUser `json:"players"`
}

type SteamUser

type SteamUser struct {
	GameID       string `json:"gameid"`
	PersonaState int    `json:"personastate"`
}

type TMDBImage

type TMDBImage struct {
	FilePath string `json:"file_path"`
}

type TMDBImageResponse

type TMDBImageResponse struct {
	ID      int         `json:"id"`
	Stills  []TMDBImage `json:"stills"`
	Posters []TMDBImage `json:"posters"`
}

type TraktEpisode

type TraktEpisode struct {
	Season        int      `json:"season"`
	Number        int      `json:"number"`
	Title         string   `json:"title"`
	IDs           TraktIDs `json:"ids"`
	Overview      string   `json:"overview"`
	OverviewPlain string   `json:"overview_plain"`
	Explicit      bool     `json:"explicit"`
	Runtime       int      `json:"runtime"`
}

type TraktIDs

type TraktIDs struct {
	Trakt int    `json:"trakt"`
	Slug  string `json:"slug"`
	TVDB  int    `json:"tvdb"`
	IMDB  string `json:"imdb"`
	TMDB  int    `json:"tmdb"`
	Apple int    `json:"apple"`
}

type TraktSummary

type TraktSummary struct {
	Title         string   `json:"title"`
	Year          int      `json:"year"`
	IDs           TraktIDs `json:"ids"`
	Overview      string   `json:"overview"`
	OverviewPlain string   `json:"overview_plain"`
	Author        string   `json:"author"`
	Homepage      string   `json:"homepage"`
}

type User

type User struct {
	Id string `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL