Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJsonLdNotFound = fmt.Errorf("json+ld event description not found")
Functions ¶
This section is empty.
Types ¶
type ContentProcessor ¶
type Event ¶
type Event struct { Name string `json:"name"` Description string `json:"description"` StartDate LdTime `json:"startDate"` EndDate LdTime `json:"endDate"` EventAttendanceMode EventAttendanceMode `json:"eventAttendanceMode"` URL string `json:"url"` ImageURL string `json:"image"` Location Place `json:"location"` }
func FindLdJsonInHtml ¶
func FindLdJsonInHtml(htmlContent io.Reader, contentCallback ContentProcessor) (*Event, error)
func (Event) ToMobilizonEvent ¶
type EventAttendanceMode ¶
type EventAttendanceMode string
const ( OfflineEventAttendanceMode EventAttendanceMode = "https://schema.org/OfflineEventAttendanceMode" OnlineEventAttendanceMode EventAttendanceMode = "https://schema.org/OnlineEventAttendanceMode" MixedEventAttendanceMode EventAttendanceMode = "https://schema.org/MixedEventAttendanceMode" )
type LdTime ¶
LdTime is a helper for unmarshalling json. This is needed, as the time format returned by facebook is not compatible with go's RFC3339: - 2022-04-04T22:00:00+0200 + 2022-04-04T22:00:00+02:00
func (*LdTime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.