rss

package
v0.0.2-rc-ci Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(service Service, plausibleClient *plausible.Client) func(r chi.Router)

Types

type Channel

type Channel struct {
	XMLName     xml.Name `xml:"channel"`
	Title       string   `xml:"title"`
	Link        string   `xml:"link"`
	Description string   `xml:"description"`
	Items       []Item   `xml:"item"`
}

type Feed

type Feed struct {
	XMLName xml.Name `xml:"rss"`
	Version string   `xml:"version,attr"`
	Channel *Channel `xml:"channel"`
}

type Item

type Item struct {
	XMLName     xml.Name `xml:"item"`
	Title       string   `xml:"title"`
	Link        string   `xml:"link"`
	Description string   `xml:"description"`
	Guid        string   `xml:"guid,omitempty"`
}

type Service

type Service interface {
	Feed(ctx context.Context, opts eventsearch.Options, channel *Channel) (*Feed, error)
	GroupFeed(ctx context.Context, groupID string) (*Feed, error)
	PlaceFeed(ctx context.Context, placeID string) (*Feed, error)
}

type ServiceImpl

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

func NewService

func NewService(eventsearchService eventsearch.Service, groupService group.Service, placeService place.Service, baseURL string) *ServiceImpl

func (*ServiceImpl) Feed

func (s *ServiceImpl) Feed(ctx context.Context, opts eventsearch.Options, channel *Channel) (*Feed, error)

func (*ServiceImpl) GroupFeed

func (s *ServiceImpl) GroupFeed(ctx context.Context, groupID string) (*Feed, error)

func (*ServiceImpl) PlaceFeed

func (s *ServiceImpl) PlaceFeed(ctx context.Context, placeID string) (*Feed, error)

Jump to

Keyboard shortcuts

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