dtos

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Jackett      JackettConfig      `yaml:"jackett"`
	Transmission TransmissionConfig `yaml:"transmission"`
	App          struct {
		LogRetentionDays     int `yaml:"log_retention_days"`
		TrackerRetentionDays int `yaml:"tracker_retention_days"`
	} `yaml:"app"`
}

type InternalConfig

type InternalConfig struct {
	DB struct {
		Dsn         string
		Automigrate bool
	}
}

type JackettConfig

type JackettConfig struct {
	Sources []JackettSource `yaml:"sources"`
}

type JackettRss

type JackettRss struct {
	XMLName xml.Name `xml:"rss"`
	Text    string   `xml:",chardata"`
	Version string   `xml:"version,attr"`
	Atom    string   `xml:"atom,attr"`
	Torznab string   `xml:"torznab,attr"`
	Channel struct {
		Text string `xml:",chardata"`
		Link struct {
			Text string `xml:",chardata"`
			Href string `xml:"href,attr"`
			Rel  string `xml:"rel,attr"`
			Type string `xml:"type,attr"`
		} `xml:"link"`
		Title       string `xml:"title"`
		Description string `xml:"description"`
		Language    string `xml:"language"`
		Category    string `xml:"category"`
		Item        []struct {
			Text           string `xml:",chardata"`
			Title          string `xml:"title"`
			Guid           string `xml:"guid"`
			Jackettindexer struct {
				Text string `xml:",chardata"`
				ID   string `xml:"id,attr"`
			} `xml:"jackettindexer"`
			Type        string   `xml:"type"`
			Comments    string   `xml:"comments"`
			PubDate     string   `xml:"pubDate"`
			Size        string   `xml:"size"`
			Description string   `xml:"description"`
			Link        *string  `xml:"link"`
			Category    []string `xml:"category"`
			Enclosure   struct {
				Text   string `xml:",chardata"`
				URL    string `xml:"url,attr"`
				Length string `xml:"length,attr"`
				Type   string `xml:"type,attr"`
			} `xml:"enclosure"`
			Attr []struct {
				Text  string `xml:",chardata"`
				Name  string `xml:"name,attr"`
				Value string `xml:"value,attr"`
			} `xml:"attr"`
		} `xml:"item"`
	} `xml:"channel"`
}

type JackettSource

type JackettSource struct {
	RssUrl       string   `yaml:"rss_url" json:"rss_url"`
	Ratio        *float64 `yaml:"ratio,omitempty" json:"ratio,omitempty"`
	TargetFolder *string  `yaml:"target_folder,omitempty" json:"target_folder,omitempty"`
	SeedMinutes  *int     `yaml:"seed_minutes,omitempty" json:"seed_minutes,omitempty"`
}

func (JackettSource) GetRatio

func (s JackettSource) GetRatio() float64

func (JackettSource) GetRssUrl

func (s JackettSource) GetRssUrl() string

func (JackettSource) GetSeedMinutes

func (s JackettSource) GetSeedMinutes() int

func (JackettSource) GetTargetFolder

func (s JackettSource) GetTargetFolder() string

type TorrentFile

type TorrentFile struct {
	Guid       string
	URL        *string
	DownloadTo string
	Ratio      float64
	SeedTime   int
}

type TransmissionConfig

type TransmissionConfig struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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