Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFeedNotFound = errors.New("feed not found") ErrFeedInvalid = errors.New("invalid feed format") ErrFeedUnreachable = errors.New("feed URL unreachable") )
Common errors returned by the feed service.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Service)
Option configures the feed service.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithTimeout ¶
WithTimeout sets the HTTP request timeout.
type ParsedFeed ¶
ParsedFeed contains the parsed feed metadata and articles.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles RSS/Atom feed parsing.
func NewService ¶
NewService creates a new feed parsing service.
func (*Service) FetchAndParse ¶
FetchAndParse fetches a feed from the given URL and parses it.
func (*Service) ParseString ¶
func (s *Service) ParseString(content string) (*ParsedFeed, error)
ParseString parses feed content from a string.
Click to show internal directories.
Click to hide internal directories.