Documentation
¶
Index ¶
- func FurAffinityUrl() *url.URL
- type BaseEntry
- type CommentContent
- type CommentEntry
- func (ce *CommentEntry) Content() EntryContent
- func (ce *CommentEntry) Date() time.Time
- func (ce *CommentEntry) EntryType() entries.EntryType
- func (ce *CommentEntry) From() *FurAffinityUser
- func (ce *CommentEntry) HasContent() bool
- func (ce *CommentEntry) ID() uint
- func (ce *CommentEntry) Link() *url.URL
- func (ce *CommentEntry) Rating() Rating
- func (ce *CommentEntry) SetContent(ec EntryContent)
- func (ce *CommentEntry) Title() string
- type Entry
- type EntryContent
- type EntrySubmissionContent
- type FurAffinityCollector
- func (fc *FurAffinityCollector) DateIsValid(entryType entries.EntryType, date time.Time) bool
- func (fc *FurAffinityCollector) GetNewNotes() <-chan *NoteEntry
- func (fc *FurAffinityCollector) GetNewNotesWithContent() <-chan *NoteEntry
- func (fc *FurAffinityCollector) GetNewOtherEntries(entryTypes ...entries.EntryType) <-chan Entry
- func (fc *FurAffinityCollector) GetNewOtherEntriesWithContent(entryTypes ...entries.EntryType) <-chan Entry
- func (fc *FurAffinityCollector) GetNewSubmissionEntries() <-chan *SubmissionEntry
- func (fc *FurAffinityCollector) GetNewSubmissionEntriesWithContent() <-chan *SubmissionEntry
- func (fc *FurAffinityCollector) GetNoteContent(note uint, markUnread bool) *NoteContent
- func (fc *FurAffinityCollector) GetNoteContents(notes []uint, markUnread bool) map[uint]*NoteContent
- func (fc *FurAffinityCollector) GetNotes(page uint) <-chan *NoteEntry
- func (fc *FurAffinityCollector) GetOtherEntries(entryTypes ...entries.EntryType) <-chan Entry
- func (fc *FurAffinityCollector) GetOtherEntryContent(entry Entry) EntryContent
- func (fc *FurAffinityCollector) GetSubmissionContent(entry *SubmissionEntry) *SubmissionContent
- func (fc *FurAffinityCollector) GetSubmissionEntries() <-chan *SubmissionEntry
- func (fc *FurAffinityCollector) GetSubmissionEntriesWithContent() <-chan *SubmissionEntry
- func (fc *FurAffinityCollector) IsLoggedIn() (bool, error)
- func (fc *FurAffinityCollector) IsWhitelisted(entryType entries.EntryType, user string) bool
- func (fc *FurAffinityCollector) MarkUnread(noteId ...uint) error
- func (fc *FurAffinityCollector) OnlyUnreadNotes() bool
- func (fc *FurAffinityCollector) SetUserFilter(entryType entries.EntryType, users []string)
- func (fc *FurAffinityCollector) TypeEnabledSince(entryType entries.EntryType) time.Time
- func (fc *FurAffinityCollector) UserID() uint
- type FurAffinityUser
- type JournalContent
- type JournalEntry
- func (je *JournalEntry) Content() EntryContent
- func (je *JournalEntry) Date() time.Time
- func (je *JournalEntry) EntryType() entries.EntryType
- func (je *JournalEntry) From() *FurAffinityUser
- func (je *JournalEntry) HasContent() bool
- func (je *JournalEntry) ID() uint
- func (je *JournalEntry) Link() *url.URL
- func (je *JournalEntry) Rating() Rating
- func (je *JournalEntry) SetContent(ec EntryContent)
- func (je *JournalEntry) Title() string
- type NoteContent
- type NoteEntry
- func (ne *NoteEntry) Content() EntryContent
- func (ne *NoteEntry) Date() time.Time
- func (ne *NoteEntry) EntryType() entries.EntryType
- func (ne *NoteEntry) From() *FurAffinityUser
- func (ne *NoteEntry) HasContent() bool
- func (ne *NoteEntry) ID() uint
- func (ne *NoteEntry) Link() *url.URL
- func (ne *NoteEntry) Rating() Rating
- func (ne *NoteEntry) SetContent(ec EntryContent)
- func (ne *NoteEntry) Title() string
- type Rating
- type SubmissionContent
- type SubmissionData
- type SubmissionDataMap
- type SubmissionEntry
- func (se *SubmissionEntry) BlockedReasons() dsext.Set[string]
- func (se *SubmissionEntry) Content() *SubmissionContent
- func (se *SubmissionEntry) Date() time.Time
- func (se *SubmissionEntry) Description() string
- func (se *SubmissionEntry) EntryType() entries.EntryType
- func (se *SubmissionEntry) From() *FurAffinityUser
- func (se *SubmissionEntry) FullView() *url.URL
- func (se *SubmissionEntry) HasContent() bool
- func (se *SubmissionEntry) ID() uint
- func (se *SubmissionEntry) IsBlocked() bool
- func (se *SubmissionEntry) Link() *url.URL
- func (se *SubmissionEntry) Rating() Rating
- func (se *SubmissionEntry) SetContent(content *SubmissionContent)
- func (se *SubmissionEntry) SubmissionData() *SubmissionData
- func (se *SubmissionEntry) Tags() dsext.Set[string]
- func (se *SubmissionEntry) Thumbnail() *tools.ThumbnailUrl
- func (se *SubmissionEntry) Title() string
- func (se *SubmissionEntry) Type() SubmissionType
- type SubmissionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FurAffinityUrl ¶
Types ¶
type CommentContent ¶
type CommentContent struct {
// contains filtered or unexported fields
}
func (*CommentContent) ID ¶
func (cc *CommentContent) ID() uint
func (*CommentContent) Text ¶
func (cc *CommentContent) Text() string
type CommentEntry ¶
type CommentEntry struct {
// contains filtered or unexported fields
}
func (*CommentEntry) Content ¶
func (ce *CommentEntry) Content() EntryContent
func (*CommentEntry) Date ¶
func (ce *CommentEntry) Date() time.Time
func (*CommentEntry) EntryType ¶
func (ce *CommentEntry) EntryType() entries.EntryType
func (*CommentEntry) From ¶
func (ce *CommentEntry) From() *FurAffinityUser
func (*CommentEntry) HasContent ¶
func (ce *CommentEntry) HasContent() bool
func (*CommentEntry) ID ¶
func (ce *CommentEntry) ID() uint
func (*CommentEntry) Link ¶
func (ce *CommentEntry) Link() *url.URL
func (*CommentEntry) Rating ¶
func (ce *CommentEntry) Rating() Rating
func (*CommentEntry) SetContent ¶
func (ce *CommentEntry) SetContent(ec EntryContent)
func (*CommentEntry) Title ¶
func (ce *CommentEntry) Title() string
type Entry ¶
type Entry interface {
BaseEntry
Content() EntryContent
SetContent(EntryContent)
HasContent() bool
}
type EntryContent ¶
type EntrySubmissionContent ¶
type FurAffinityCollector ¶
type FurAffinityCollector struct {
LimitConcurrency int
OnlySinceRegistration bool
OnlySinceTypeEnabled bool
IterateSubmissionsBackwards bool
RespectBlockedTags bool
User *db.User
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector(user *db.User) *FurAffinityCollector
func (*FurAffinityCollector) DateIsValid ¶
DateIsValid returns true if the given date is valid for the user. A date is valid if it is after the user's registration date and if it is after the date at which the entry type was enabled for the user.
func (*FurAffinityCollector) GetNewNotes ¶
func (fc *FurAffinityCollector) GetNewNotes() <-chan *NoteEntry
func (*FurAffinityCollector) GetNewNotesWithContent ¶
func (fc *FurAffinityCollector) GetNewNotesWithContent() <-chan *NoteEntry
func (*FurAffinityCollector) GetNewOtherEntries ¶
func (fc *FurAffinityCollector) GetNewOtherEntries(entryTypes ...entries.EntryType) <-chan Entry
func (*FurAffinityCollector) GetNewOtherEntriesWithContent ¶
func (fc *FurAffinityCollector) GetNewOtherEntriesWithContent(entryTypes ...entries.EntryType) <-chan Entry
func (*FurAffinityCollector) GetNewSubmissionEntries ¶
func (fc *FurAffinityCollector) GetNewSubmissionEntries() <-chan *SubmissionEntry
func (*FurAffinityCollector) GetNewSubmissionEntriesWithContent ¶
func (fc *FurAffinityCollector) GetNewSubmissionEntriesWithContent() <-chan *SubmissionEntry
func (*FurAffinityCollector) GetNoteContent ¶
func (fc *FurAffinityCollector) GetNoteContent(note uint, markUnread bool) *NoteContent
func (*FurAffinityCollector) GetNoteContents ¶
func (fc *FurAffinityCollector) GetNoteContents(notes []uint, markUnread bool) map[uint]*NoteContent
func (*FurAffinityCollector) GetNotes ¶
func (fc *FurAffinityCollector) GetNotes(page uint) <-chan *NoteEntry
func (*FurAffinityCollector) GetOtherEntries ¶
func (fc *FurAffinityCollector) GetOtherEntries(entryTypes ...entries.EntryType) <-chan Entry
func (*FurAffinityCollector) GetOtherEntryContent ¶
func (fc *FurAffinityCollector) GetOtherEntryContent(entry Entry) EntryContent
func (*FurAffinityCollector) GetSubmissionContent ¶
func (fc *FurAffinityCollector) GetSubmissionContent(entry *SubmissionEntry) *SubmissionContent
func (*FurAffinityCollector) GetSubmissionEntries ¶
func (fc *FurAffinityCollector) GetSubmissionEntries() <-chan *SubmissionEntry
func (*FurAffinityCollector) GetSubmissionEntriesWithContent ¶
func (fc *FurAffinityCollector) GetSubmissionEntriesWithContent() <-chan *SubmissionEntry
func (*FurAffinityCollector) IsLoggedIn ¶
func (fc *FurAffinityCollector) IsLoggedIn() (bool, error)
func (*FurAffinityCollector) IsWhitelisted ¶
func (fc *FurAffinityCollector) IsWhitelisted(entryType entries.EntryType, user string) bool
IsWhitelisted returns true if the user is whitelisted for the given entry type or if there is no filter specified for that entry type.
func (*FurAffinityCollector) MarkUnread ¶
func (fc *FurAffinityCollector) MarkUnread(noteId ...uint) error
func (*FurAffinityCollector) OnlyUnreadNotes ¶
func (fc *FurAffinityCollector) OnlyUnreadNotes() bool
func (*FurAffinityCollector) SetUserFilter ¶
func (fc *FurAffinityCollector) SetUserFilter(entryType entries.EntryType, users []string)
func (*FurAffinityCollector) TypeEnabledSince ¶
func (fc *FurAffinityCollector) TypeEnabledSince(entryType entries.EntryType) time.Time
TypeEnabledSince returns the date at which the given entry type was enabled for the user.
func (*FurAffinityCollector) UserID ¶
func (fc *FurAffinityCollector) UserID() uint
type FurAffinityUser ¶
func (FurAffinityUser) IsValid ¶
func (fu FurAffinityUser) IsValid() bool
func (FurAffinityUser) Name ¶
func (fu FurAffinityUser) Name() string
type JournalContent ¶
type JournalContent struct {
// contains filtered or unexported fields
}
func (*JournalContent) ID ¶
func (jc *JournalContent) ID() uint
func (*JournalContent) Text ¶
func (jc *JournalContent) Text() string
type JournalEntry ¶
type JournalEntry struct {
// contains filtered or unexported fields
}
func (*JournalEntry) Content ¶
func (je *JournalEntry) Content() EntryContent
func (*JournalEntry) Date ¶
func (je *JournalEntry) Date() time.Time
func (*JournalEntry) EntryType ¶
func (je *JournalEntry) EntryType() entries.EntryType
func (*JournalEntry) From ¶
func (je *JournalEntry) From() *FurAffinityUser
func (*JournalEntry) HasContent ¶
func (je *JournalEntry) HasContent() bool
func (*JournalEntry) ID ¶
func (je *JournalEntry) ID() uint
func (*JournalEntry) Link ¶
func (je *JournalEntry) Link() *url.URL
func (*JournalEntry) Rating ¶
func (je *JournalEntry) Rating() Rating
func (*JournalEntry) SetContent ¶
func (je *JournalEntry) SetContent(ec EntryContent)
func (*JournalEntry) Title ¶
func (je *JournalEntry) Title() string
type NoteContent ¶
type NoteContent struct {
// contains filtered or unexported fields
}
func (*NoteContent) ID ¶
func (nc *NoteContent) ID() uint
func (*NoteContent) Text ¶
func (nc *NoteContent) Text() string
type NoteEntry ¶
type NoteEntry struct {
WasUnread bool
// contains filtered or unexported fields
}
func (*NoteEntry) Content ¶
func (ne *NoteEntry) Content() EntryContent
func (*NoteEntry) From ¶
func (ne *NoteEntry) From() *FurAffinityUser
func (*NoteEntry) HasContent ¶
func (*NoteEntry) SetContent ¶
func (ne *NoteEntry) SetContent(ec EntryContent)
type SubmissionContent ¶
type SubmissionContent struct {
// contains filtered or unexported fields
}
type SubmissionData ¶
type SubmissionDataMap ¶
type SubmissionDataMap map[uint]*SubmissionData
type SubmissionEntry ¶
type SubmissionEntry struct {
// contains filtered or unexported fields
}
func (*SubmissionEntry) BlockedReasons ¶
func (se *SubmissionEntry) BlockedReasons() dsext.Set[string]
func (*SubmissionEntry) Content ¶
func (se *SubmissionEntry) Content() *SubmissionContent
func (*SubmissionEntry) Date ¶
func (se *SubmissionEntry) Date() time.Time
Date returns the creation date of the submission. If no content is available, this is not the exact time but the time acquired from the whole block of the submission page.
func (*SubmissionEntry) Description ¶
func (se *SubmissionEntry) Description() string
func (*SubmissionEntry) EntryType ¶
func (se *SubmissionEntry) EntryType() entries.EntryType
func (*SubmissionEntry) From ¶
func (se *SubmissionEntry) From() *FurAffinityUser
func (*SubmissionEntry) FullView ¶
func (se *SubmissionEntry) FullView() *url.URL
func (*SubmissionEntry) HasContent ¶
func (se *SubmissionEntry) HasContent() bool
func (*SubmissionEntry) ID ¶
func (se *SubmissionEntry) ID() uint
func (*SubmissionEntry) IsBlocked ¶
func (se *SubmissionEntry) IsBlocked() bool
func (*SubmissionEntry) Link ¶
func (se *SubmissionEntry) Link() *url.URL
func (*SubmissionEntry) Rating ¶
func (se *SubmissionEntry) Rating() Rating
func (*SubmissionEntry) SetContent ¶
func (se *SubmissionEntry) SetContent(content *SubmissionContent)
func (*SubmissionEntry) SubmissionData ¶
func (se *SubmissionEntry) SubmissionData() *SubmissionData
func (*SubmissionEntry) Thumbnail ¶
func (se *SubmissionEntry) Thumbnail() *tools.ThumbnailUrl
func (*SubmissionEntry) Title ¶
func (se *SubmissionEntry) Title() string
func (*SubmissionEntry) Type ¶
func (se *SubmissionEntry) Type() SubmissionType
type SubmissionType ¶
type SubmissionType uint8
const ( SubmissionTypeUnknown SubmissionType = iota SubmissionTypeImage SubmissionTypeText )
func (SubmissionType) String ¶
func (st SubmissionType) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.