Documentation ¶
Index ¶
- type Author
- type Eagle
- func (e *Eagle) AutoLinkMentions(entry *Entry)
- func (e *Eagle) Build(clean bool) error
- func (e *Eagle) DeleteEntry(entry *Entry) error
- func (e *Eagle) GetAllEntries() ([]*Entry, error)
- func (e *Eagle) GetEntry(id string) (*Entry, error)
- func (e *Eagle) GetEntryData(entry *Entry) (*EntryData, error)
- func (e *Eagle) GetWebmentionTargets(entry *Entry) ([]string, []string, []string, error)
- func (e *Eagle) GetXRay(url string) (*XRay, error)
- func (e *Eagle) MakeEntryBundle(entry *Entry) error
- func (e *Eagle) ParseEntry(id, raw string) (*Entry, error)
- func (e *Eagle) Persist(filename string, data []byte, message string) error
- func (e *Eagle) PersistJSON(filename string, data interface{}, msg string) error
- func (e *Eagle) ReadFile(filename string) ([]byte, error)
- func (e *Eagle) ReadJSON(filename string, v interface{}) error
- func (e *Eagle) RebuildIndex() error
- func (e *Eagle) ReceiveWebmentions(payload *WebmentionPayload) error
- func (e *Eagle) SaveEntry(entry *Entry) error
- func (e *Eagle) SaveEntryData(entry *Entry, data *EntryData) error
- func (e *Eagle) Search(query *SearchQuery, page int) ([]*SearchEntry, error)
- func (e *Eagle) SendWebmentions(entry *Entry) error
- func (e *Eagle) ShouldBuild() (bool, error)
- func (e *Eagle) Sync() ([]string, error)
- func (e *Eagle) TransformEntryData(entry *Entry, t func(*EntryData) (*EntryData, error)) error
- func (e *Eagle) UpdateTargets(entry *Entry) error
- type Entry
- type EntryData
- type Feed
- type Media
- type MeiliSearch
- type Menu
- type Metadata
- type Miniflux
- type Notifications
- type Picture
- type SearchEntry
- type SearchIndex
- type SearchQuery
- type Twitter
- type Webmention
- type WebmentionContent
- type WebmentionPayload
- type XRay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Eagle ¶
type Eagle struct { Notifications Config *config.Config PublicDirCh chan string Miniflux *Miniflux Twitter *Twitter // contains filtered or unexported fields }
func (*Eagle) AutoLinkMentions ¶
AutoLinkMentions mentions replaces all Twitter and ActivityPub @mentions in a post by proper links. FIXME: do not check for mentions inside code blocks, only paragraphs.
func (*Eagle) DeleteEntry ¶
func (*Eagle) GetAllEntries ¶
func (*Eagle) GetWebmentionTargets ¶
func (*Eagle) MakeEntryBundle ¶
func (*Eagle) PersistJSON ¶
func (*Eagle) RebuildIndex ¶
func (*Eagle) ReceiveWebmentions ¶
func (e *Eagle) ReceiveWebmentions(payload *WebmentionPayload) error
func (*Eagle) Search ¶
func (e *Eagle) Search(query *SearchQuery, page int) ([]*SearchEntry, error)
func (*Eagle) SendWebmentions ¶
func (*Eagle) ShouldBuild ¶
ShouldBuild indicates if the website should be built. This should only return true after initialization.
func (*Eagle) TransformEntryData ¶
func (*Eagle) UpdateTargets ¶
type Entry ¶
type EntryData ¶
type EntryData struct { Targets []string `json:"targets"` Webmentions []*Webmention `json:"webmentions"` }
type MeiliSearch ¶
type MeiliSearch struct {
meilisearch.ClientInterface
}
func NewMeiliSearch ¶
func NewMeiliSearch(conf *config.MeiliSearch) (*MeiliSearch, bool, error)
func (*MeiliSearch) Add ¶
func (ms *MeiliSearch) Add(entries ...*Entry) error
func (*MeiliSearch) Remove ¶
func (ms *MeiliSearch) Remove(entries ...*Entry) error
func (*MeiliSearch) ResetIndex ¶
func (ms *MeiliSearch) ResetIndex() error
func (*MeiliSearch) Search ¶
func (ms *MeiliSearch) Search(query *SearchQuery, page int) ([]*SearchEntry, error)
type Metadata ¶
type Metadata struct { DataID string `yaml:"dataId,omitempty"` Title string `yaml:"title,omitempty"` Description string `yaml:"description,omitempty"` Tags []string `yaml:"tags,omitempty"` Date time.Time `yaml:"date,omitempty"` Lastmod time.Time `yaml:"lastmod,omitempty"` ExpiryDate time.Time `yaml:"expiryDate,omitempty"` Syndication []string `yaml:"syndication,omitempty"` ReplyTo *XRay `yaml:"replyTo,omitempty"` URL string `yaml:"url,omitempty"` Aliases []string `yaml:"aliases,omitempty"` Emoji string `yaml:"emoji,omitempty"` Layout string `yaml:"layout,omitempty"` NoIndex bool `yaml:"noIndex,omitempty"` NoMentions bool `yaml:"noMentions,omitempty"` Math bool `yaml:"math,omitempty"` Mermaid bool `yaml:"mermaid,omitempty"` Pictures []*Picture `yaml:"pictures,omitempty"` Cover *Picture `yaml:"cover,omitempty"` Draft bool `yaml:"draft,omitempty"` Growth string `yaml:"growth,omitempty"` Menu map[string]*Menu `yaml:"menu,omitempty"` Photo []interface{} `yaml:"photo,omitempty"` PhotoClass string `yaml:"photoClass,omitempty"` }
type Notifications ¶
type SearchEntry ¶
type SearchEntry struct { // SearchID is for Meilisearch. See searchKey. SearchID string `json:"idx" mapstructure:"idx"` ID string `json:"id" mapstructure:"id"` Permalink string `json:"permalink" mapstructure:"permalink"` Title string `json:"title" mapstructure:"title"` Tags []string `json:"tags" mapstructure:"tags"` Content string `json:"content" mapstructure:"content"` Section string `json:"section" mapstructure:"section"` Draft bool `json:"draft" mapstructure:"draft"` Deleted bool `json:"deleted" mapstructure:"deleted"` Date string `json:"date" mapstructure:"date"` }
type SearchIndex ¶
type SearchIndex interface { ResetIndex() error Add(entries ...*Entry) error Remove(entries ...*Entry) error Search(query *SearchQuery, page int) ([]*SearchEntry, error) }
type SearchQuery ¶
type Webmention ¶
type Webmention struct { XRay `yaml:",inline"` // Specifically for webmentions received from https://webmention.io // TODO: remove this and compare webmentions via URL. WmID int `yaml:"wm-id,omitempty" json:"wm-id,omitempty"` Private bool `json:"private,omitempty"` }
type WebmentionContent ¶
type WebmentionPayload ¶
type WebmentionPayload struct { Source string `json:"source"` Secret string `json:"secret"` Deleted bool `json:"deleted"` Target string `json:"target"` Post struct { Type string `json:"type"` Author Author `json:"author"` URL string `json:"url"` Published string `json:"published"` WmReceived string `json:"wm-received"` WmID int `json:"wm-id"` Content WebmentionContent `json:"content"` MentionOf string `json:"mention-of"` WmProperty string `json:"wm-property"` WmSource string `json:"wm-source"` WmPrivate bool `json:"wm-private"` } `json:"post"` }
type XRay ¶
type XRay struct { Type string `yaml:"type,omitempty" json:"type,omitempty"` URL string `yaml:"url,omitempty" json:"url,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` Content string `yaml:"content,omitempty" json:"content,omitempty"` Date time.Time `yaml:"date,omitempty" json:"date,omitempty"` Author *Author `yaml:"author,omitempty" json:"author,omitempty"` }
XRay is an xray of an external post. This is the format used to store Webmentions and ReplyTo context.
Click to show internal directories.
Click to hide internal directories.