Documentation ¶
Index ¶
- Constants
- Variables
- func AliasTags(fromStr, toStr string) loggingAction
- func AlterManyPostTags(pids []int, addStr, remStr string, delim rune) loggingAction
- func AlterPostTags(postID int, tagstr, tagdiff string) loggingAction
- func Archive(id string) *archive
- func AssignDuplicates(dupe Dupe, user user.User) error
- func CalculateChecksums() error
- func Close() error
- func Counter() int
- func CreateChapter(comicID, order int, title string) loggingAction
- func CreateComic(title string, retid *int) loggingAction
- func CreateComicPage(chapterID, postID, page int) loggingAction
- func DeleteChapter(chapterID int, comicID *int) loggingAction
- func DeleteComic(comicID int) loggingAction
- func DeleteComicPage(pageID int) loggingAction
- func DeleteComment(id int) error
- func DnsMapTag(creatorID int, tagstr string) error
- func DnsNewBanner(file io.ReadSeeker, creatorID int, bannerType string) error
- func DuplicateReportCleanup() (int64, error)
- func EditChapter(chapterID, order int, title string) loggingAction
- func EditComic(comicID int, title string) loggingAction
- func EditComicPage(pageID, chapterID, postID, page int) loggingAction
- func GenPhash() error
- func GenerateFileDimensions()
- func GenerateFileSizes() error
- func GeneratePears() error
- func GeneratePearsTx(tx *sql.Tx) error
- func GenerateThumbnail(postID int) error
- func GenerateThumbnails(size int)
- func GetTotalPosts() int
- func HasVoted(userID user.ID, postID int) (bool, error)
- func InitDir()
- func MigrateStore(start int)
- func MimeIDsFromType(mslice []string) []int
- func ParentTags(childStr, parentStr string) loggingAction
- func PluckApple(dupe Dupe) error
- func PostAddMetaData(postID int, metaStr string) ([]loggingAction, error)
- func PostChangeDescription(postID int, newDescr string) loggingAction
- func PostRemoveMetaData(postID int, metaDataStrings []string) ([]loggingAction, error)
- func ProcessDupReport(reportID int) error
- func RecalculateAppletree() error
- func RegisterPostView(postID int)
- func ReportDuplicates(dupe Dupe, reporter user.User, note string, repT reportType) error
- func Root() string
- func SetAlts(posts []int) loggingAction
- func Setup(iApi string)
- func ShiftChapterPages(chapterID, shiftBy, symbol, page int) loggingAction
- func SplitAlts(posts []int) loggingAction
- func UnaliasTags(fromStr string) loggingAction
- func UnparentTags(childStr, parentStr string) loggingAction
- func UpdateTombstone(filep string) error
- func UpdateUserFlags(newFlag, oldFlag int) error
- func UpgradePostCids()
- func VerifyFileIntegrity(start int) error
- type AppleTree
- type Chapter
- type Comic
- type ComicPage
- type Comics
- type Comment
- type CommentCollector
- type Config
- type Dimension
- type DnsCreator
- type DnsDomain
- type DnsTag
- type DupReport
- type Dupe
- type DupeConflict
- type DupeReportStats
- type ErrorTag
- type Log
- type LogCategory
- type LogSearchOptions
- type MetaData
- type Mime
- type Namespace
- type Pool
- type PoolMapping
- type Post
- func CachedPost(p *Post) *Post
- func CreatePost(file io.ReadSeeker, user user.User, ud UploadData) (*Post, error)
- func GetPostFromCID(cid string) (*Post, error)
- func GetPostFromHash(fnc, hash string) (*Post, error)
- func ImageLookup(file io.ReadSeeker, distance int) ([]*Post, error)
- func NewPost() *Post
- func RecentUploads(userID user.ID) ([]Post, error)
- func RecentVotes(userID user.ID) ([]Post, error)
- func (p *Post) BindField(sel *sqlbinder.Selection, field sqlbinder.Field)
- func (p Post) ClosestThumbnail(size int) (ret string)
- func (p *Post) Comments(q querier) ([]PostComment, error)
- func (p *Post) Delete() error
- func (p *Post) Duplicates(q querier) (Dupe, error)
- func (p *Post) FindSimilar(q querier, dist int, removed bool) ([]*Post, error)
- func (p *Post) NewComment() PostComment
- func (p *Post) QAlts(q querier, fields ...sqlbinder.Field) error
- func (p *Post) QMul(q querier, fields ...sqlbinder.Field) error
- func (p *Post) QTagHistoryCount(q querier) (int, error)
- func (p *Post) QThumbs(q querier, fields ...sqlbinder.Field) error
- func (p *Post) Reinstate(q querier) error
- func (p *Post) Remove(q querier) error
- func (p *Post) SetID(q querier, id int) error
- func (p *Post) SizePretty() string
- func (p Post) Tags() ([]Tag, error)
- func (p Post) Thumbnails() []Thumb
- func (p *Post) Vote(q querier, u user.User) error
- type PostCollector
- type PostComment
- type ProgressState
- type Report
- type SearchOptions
- type SearchResult
- type Tag
- func (t Tag) Aliasing() (to *Tag, from []Tag, err error)
- func (t Tag) EditString() string
- func (t Tag) Escaped() string
- func (t Tag) Family() (children, parents, grandChildren, grandParents []Tag, err error)
- func (a Tag) Less(b Tag) bool
- func (t *Tag) Rebind(sel *sqlbinder.Selection, field sqlbinder.Field)
- func (t Tag) String() string
- type TagsResult
- type Thumb
- type Tombstone
- type UploadData
- type UserActions
Constants ¶
View Source
const ( Sqlite3Timestamp = "2006-01-02 15:04:05" Fsqlite3Timestamp = "2006-01-02T15:04:05Z" )
View Source
const ( RDupe reportType = iota RNonDupe )
View Source
const ( PFID sqlbinder.Field = iota PFCid PFThumbnails PFMime PFRemoved PFDeleted PFSize PFDimension PFScore PFTimestamp PFChecksums PFAlts PFAltGroup PFDescription PFTombstone PFMetaData )
View Source
const ( FID sqlbinder.Field = iota FTag FCount FNamespace )
Variables ¶
View Source
var DB *sql.DB
View Source
var Mimes []*Mime
Functions ¶
func AlterManyPostTags ¶
func AlterPostTags ¶
Add and remove tags from a post performing related parent/alias lookups and producing a log
func CalculateChecksums ¶
func CalculateChecksums() error
func CreateChapter ¶
func CreateComic ¶
func CreateComicPage ¶
func CreateComicPage(chapterID, postID, page int) loggingAction
func DeleteChapter ¶
func DeleteComic ¶
func DeleteComic(comicID int) loggingAction
func DeleteComicPage ¶
func DeleteComicPage(pageID int) loggingAction
func DeleteComment ¶
func DnsNewBanner ¶
func DnsNewBanner(file io.ReadSeeker, creatorID int, bannerType string) error
func DuplicateReportCleanup ¶
Cleanup non apple-tree reports
func EditChapter ¶
func EditComicPage ¶
func EditComicPage(pageID, chapterID, postID, page int) loggingAction
func GenerateFileDimensions ¶
func GenerateFileDimensions()
func GenerateFileSizes ¶
func GenerateFileSizes() error
func GeneratePears ¶
func GeneratePears() error
func GeneratePearsTx ¶
func GenerateThumbnail ¶
func GenerateThumbnails ¶
func GenerateThumbnails(size int)
func GetTotalPosts ¶
func GetTotalPosts() int
func MigrateStore ¶
func MigrateStore(start int)
func MimeIDsFromType ¶
func ParentTags ¶
func ParentTags(childStr, parentStr string) loggingAction
func PluckApple ¶
func PostAddMetaData ¶
func PostChangeDescription ¶
func PostRemoveMetaData ¶
func ProcessDupReport ¶
func RegisterPostView ¶
func RegisterPostView(postID int)
func ReportDuplicates ¶
func ShiftChapterPages ¶
func ShiftChapterPages(chapterID, shiftBy, symbol, page int) loggingAction
func SplitAlts ¶
func SplitAlts(posts []int) loggingAction
Split the altgroup into two separate groups one with the supplied post ids the other with the remaining alts
func UnaliasTags ¶
func UnaliasTags(fromStr string) loggingAction
func UnparentTags ¶
func UnparentTags(childStr, parentStr string) loggingAction
func UpdateTombstone ¶
func UpdateUserFlags ¶
func UpgradePostCids ¶
func UpgradePostCids()
func VerifyFileIntegrity ¶
Types ¶
type Chapter ¶
func GetPostChapters ¶
type Comic ¶
type Comic struct { ID int Title string FrontPage *Post Chapters []*Chapter PageCount int TagSummary []Tag }
func (*Comic) ChapterIndex ¶
type Comment ¶
type Comment struct { ID int User user.User Text string CompiledText string Time timestamp.Timestamp }
func CommentByID ¶
type CommentCollector ¶
type CommentCollector struct {
Comments []Comment
}
CommentModel is used to retriev and save comments
type Config ¶
type Config struct { //Database string ConnectionString string StdUserFlag flag.Flag Store string MFSRootDir string ThumbnailFormat string ThumbnailSizes []uint ThumbnailQuality int }
var CFG *Config
type DnsCreator ¶
type DnsCreator struct { Id int Name string Score int Tags []DnsTag LocalTags []Tag Domains map[string]DnsDomain Banners map[string]string }
func DnsGetCreatorFromTag ¶
func DnsGetCreatorFromTag(tagId int) (DnsCreator, error)
func DnsSpotlight ¶
func DnsSpotlight() (*DnsCreator, error)
func GetDnsCreator ¶
func GetDnsCreator(id int) (c DnsCreator, err error)
func ListDnsCreators ¶
func ListDnsCreators(limit, offset int) ([]DnsCreator, error)
type DupReport ¶
type DupReport struct { ID int ReportType reportType Reporter user.User Note string Approved timestamp.Timestamp Timestamp timestamp.Timestamp Dupe Dupe }
func FetchDupReport ¶
func FetchDupReports ¶
type DupeConflict ¶
type DupeConflict struct {
// contains filtered or unexported fields
}
func (DupeConflict) Error ¶
func (d DupeConflict) Error() string
type DupeReportStats ¶
type DupeReportStats struct { Average duration Total int }
func GetDupeReportDelay ¶
func GetDupeReportDelay() (report DupeReportStats, err error)
type Log ¶
type Log struct { ID int User user.User Timestamp timestamp.Timestamp // Post logs Posts postHistoryMap // Alts Alts []logAlts // Duplicates Duplicates logDuplicates // Alias Aliases logAliasMap // Parents Parents logParent // Multi tags MultiTags map[lAction][]logMultiTags // Comics Comic logComic Chapters []logChapter ComicPages []logComicPage }
func SearchLogs ¶
func SearchLogs(opts LogSearchOptions) ([]Log, int, error)
type LogCategory ¶
type LogCategory int
const ( LogNoCat LogCategory = iota LogCatPost LogCatComic LogCatChapter LogCatComicPage )
type LogSearchOptions ¶
type Pool ¶
type Pool struct { pool.Pool Posts []PoolMapping }
func PoolFromID ¶
Until posts refactor
func (*Pool) PostsLimit ¶
func (p *Pool) PostsLimit(limit int) []PoolMapping
type PoolMapping ¶
type Post ¶
type Post struct { ID int Cid string Mime *Mime Removed bool Deleted bool Size int64 Dimension Dimension Score float64 Timestamp timestamp.Timestamp Checksums checksums AltGroup int Alts []*Post MetaData metaDataMap Tombstone Tombstone Description string // contains filtered or unexported fields }
func CachedPost ¶
func CreatePost ¶
func CreatePost(file io.ReadSeeker, user user.User, ud UploadData) (*Post, error)
func GetPostFromCID ¶
func GetPostFromHash ¶
func ImageLookup ¶
func ImageLookup(file io.ReadSeeker, distance int) ([]*Post, error)
func (Post) ClosestThumbnail ¶
func (*Post) Comments ¶
func (p *Post) Comments(q querier) ([]PostComment, error)
func (*Post) Duplicates ¶
func (*Post) FindSimilar ¶
func (*Post) NewComment ¶
func (p *Post) NewComment() PostComment
func (*Post) QTagHistoryCount ¶
func (*Post) SizePretty ¶
func (Post) Thumbnails ¶
type PostCollector ¶
type PostCollector struct { TotalPosts int // contains filtered or unexported fields }
func CachedPostCollector ¶
func CachedPostCollector(pc *PostCollector) *PostCollector
func NewPostCollector ¶
func NewPostCollector() *PostCollector
func (*PostCollector) ArchiveSearch ¶
func (pc *PostCollector) ArchiveSearch() (*archive, error)
func (*PostCollector) Get ¶
func (pc *PostCollector) Get(opts SearchOptions) error
func (*PostCollector) Search2 ¶
func (pc *PostCollector) Search2(limit, offset int) (SearchResult, error)
func (*PostCollector) Tags ¶
func (pc *PostCollector) Tags(maxTags int) []Tag
type PostComment ¶
func (*PostComment) Save ¶
func (pc *PostComment) Save(q querier) error
Save a new comment on a post
type ProgressState ¶
type Report ¶
func GetReports ¶
type SearchOptions ¶
type SearchResult ¶
type SearchResult []resultSet
type Tag ¶
func (Tag) EditString ¶
type TagsResult ¶
func SearchTags ¶
func SearchTags(tagstr string, limit, offset int) (TagsResult, error)
type UploadData ¶
type UserActions ¶
type UserActions struct {
// contains filtered or unexported fields
}
func UserAction ¶
func UserAction(user user.User) *UserActions
func (*UserActions) Add ¶
func (a *UserActions) Add(l ...loggingAction)
func (UserActions) Exec ¶
func (a UserActions) Exec() error
Source Files ¶
- alias.go
- alts.go
- alts_log.go
- archive.go
- archive_templates.go
- bbcode.go
- chapter.go
- chapter_log.go
- checksum.go
- comic.go
- comic_chapter.go
- comic_log.go
- comic_page.go
- comic_page_log.go
- comic_post.go
- comics.go
- comics_log.go
- comments.go
- counter.go
- datamanager.go
- diff.go
- dns.go
- dupgen.go
- duplicate-reports.go
- duplicates.go
- duplicates_log.go
- error.go
- ipfs.go
- log.go
- logs.go
- metadata.go
- mime.go
- parent.go
- pools.go
- post_search.go
- post_tags.go
- post_views.go
- posts.go
- posts_log.go
- posts_modify.go
- querier.go
- report.go
- root.go
- strsep.go
- tag_log.go
- tag_set.go
- tag_set_q.go
- tags.go
- thumbnail.go
- tombstone.go
- tools.go
- user_posts.go
Click to show internal directories.
Click to hide internal directories.