types

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEpisodic

type AddEpisodic struct {
	Title string `json:"title"`
	Year  int    `json:"year"`

	Integration   string `json:"integration,omitempty"`
	FilesystemID  string `json:"filesystem,omitempty"`
	Path          string `json:"path,omitempty"`
	IntegrationID string `json:"integration_id,omitempty"`
}

func (AddEpisodic) Convert

func (a AddEpisodic) Convert() (*Episodic, error)

type AddFilesystem

type AddFilesystem struct {
	Check bool   `json:"check,omitempty"`
	Path  string `json:"path"`
	Title string `json:"title"`
}

func (*AddFilesystem) Convert

func (f *AddFilesystem) Convert() (*Filesystem, error)

type AddIntegration

type AddIntegration struct {
	Key   string `json:"key"`
	Model string `json:"model"`
	Title string `json:"title"`
	Type  string `json:"type"`
}

func (*AddIntegration) Convert

func (i *AddIntegration) Convert() (*Integration, error)

type Album

type Album struct {
	Base
	SubCollection

	Title string `json:"title" db:"title"`
}

type Artistic

type Artistic struct {
	Base
	Collection

	Name          string `json:"name" db:"name"`
	OriginCountry string `json:"origin_country" db:"origin_country"`
}

type Base

type Base struct {
	ID string `json:"id" db:"id"`

	DateAdded   time.Time `json:"date_added" db:"date_added"`
	DateUpdated time.Time `json:"date_updated" db:"date_updated"`
}

Base contains shared details across the full collection spectrum.

type Collection

type Collection struct {
	IntegrationID string `json:"integration_id" db:"integration_id"`

	FilesystemID string `json:"filesystem_id" db:"filesystem_id"`
	Path         string `json:"path" db:"path"`

	LastChecked time.Time `json:"last_checked" db:"last_checked"`
	AutoUpdate  bool      `json:"auto_update" db:"auto_update"`
}

Collection contains shared attributes across each main collection type.

type Episode

type Episode struct {
	Base
	SubCollection

	EpisodicID string `json:"episodic_id" db:"episodic_id"`
	Title      string `json:"title" db:"title"`

	SeasonID      int `json:"season_id" db:"season_id"`
	EpisodeNumber int `json:"episode_number" db:"episode_number"`

	IsWatched   bool      `json:"is_watched" db:"is_watched"`
	DateWatched time.Time `json:"date_watched" db:"date_watched"`

	Overview string `json:"overview" db:"overview"`
}

func (*Episode) Named

func (e *Episode) Named() map[string]any

type Episodic

type Episodic struct {
	Base
	Collection

	Title string `json:"title" db:"title"`
	Year  int    `json:"year" db:"year"`

	IsActive   bool   `json:"is_active" db:"is_active"`
	Genre      string `json:"genre" db:"genre"`
	PublicDBID string `json:"public_db_id" db:"public_db_id"`

	Episodes []*Episode `json:"episodes" db:"-"`
}

func (*Episodic) Named

func (e *Episodic) Named() map[string]any

func (*Episodic) ProvisionEpisode

func (e *Episodic) ProvisionEpisode(f *File) ([]*Episode, error)

func (*Episodic) ProvisionFromTVMaze

func (e *Episodic) ProvisionFromTVMaze(s tvmaze.Episode) (*Episode, error)

type EpisodicAssociateIntegration

type EpisodicAssociateIntegration struct {
	ExternalID string `json:"external"`
}

type File

type File struct {
	Type string
	Path string
	// contains filtered or unexported fields
}

func TokeniseEpisodical

func TokeniseEpisodical(s string) (*File, error)

func (*File) FoundCount added in v0.0.7

func (f *File) FoundCount() int

func (*File) GetToken

func (f *File) GetToken(idx int, n string) (any, error)

type Filesystem

type Filesystem struct {
	ID          string    `json:"id"`
	Title       string    `json:"title"`
	BasePath    string    `json:"base_path"`
	AutoUpdate  bool      `json:"auto_update"`
	LastChecked time.Time `json:"last_checked"`
}

func (*Filesystem) Named

func (f *Filesystem) Named() map[string]any

type Integration

type Integration struct {
	ID             string `json:"id"`
	Title          string `json:"title"`
	AccessKey      string `json:"access_key"`
	BaseModel      string `json:"base_model"`
	CollectionType string `json:"collection_type"`
}

func (*Integration) Named

func (i *Integration) Named() map[string]any

type Song

type Song struct {
	Base
	SubCollection

	Name string `json:"name" db:"name"`

	AlbumID       string `json:"album_id" db:"album_id"`
	AlbumPosition int    `json:"album_position" db:"album_position"`

	SongLength string `json:"song_length" db:"song_length"`
}

type SubCollection

type SubCollection struct {
	FileEntry             string `json:"file_entry" db:"file_entry"`
	IntegrationIdentifier string `json:"integration_identifier" db:"integration_identifier"`

	DateReleased time.Time `json:"date_released" db:"date_released"`
}

SubCollection contains shared attributes across the sub-types within a collection.

Jump to

Keyboard shortcuts

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