Documentation
¶
Index ¶
- Constants
- type Mention
- type MentionSlice
- type MentionWithKey
- type Mentions
- func (m *Mentions) GetAll(ctx context.Context, target string) []*Mention
- func (m *Mentions) GetGood(ctx context.Context, target string) []*Mention
- func (m *Mentions) GetQueued(ctx context.Context) []*Mention
- func (m *Mentions) GetThumbnail(ctx context.Context, id string) ([]byte, error)
- func (m *Mentions) GetTriage(ctx context.Context, limit, offset int) []*MentionWithKey
- func (m *Mentions) ParseMicroformats(mention *Mention, r io.Reader, urlToImageReader UrlToImageReader)
- func (m *Mentions) Put(ctx context.Context, mention *Mention) error
- func (m *Mentions) SlowValidate(mention *Mention, c *http.Client) error
- func (m *Mentions) UpdateState(ctx context.Context, encodedKey, state string) error
- func (m *Mentions) VerifyQueuedMentions(c *http.Client)
- type Thumbnail
- type UrlToImageReader
- type WebMentionSent
Constants ¶
View Source
const ( MENTIONS ds.Kind = "Mentions" WEB_MENTION_SENT ds.Kind = "WebMentionSent" THUMBNAIL ds.Kind = "Thumbnail" )
View Source
const ( GOOD_STATE = "good" UNTRIAGED_STATE = "untriaged" SPAM_STATE = "spam" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mention ¶
type Mention struct { Source string Target string State string TS time.Time // Metadata found when validating. We might display this. Title string `datastore:",noindex"` Author string `datastore:",noindex"` AuthorURL string `datastore:",noindex"` Published time.Time `datastore:",noindex"` Thumbnail string `datastore:",noindex"` URL string `datastore:",noindex"` }
func (*Mention) FastValidate ¶
type MentionSlice ¶
type MentionSlice []*Mention
func (MentionSlice) Len ¶
func (p MentionSlice) Len() int
func (MentionSlice) Less ¶
func (p MentionSlice) Less(i, j int) bool
func (MentionSlice) Swap ¶
func (p MentionSlice) Swap(i, j int)
type MentionWithKey ¶
type Mentions ¶
func NewMentions ¶
func (*Mentions) GetThumbnail ¶
func (*Mentions) GetTriage ¶
func (m *Mentions) GetTriage(ctx context.Context, limit, offset int) []*MentionWithKey
func (*Mentions) ParseMicroformats ¶
func (m *Mentions) ParseMicroformats(mention *Mention, r io.Reader, urlToImageReader UrlToImageReader)
func (*Mentions) SlowValidate ¶
func (*Mentions) UpdateState ¶
func (*Mentions) VerifyQueuedMentions ¶
type UrlToImageReader ¶
type UrlToImageReader func(url string) (io.ReadCloser, error)
func MakeUrlToImageReader ¶
func MakeUrlToImageReader(c *http.Client) UrlToImageReader
type WebMentionSent ¶
Click to show internal directories.
Click to hide internal directories.