opml

package
v1.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOPMLDocument

func NewOPMLDocument() *opmlDocument

func Serialize

func Serialize(subscriptions SubcriptionList) string

Serialize returns a SubcriptionList in OPML format.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handles the logic for OPML import/export.

func NewHandler

func NewHandler(store *storage.Storage) *Handler

NewHandler creates a new handler for OPML files.

func (*Handler) Export

func (h *Handler) Export(userID int64) (string, error)

Export exports user feeds to OPML.

func (*Handler) Import

func (h *Handler) Import(userID int64, data io.Reader) error

Import parses and create feeds from an OPML import.

type Subcription

type Subcription struct {
	Title        string
	SiteURL      string
	FeedURL      string
	CategoryName string
}

Subcription represents a feed that will be imported or exported.

func (Subcription) Equals

func (s Subcription) Equals(subscription *Subcription) bool

Equals compare two subscriptions.

type SubcriptionList

type SubcriptionList []*Subcription

SubcriptionList is a list of subscriptions.

func Parse

Parse reads an OPML file and returns a SubcriptionList.

Jump to

Keyboard shortcuts

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