Documentation ¶
Index ¶
- func FromPBInternalID(id *librarian.InternalID) int64
- func FromPBTime(t *timestamppb.Timestamp) *time.Time
- func ToPBTime(t *time.Time) *timestamppb.Timestamp
- type Converter
- type ConverterImpl
- func (c *ConverterImpl) FromPBFeed(source *v1.Feed) *Feed
- func (c *ConverterImpl) FromPBFeedEnclosure(source *v1.FeedEnclosure) *Enclosure
- func (c *ConverterImpl) FromPBFeedImage(source *v1.FeedImage) *Image
- func (c *ConverterImpl) FromPBFeedItem(source *v1.FeedItem) *Item
- func (c *ConverterImpl) ToPBFeed(source *Feed) *v1.Feed
- func (c *ConverterImpl) ToPBFeedEnclosure(source *Enclosure) *v1.FeedEnclosure
- func (c *ConverterImpl) ToPBFeedImage(source *Image) *v1.FeedImage
- func (c *ConverterImpl) ToPBFeedInternalID(source Feed) v1.InternalID
- func (c *ConverterImpl) ToPBFeedItem(source *Item) *v1.FeedItem
- type Enclosure
- type Feed
- type Image
- type Item
- type Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromPBInternalID ¶
func FromPBInternalID(id *librarian.InternalID) int64
func FromPBTime ¶
func FromPBTime(t *timestamppb.Timestamp) *time.Time
Types ¶
type Converter ¶
type Converter interface { // goverter:matchIgnoreCase // goverter:mapIdentity Id ToPBFeed(*Feed) *librarian.Feed // goverter:map InternalID Id ToPBFeedInternalID(Feed) librarian.InternalID // goverter:matchIgnoreCase // goverter:ignore Id // goverter:map UpdatedParsed | ToPBTime // goverter:map PublishedParsed | ToPBTime ToPBFeedItem(*Item) *librarian.FeedItem // goverter:matchIgnoreCase ToPBFeedImage(*Image) *librarian.FeedImage // goverter:matchIgnoreCase ToPBFeedEnclosure(*Enclosure) *librarian.FeedEnclosure // goverter:matchIgnoreCase // goverter:map Id InternalID // goverter:ignore FeedType // goverter:ignore FeedVersion FromPBFeed(*librarian.Feed) *Feed // goverter:matchIgnoreCase // goverter:map Id InternalID // goverter:map UpdatedParsed | FromPBTime // goverter:map PublishedParsed | FromPBTime FromPBFeedItem(*librarian.FeedItem) *Item // goverter:matchIgnoreCase FromPBFeedImage(*librarian.FeedImage) *Image // goverter:matchIgnoreCase FromPBFeedEnclosure(*librarian.FeedEnclosure) *Enclosure }
goverter:converter goverter:extend FromPBInternalID
func NewConverter ¶
func NewConverter() Converter
type ConverterImpl ¶
type ConverterImpl struct{}
func (*ConverterImpl) FromPBFeed ¶
func (c *ConverterImpl) FromPBFeed(source *v1.Feed) *Feed
func (*ConverterImpl) FromPBFeedEnclosure ¶
func (c *ConverterImpl) FromPBFeedEnclosure(source *v1.FeedEnclosure) *Enclosure
func (*ConverterImpl) FromPBFeedImage ¶
func (c *ConverterImpl) FromPBFeedImage(source *v1.FeedImage) *Image
func (*ConverterImpl) FromPBFeedItem ¶
func (c *ConverterImpl) FromPBFeedItem(source *v1.FeedItem) *Item
func (*ConverterImpl) ToPBFeedEnclosure ¶
func (c *ConverterImpl) ToPBFeedEnclosure(source *Enclosure) *v1.FeedEnclosure
func (*ConverterImpl) ToPBFeedImage ¶
func (c *ConverterImpl) ToPBFeedImage(source *Image) *v1.FeedImage
func (*ConverterImpl) ToPBFeedInternalID ¶
func (c *ConverterImpl) ToPBFeedInternalID(source Feed) v1.InternalID
func (*ConverterImpl) ToPBFeedItem ¶
func (c *ConverterImpl) ToPBFeedItem(source *Item) *v1.FeedItem
type Enclosure ¶
type Enclosure struct { URL string `json:"url,omitempty"` Length string `json:"length,omitempty"` Type string `json:"type,omitempty"` }
Enclosure is a file associated with a given Item.
type Feed ¶
type Feed struct { InternalID int64 `json:"internal_id,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Link string `json:"link,omitempty"` Authors []*Person `json:"authors,omitempty"` Language string `json:"language,omitempty"` Image *Image `json:"image,omitempty"` Items []*Item `json:"items"` FeedType string `json:"feedType"` FeedVersion string `json:"feedVersion"` }
type Item ¶
type Item struct { InternalID int64 `json:"internal_id,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Content string `json:"content,omitempty"` Link string `json:"link,omitempty"` Updated string `json:"updated,omitempty"` UpdatedParsed *time.Time `json:"updatedParsed,omitempty"` Published string `json:"published,omitempty"` PublishedParsed *time.Time `json:"publishedParsed,omitempty"` Authors []*Person `json:"authors,omitempty"` GUID string `json:"guid,omitempty"` Image *Image `json:"image,omitempty"` Enclosures []*Enclosure `json:"enclosures,omitempty"` }
Click to show internal directories.
Click to hide internal directories.