rssfilter

package module
v0.0.0-...-3d228c6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 10 Imported by: 0

README

rss_filter

flow

  • Read config yaml
  • Fetch RSS
  • Filter
  • Write result RSS

deploy

gcloud functions deploy Handler --runtime go116 --trigger-http --allow-unauthenticated

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(url string) string

func Fetch

func Fetch(url string) ([]byte, error)

func GetByName

func GetByName(name string) (string, error)

func GetByURL

func GetByURL(url string) (string, error)

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

Types

type RSS

type RSS struct {
	XMLName xml.Name `xml:"rss"`
	Version string   `xml:"version,attr"`
	Channel struct {
		Language    string    `xml:"language"`
		Title       string    `xml:"title"`
		Link        string    `xml:"link"`
		Description string    `xml:"description"`
		Items       []RSSItem `xml:"item"`
	} `xml:"channel"`
}

func Parse

func Parse(buf []byte) (*RSS, error)

type RSSItem

type RSSItem struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	PubDate     string `xml:"pubDate"`
	Description string `xml:"description"`
	Creator     string `xml:"dc:creator"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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