Simple RSS/Atom feed source for diretto
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
673 B

package storage
import "github.com/gorilla/feeds"
// Backend is a storage backend for bacheca
type Backend interface {
// GetFeed returns the whole feed
GetFeed() (*feeds.Feed, error)
// AddItem adds an item to the feed
// If an ID is not specified, one will be generated randomly
// The return value is the ID, generated or provided
AddItem(item feeds.Item) (string, error)
// RemoveItem removes an item by ID
RemoveItem(id string) error
// ReplaceItem replaces the item at a specified ID with the data provided
ReplaceItem(id string, item feeds.Item) error
// SetInfo sets the feed metadata (like title and description)
SetInfo(info feeds.Feed) error
}