Documentation
¶
Index ¶
- Constants
- func FromBytes[F FeedConstraint](jsonBytes []byte) (feed *F, err error)
- func FromReader[F FeedConstraint](reader io.Reader) (feed *F, err error)
- func FromString[F FeedConstraint](jsonStr string) (feed *F, err error)
- func Ptr[T any](in T) *T
- type Attachment
- type Author
- type Feed
- type FeedConstraint
- type Hub
- type Item
Constants ¶
View Source
const CurrentVersion string = "https://jsonfeed.org/version/1.1"
Variables ¶
This section is empty.
Functions ¶
func FromBytes ¶ added in v0.2.0
func FromBytes[F FeedConstraint](jsonBytes []byte) (feed *F, err error)
func FromReader ¶ added in v0.2.0
func FromReader[F FeedConstraint](reader io.Reader) (feed *F, err error)
func FromString ¶ added in v0.2.0
func FromString[F FeedConstraint](jsonStr string) (feed *F, err error)
Types ¶
type Attachment ¶
type Attachment struct { Url string `json:"url"` MimeType string `json:"mime_type"` Title *string `json:"title"` SizeInBytes *int `json:"size_in_bytes"` DurationInSeconds *int `json:"duration_in_seconds"` }
func (*Attachment) IsValid ¶
func (a *Attachment) IsValid() bool
type Author ¶
type Feed ¶
type Feed struct { Version string `json:"version"` Title string `json:"title"` HomePageUrl *string `json:"home_page_url"` FeedUrl *string `json:"feed_url"` Description *string `json:"Description"` UserComment *string `json:"user_comment"` NextUrl *string `json:"next_url"` Icon *string `json:"icon"` Favicon *string `json:"favicon"` Language *string `json:"language"` Expired *bool `json:"expired"` Authors []Author `json:"authors,omitempty"` Hubs []Hub `json:"hubs,omitempty"` Items []Item `json:"items,omitempty"` }
type FeedConstraint ¶ added in v0.3.0
type FeedConstraint interface {
IsEmpty() bool
}
type Item ¶
type Item struct { Id string `json:"id"` Url *string `json:"url"` ExternalUrl *string `json:"external_url"` Title *string `json:"title"` ContentHtml *string `json:"content_html"` ContentText *string `json:"content_text"` Summary *string `json:"summary"` Image *string `json:"image"` BannerImage *string `json:"banner_image"` DatePublished *time.Time `json:"date_published"` DateModified *time.Time `json:"date_modified"` Language *string `json:"language"` Authors []Author `json:"authors,omitempty"` Tags []string `json:"tags,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
Click to show internal directories.
Click to hide internal directories.