app

package
v0.0.0-...-5375de8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomLink struct {
	Href string `xml:"href,attr"`
	Rel  string `xml:"rel,attr"`
	Type string `xml:"type,attr"`
}

type Channel

type Channel struct {
	XMLName       xml.Name `xml:"channel"`
	Title         string   `xml:"title"`
	Link          string   `xml:"link"`
	Description   string   `xml:"description"`
	Atom          string   `xml:"xmlns:atom,attr"`
	AtomLink      AtomLink `xml:"atom:link"`
	LastBuildDate string   `xml:"lastBuildDate"`
	PubDate       string   `xml:"pubDate"`
	Item          []Item   `xml:"item"`
}

type GUID

type GUID struct {
	IsPermaLink string `xml:"isPermaLink,attr"`
	InnerXML    string `xml:",innerxml"`
}

type Image

type Image struct {
	XMLName xml.Name `xml:"image"`
	Title   string   `xml:"title"`
	Url     string   `xml:"url"`
	Link    string   `xml:"link"`
}

type Item

type Item struct {
	XMLName     xml.Name `xml:"item"`
	Title       string   `xml:"title"`
	Link        string   `xml:"link,omitempty"`
	Description string   `xml:"description"`
	PubDate     string   `xml:"pubDate"`
}

type ItemBSON

type ItemBSON struct {
	Title       string `bson:"title"`
	Link        string `bson:"link,omitempty"`
	Description string `bson:"description"`
	PubDate     string `bson:"pubDate"`
}

type ItemJSON

type ItemJSON struct {
	Title       string `json:"title"`
	Link        string `json:"link,omitempty"`
	Description string `json:"description"`
	PubDate     string `json:"pubDate"`
}

type RSSInit

type RSSInit struct {
	DatabaseType     string
	ConnectionString string
	DatabaseUri      string
	Username         string
	Password         string
	RssTitle         string
	RssDescription   string
	RootPath         string
}

func (*RSSInit) AddToMongoDatabase

func (rss *RSSInit) AddToMongoDatabase(item ItemBSON, c *mongo.Client, ctx context.Context) error

func (*RSSInit) BasicAuth

func (rss *RSSInit) BasicAuth(next http.HandlerFunc) http.HandlerFunc

func (*RSSInit) CreateIndex

func (rss *RSSInit) CreateIndex(w http.ResponseWriter, r *http.Request)

func (*RSSInit) CreateItemAPI

func (rss *RSSInit) CreateItemAPI(w http.ResponseWriter, r *http.Request)

func (*RSSInit) CreateRSSFeed

func (rss *RSSInit) CreateRSSFeed() []byte

func (*RSSInit) GetAllFromMSSQLDatabaseAndConvert

func (rss *RSSInit) GetAllFromMSSQLDatabaseAndConvert(table string) []Item

func (*RSSInit) GetAllFromMongoDatabaseAndConvert

func (rss *RSSInit) GetAllFromMongoDatabaseAndConvert() []Item

func (*RSSInit) GetMongoFindResults

func (rss *RSSInit) GetMongoFindResults(c *mongo.Client, ctx context.Context) []Item

func (*RSSInit) HealthCheck

func (rss *RSSInit) HealthCheck(w http.ResponseWriter, r *http.Request)

func (*RSSInit) WriteToMSSQLDatabase

func (rss *RSSInit) WriteToMSSQLDatabase(item ItemJSON, table string) error

func (*RSSInit) WriteToMongoDatabase

func (rss *RSSInit) WriteToMongoDatabase(item ItemBSON, database string, collection string) error

type Rss

type Rss struct {
	XMLName  xml.Name  `xml:"rss"`
	Version  string    `xml:"version,attr"`
	Channels []Channel `xml:"channel"`
}

type URL

type URL struct {
	URL     string
	Filters []string
}

Jump to

Keyboard shortcuts

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