Documentation ¶
Index ¶
- Variables
- func GetFoldersMap(db *server.DB) (map[string]*common.Folder, error)
- type Account
- type Attachment
- type AttachmentMeta
- type AttachmentSize
- type Feed
- type ID
- type MastodonPoller
- func (m *MastodonPoller) APICall(ctx context.Context, method, path string, params map[string]string) ([]byte, error)
- func (m *MastodonPoller) Authorize(ctx context.Context, username, password string) error
- func (m *MastodonPoller) GetAccount(ctx context.Context) (*Account, error)
- func (m *MastodonPoller) GetFollowedTags(ctx context.Context) (map[string]Tag, error)
- func (m *MastodonPoller) GetTimelineHome(ctx context.Context, pagination *Pagination) ([]*Status, error)
- func (m *MastodonPoller) GrabTimeline()
- func (m *MastodonPoller) HandleHTTP(c *gin.Context)
- type Pagination
- type PollerData
- type RssItem
- type RssPoller
- type Status
- type Tag
- type Toot
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotModified = errors.New("not modified")
Functions ¶
Types ¶
type Attachment ¶ added in v0.4.0
type Attachment struct { ID ID `json:"id"` Type string `json:"type"` URL string `json:"url"` Meta AttachmentMeta `json:"meta"` }
type AttachmentMeta ¶ added in v0.4.0
type AttachmentMeta struct { Original AttachmentSize `json:"original"` Small AttachmentSize `json:"small"` }
type AttachmentSize ¶ added in v0.4.0
type MastodonPoller ¶
type MastodonPoller struct {
// contains filtered or unexported fields
}
func NewMastodonPoller ¶
func NewMastodonPoller(cfg *common.Config, db *server.DB, newCh chan common.AggregatorItem) (*MastodonPoller, error)
func (*MastodonPoller) Authorize ¶ added in v0.4.0
func (m *MastodonPoller) Authorize(ctx context.Context, username, password string) error
func (*MastodonPoller) GetAccount ¶ added in v0.4.0
func (m *MastodonPoller) GetAccount(ctx context.Context) (*Account, error)
func (*MastodonPoller) GetFollowedTags ¶ added in v0.4.0
func (*MastodonPoller) GetTimelineHome ¶ added in v0.4.0
func (m *MastodonPoller) GetTimelineHome(ctx context.Context, pagination *Pagination) ([]*Status, error)
func (*MastodonPoller) GrabTimeline ¶
func (m *MastodonPoller) GrabTimeline()
func (*MastodonPoller) HandleHTTP ¶
func (m *MastodonPoller) HandleHTTP(c *gin.Context)
type Pagination ¶ added in v0.4.0
type PollerData ¶
type PollerData struct { ID int `json:"id,omitempty"` Type string `json:"type"` Kind string `json:"kind"` Skey string `json:"skey"` LastSeenStr string `json:"last_seen_str"` LastSeenInt int64 `json:"last_seen_int"` }
func GetRunData ¶
func GetRunData(db *server.DB, skey string) *PollerData
func (*PollerData) GetID ¶
func (p *PollerData) GetID() int
func (*PollerData) SetID ¶
func (p *PollerData) SetID(id int)
type RssItem ¶
type RssPoller ¶
type RssPoller struct {
// contains filtered or unexported fields
}
func NewRssPoller ¶
func (*RssPoller) GetFromURL ¶
Calls the feed url with conditional headers. See https://github.com/mmcdole/gofeed/issues/111#issuecomment-450956821
func (*RssPoller) HandleHTTP ¶
func (*RssPoller) HandleNewSubs ¶
func (r *RssPoller) HandleNewSubs()
type Status ¶
type Status struct { ID ID `json:"id"` URI string `json:"uri"` URL string `json:"url"` Account Account `json:"account"` Reblog *Status `json:"reblog"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` Reblogged interface{} `json:"reblogged"` Muted interface{} `json:"muted"` MediaAttachments []Attachment `json:"media_attachments"` Tags []Tag `json:"tags"` Card *common.Card `json:"card"` Filtered []interface{} }
Click to show internal directories.
Click to hide internal directories.