manifest

package
v0.0.0-...-618419c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BehaviorHints

type BehaviorHints struct {
	Adult                 bool `json:"adult,omitempty"`
	P2P                   bool `json:"p2p,omitempty"`
	Configurable          bool `json:"configurable,omitempty"`
	ConfigurationRequired bool `json:"configurationRequired,omitempty"`
}

type Catalog

type Catalog struct {
	Type  MediaType `json:"type"`
	ID    string    `json:"id"`
	Name  string    `json:"name"`
	Extra []Extra   `json:"extra,omitempty"`
}

type CatalogResponse

type CatalogResponse struct {
	Metas []Meta `json:"metas"`
}

type Config

type Config struct {
	Key      string   `json:"key"`
	Type     string   `json:"type"`
	Default  string   `json:"default,omitempty"`
	Title    string   `json:"title,omitempty"`
	Options  []string `json:"options,omitempty"`
	Required bool     `json:"required,omitempty"`
}

type Extra

type Extra struct {
	Name         string   `json:"name"`
	IsRequired   bool     `json:"isRequired,omitempty"`
	Options      []string `json:"options,omitempty"`
	OptionsLimit int      `json:"optionsLimit,omitempty"`
}

type Manifest

type Manifest struct {
	ID            string         `json:"id"`
	Name          string         `json:"name"`
	Description   string         `json:"description"`
	Version       string         `json:"version"`
	Resources     []interface{}  `json:"resources"`
	Types         []MediaType    `json:"types"`
	Catalogs      []Catalog      `json:"catalogs"`
	IDPrefixes    []string       `json:"idPrefixes,omitempty"`
	AddonCatalogs []Catalog      `json:"addonCatalogs,omitempty"`
	Config        []Config       `json:"config,omitempty"`
	Background    string         `json:"background,omitempty"`
	ContactEmail  string         `json:"contactEmail,omitempty"`
	BehaviorHints *BehaviorHints `json:"behaviorHints,omitempty"`
}

func New

func New(options ...ManifestOption) *Manifest

type ManifestOption

type ManifestOption func(*Manifest)

func IsAdult

func IsAdult() ManifestOption

func IsConfigurable

func IsConfigurable() ManifestOption

func IsP2P

func IsP2P() ManifestOption

func RequiresConfiguration

func RequiresConfiguration() ManifestOption

func WithBackground

func WithBackground(background string) ManifestOption

func WithBehaviorHints

func WithBehaviorHints(behaviorHints *BehaviorHints) ManifestOption

func WithContactEmail

func WithContactEmail(contactEmail string) ManifestOption

func WithDescription

func WithDescription(description string) ManifestOption

func WithID

func WithID(id string) ManifestOption
func WithLogo(logo string) ManifestOption

func WithName

func WithName(name string) ManifestOption

func WithResources

func WithResources(resources []interface{}) ManifestOption

func WithVersion

func WithVersion(version string) ManifestOption

type MediaType

type MediaType string
const (
	Movie   MediaType = "movie"
	Series  MediaType = "series"
	Channel MediaType = "channel"
	Tv      MediaType = "tv"
)

type Meta

type Meta struct {
	MediaType MediaType `json:"type"`
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Poster    string    `json:"poster,omitempty"`
	Genres    []string  `json:"genres,omitempty"`
}

type Resource

type Resource struct {
	Name       string      `json:"name"`
	Types      []MediaType `json:"types,omitempty"`
	IDPrefixes []string    `json:"idPrefixes,omitempty"`
}

Jump to

Keyboard shortcuts

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