aggregator

package
v0.0.0-...-e4dec06 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PUB_DATE_FORMATS = []string{
	time.RFC1123Z,
	"Mon, 2 Jan 2006 15:04:05 -0700",
	"2006-01-02T15:04:05Z",
	"02 Jan 2006 15:04:05 -0700",
	"Mon, 02 Jan 2006 15:04:05 GMT",
	"2006-01-02T15:04:05",
}
View Source
var RSS_URLS = []RssFeed{

	{1, "Finanzen.net", "https://www.finanzen.net/rss/analysen"},
	{2, "Godmode Trader", "https://www.godmode-trader.de/feeds/deutschland-und-europa"},
	{3, "Onvista", "https://www.onvista.de/news/feed/rss.xml?orderBy=datetime"},
	{4, "Finanznachrichten-Chartanalysen", "https://www.finanznachrichten.de/rss-chartanalysen-top"},
	{5, "Finanznachrichten-Analysen", "https://www.finanznachrichten.de/rss-aktien-analysen"},
	{6, "Ariva.de", "https://www.ariva.de/news/finanznachrichten/rss"},
	{7, "Yahoo", "https://finance.yahoo.com/news/rssindex"},
	{8, "CNBC", "https://www.cnbc.com/id/10000664/device/rss/rss.html"},
	{9, "BörseOnline", "https://www.boerse-online.de/rss"},
	{10, "Wikifolio", "https://www.wikifolio.com/de/de/blog/rss"},
	{12, "Reuters", "https://www.handelsblatt.com/contentexport/feed/finanzen"},
	{13, "SeekingAlpha", "https://seekingalpha.com/news/all/feed"},
	{14, "Finanznachrichten-Aktien", "https://www.finanznachrichten.de/rss-aktien-nachrichten"},
}

Functions

func AggregateNews

func AggregateNews() []model.NewsItem

func GET

func GET(target string) string

func RandomString

func RandomString(options []string) string

Types

type ItemEnclosure

type ItemEnclosure struct {
	URL  string `xml:"url,attr"`
	Type string `xml:"type,attr"`
}

ItemEnclosure struct for each Item Enclosure

type MotleyFoolReader

type MotleyFoolReader struct{}

func (*MotleyFoolReader) ReadData

func (a *MotleyFoolReader) ReadData() []model.NewsItem

type NewsReader

type NewsReader interface {
	ReadData() []model.NewsItem
}

func NewMotleyFoolReader

func NewMotleyFoolReader() NewsReader

func NewRSSReader

func NewRSSReader() NewsReader

func NewSGZertifikateReader

func NewSGZertifikateReader() NewsReader

type RSSChannel

type RSSChannel struct {
	XMLName       xml.Name  `xml:"channel"`
	Title         string    `xml:"title"`
	Link          string    `xml:"link"`
	Description   string    `xml:"description"`
	Language      string    `xml:"language"`
	LastBuildDate string    `xml:"lastBuildDate"`
	Item          []RSSItem `xml:"item"`
}

func ReadRSS

func ReadRSS(url string) (*RSSChannel, error)

type RSSItem

type RSSItem struct {
	Title       string          `xml:"title"`
	Link        string          `xml:"link"`
	Comments    string          `xml:"comments"`
	PubDate     string          `xml:"pubDate"`
	GUID        string          `xml:"guid"`
	Category    []string        `xml:"category"`
	Enclosure   []ItemEnclosure `xml:"enclosure"`
	Description string          `xml:"description"`
	Author      string          `xml:"author"`
	Content     string          `xml:"content"`
	FullText    string          `xml:"full-text"`
	Isin        string          `xml:"fn:isin"`
}

Item struct for each Item in the Channel

type RSSReader

type RSSReader struct{}

func (*RSSReader) ReadData

func (a *RSSReader) ReadData() []model.NewsItem

type RssFeed

type RssFeed struct {
	Id   int
	Name string
	Url  string
}

type SGEditorialEntry

type SGEditorialEntry struct {
	Id              int    `json:"Id"`
	Title           string `json:"Title"`
	PublicationDate string `json:"PublicationDate"`
	Slug            string `json:"Slug"`
}

type SGEditorials

type SGEditorials struct {
	Entries []SGEditorialEntry `json:"Editorials"`
}

type SGZertifikateReader

type SGZertifikateReader struct{}

func (*SGZertifikateReader) ReadData

func (a *SGZertifikateReader) ReadData() []model.NewsItem

Jump to

Keyboard shortcuts

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