feed

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindItems

func FindItems(feed *gofeed.Feed) (matchItems []*gofeed.Item)

FindItems return filtered items

func Read

func Read(url string) (*gofeed.Feed, error)

Read resource

func Trim

func Trim(s string) string

Trim substrings from text

Types

type Item

type Item struct {
	Title, Link string
	Origin      *gofeed.Item
}

Item can validate items and send to channels

func NewItem

func NewItem(feedItem *gofeed.Item) *Item

NewItem constructor

func (*Item) GetMD5Hash

func (i *Item) GetMD5Hash() []byte

GetMD5Hash return hashable link

func (*Item) Send

func (i *Item) Send(clients *[]Messanger)

Send message to all channels

type Messanger

type Messanger interface {
	Send(i *Item)
	Check() bool
}

Messanger interface for clients

Jump to

Keyboard shortcuts

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