postgres

package
v0.0.0-...-46d964f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package postgres implements a postgres storageapi interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a postgres client

func NewClient

func NewClient() (*Client, error)

NewClient returns a new storageapi compatible database provider

func (*Client) FindEpisodeID

func (c *Client) FindEpisodeID(mediaID string, episode, season int) (string, error)

FindEpisodeID returns an episode id from episode and season.

func (*Client) GetEpisodeByID

func (c *Client) GetEpisodeByID(s *providerapi.Series, episodeID string) (providerapi.Episode, error)

GetEpisodeByID returns an episode by ID

func (*Client) GetSeriesByID

func (c *Client) GetSeriesByID(mediaID string) (providerapi.Series, error)

GetSeriesByID returns a series by ID

func (*Client) NewEpisodeFile

func (c *Client) NewEpisodeFile(e *providerapi.Episode, key, quality string) (string, error)

NewEpisodeFile adds a new episode file

func (*Client) NewEpisodeImage

func (c *Client) NewEpisodeImage(e *providerapi.Episode, i *providerapi.Image) (string, error)

NewEpisodeImage adds a new episode image and returns the image ID

func (*Client) NewEpisodes

func (c *Client) NewEpisodes(s *providerapi.Series, eps []providerapi.Episode) error

NewEpisodes inserts a new episodes

func (*Client) NewImage

func (c *Client) NewImage(s *providerapi.Series, i *providerapi.Image) (string, error)

NewImage adds a new image and returns the image ID

func (*Client) NewSeries

func (c *Client) NewSeries(s *providerapi.Series) error

NewSeries creates a new series

func (*Client) NewSubtitle

func (c *Client) NewSubtitle(s *providerapi.Series, e *providerapi.Episode, sub *osdb.Subtitle) (string, string, error)

NewSubtitle creates a new subtitle returns subtitle id and key TODO(jaredallard): create providerapi.Subtitle

Directories

Path Synopsis
CODE GENERATED BY GO-EMBED.
CODE GENERATED BY GO-EMBED.

Jump to

Keyboard shortcuts

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