search

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const MEDIA_PAGE_SIZE = 25
View Source
const RELEASE_PAGE_SIZE = 25
View Source
const RUNIC_PAGE_SIZE = 25

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Production bool
	Code       int
	Version    string

	Release      *ReleaseService
	ReleaseIndex string
	Media        *MediaService
	MediaIndex   string
	Runic        *RunicService
	RunicIndex   string
	// contains filtered or unexported fields
}

func New

func New(url string, production bool) (*Client, error)

func (*Client) IndexMedia

func (c *Client) IndexMedia(m *Media) (*elastic.IndexResponse, error)

func (*Client) IndexRelease

func (c *Client) IndexRelease(r *Release) (*elastic.IndexResponse, error)

func (*Client) IndexRunic

func (c *Client) IndexRunic(r *runic.Release) (*elastic.IndexResponse, error)

type Media

type Media struct {
	ID          string    `json:"id"`
	Type        string    `json:"type"`
	Name        string    `json:"name,omitempty"`
	Kind        string    `json:"kind"`
	Source      string    `json:"source,omitempty"`
	SourceID    string    `json:"source_id,omitempty"`
	SearchName  string    `json:"search_name,omitempty"`
	Display     string    `json:"display,omitempty"`
	Title       string    `json:"title,omitempty"`
	Description string    `json:"description,omitempty"`
	Link        string    `json:"link,omitempty"`
	ReleaseDate string    `json:"release_date,omitempty"`
	Background  string    `json:"background,omitempty"`
	Cover       string    `json:"cover,omitempty"`
	Created     time.Time `json:"created_at,omitempty"`
	Updated     time.Time `json:"updated_at,omitempty"`
}

type MediaSearch

type MediaSearch struct {
	//ID      string `json:"id"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Display  string `json:"display"`
	Title    string `json:"title"`
	Source   string `json:"source"`
	SourceID string `json:"source_id"`

	*Search
	// contains filtered or unexported fields
}

func (*MediaSearch) Find

func (s *MediaSearch) Find() (*MediaSearchResponse, error)

func (*MediaSearch) IsZero

func (s *MediaSearch) IsZero() bool

func (*MediaSearch) Query

func (s *MediaSearch) Query() (*elastic.QueryStringQuery, string)

type MediaSearchResponse

type MediaSearchResponse struct {
	*SearchResponse
	Media []*Media
}

type MediaService

type MediaService struct {
	Service
}

func (*MediaService) NewSearch

func (s *MediaService) NewSearch() *MediaSearch

type Release

type Release struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Year        int       `json:"year"`
	Display     string    `json:"display"`
	Raw         string    `json:"raw"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Season      int       `json:"season"`
	Episode     int       `json:"episode"`
	Volume      int       `json:"volume"`
	Size        string    `json:"size"`
	Encoding    string    `json:"encoding"`
	Resolution  string    `json:"resolution"`
	Quality     string    `json:"quality"`
	Group       string    `json:"group"`
	Author      string    `json:"author"`
	GroupAuthor string    `json:"groupauthor"`
	Verified    bool      `json:"verified"`
	Bluray      bool      `json:"bluray"`
	NZB         bool      `json:"nzb"`
	Uncensored  bool      `json:"uncensored"`
	Checksum    string    `json:"checksum"`
	View        string    `json:"view"`
	Download    string    `json:"download"`
	Source      string    `json:"source"`
	Type        string    `json:"type"`
	Created     time.Time `json:"created_at"`
	Published   time.Time `json:"published_at"`
}

type ReleaseSearch

type ReleaseSearch struct {
	Source     string `json:"source"`
	Type       string `json:"type"`
	Name       string `json:"name"`
	Year       int    `json:"year"`
	Author     string `json:"author"`
	Group      string `json:"group"`
	Season     int    `json:"season"`
	Episode    int    `json:"episode"`
	Resolution int    `json:"resolution"`
	Verified   bool   `json:"verified"`
	Uncensored bool   `json:"uncensored"`
	Bluray     bool   `json:"bluray"`
	NZB        bool   `json:"nzb"`
	Exact      bool

	*Search
	// contains filtered or unexported fields
}

func (*ReleaseSearch) Find

func (*ReleaseSearch) IsZero

func (s *ReleaseSearch) IsZero() bool

func (*ReleaseSearch) Query

func (s *ReleaseSearch) Query() (*elastic.QueryStringQuery, string)

type ReleaseSearchResponse

type ReleaseSearchResponse struct {
	*SearchResponse
	Releases []*Release
}

type ReleaseService

type ReleaseService struct {
	Service
}

func (*ReleaseService) NewSearch

func (s *ReleaseService) NewSearch() *ReleaseSearch

type RunicSearch

type RunicSearch struct {
	Type        string `bson:"type" json:"type"`
	Source      string `bson:"source" json:"source"`
	Title       string `bson:"title" json:"title"`
	Year        int    `bson:"year" json:"year"`
	Description string `bson:"description" json:"description"`
	Size        int64  `bson:"size" json:"size"`
	View        string `bson:"view" json:"view"`
	Download    string `bson:"download" json:"download"`
	Infohash    string `bson:"infohash" json:"infohash"`
	Season      int    `bson:"season" json:"season"`
	Episode     int    `bson:"episode" json:"episode"`
	Volume      int    `bson:"volume" json:"volume"`
	Group       string `bson:"group" json:"group"`
	Website     string `bson:"website" json:"website"`
	Verified    bool   `bson:"verified" json:"verified"`
	Widescreen  bool   `bson:"widescreen" json:"widescreen"`
	Unrated     bool   `bson:"unrated" json:"unrated"`
	Uncensored  bool   `bson:"uncensored" json:"uncensored"`
	Bluray      bool   `bson:"bluray" json:"bluray"`
	ThreeD      bool   `bson:"threeD" json:"threeD"`
	Resolution  int    `bson:"resolution" json:"resolution"`
	Encodings   string `bson:"encoding" json:"encoding"`
	Quality     string `bson:"quality" json:"quality"`
	Downloader  string `bson:"downloader" json:"downloader"`
	Checksum    string `bson:"checksum" json:"checksum"`
	Exact       bool

	*Search
	// contains filtered or unexported fields
}

func (*RunicSearch) Find

func (s *RunicSearch) Find() (*RunicSearchResponse, error)

func (*RunicSearch) IsZero

func (s *RunicSearch) IsZero() bool

func (*RunicSearch) Query

func (s *RunicSearch) Query() (*elastic.QueryStringQuery, string)

type RunicSearchResponse

type RunicSearchResponse struct {
	*SearchResponse
	Releases []*runic.Release
}

type RunicService

type RunicService struct {
	Service
}

func (*RunicService) NewSearch

func (s *RunicService) NewSearch() *RunicSearch
type Search struct {
	Start int
	Limit int
	Index string
}

type SearchResponse

type SearchResponse struct {
	Search string
	Total  int64
	Count  int
}

type Service

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

Jump to

Keyboard shortcuts

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