imageboard

package
v0.0.0-...-921f456 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CHANGO_POST_QUOTE_FORMAT = "<a class=\"quote-link\" onClick=\"goToReply(%s)\">&gt;&gt;%s</a>"
View Source
var CHANGO_POST_QUOTE_FORMAT_OP = "<a class=\"quote-link\" onClick=\"goToReply(%s)\">&gt;&gt;%s(OP)</a>"

Functions

This section is empty.

Types

type Board

type Board interface {
	GetAcronym() string
	GetTitle() string
	IsWorksafe() bool
	GetThreads() *u.OrderedMap[int, Thread]
	RemoveThread(number int) bool
}

type ConfigItem

type ConfigItem struct {
	Name  string
	Value bool
}

type File

type File interface {
	GetFilename() string
	GetFilesize() int64
	GetWidth() int
	GetHeight() int
	GetTim() string
	GetExt() string
	GetCustomSpoiler() int32
	IsSpoiler() bool
	IsDeleted() bool
}

type Imageboard

type Imageboard interface {
	Initialize()
	GetImageURL(boardAcronym string, tim string, ext string) string
	GetThreadURI(b Board, threadNumber int) string
	GetCatalogURI(b Board) string
	GetSpoilerURI() string
	GetDeletedURI() string
	GetName() string
	GetThumbnailURL(boardAcronym string, tim string, ext string) string
	GetConfigurations() *ImageboardConfigurations
	GetBoards() *u.OrderedMap[string, Board]
	SetBoards(boardMap *u.OrderedMap[string, Board])
	SetMyBoards(boardMap *u.OrderedMap[string, Board])
	GetMyBoards() *u.OrderedMap[string, Board]
	RequestBoards() ([]Board, error)
	RequestCatalog(board Board) (*u.OrderedMap[int, Thread], error)
	RequestPosts(b Board, threadNumber int) (Thread, error)
}

type ImageboardConfigurations

type ImageboardConfigurations struct {
	MainAddress    string
	SpoilerAddress string
	ImageAddress   string
	AddressSFW     string
	AddressNSFW    string
	Configurations []ConfigItem
}

func (ImageboardConfigurations) GetAddressNSFW

func (i ImageboardConfigurations) GetAddressNSFW() string

func (ImageboardConfigurations) GetAddressSFW

func (i ImageboardConfigurations) GetAddressSFW() string

func (ImageboardConfigurations) GetConfigurations

func (i ImageboardConfigurations) GetConfigurations() []ConfigItem

func (ImageboardConfigurations) GetImageAddress

func (i ImageboardConfigurations) GetImageAddress() string

func (ImageboardConfigurations) GetMainAddress

func (i ImageboardConfigurations) GetMainAddress() string

func (ImageboardConfigurations) GetSpoilerAddress

func (i ImageboardConfigurations) GetSpoilerAddress() string

type Post

type Post interface {
	GetNumber() int
	GetTime() int64
	HasFiles() bool
	IsOP() bool
	GetSubject() string
	GetName() string
	GetUserId() string
	GetIdBackgroundColor() u.Color
	GetIdTextColor() u.Color
	GetNumPosts() int
	GetNumReplies() int
	GetQuotedBy() []int
	GetRawComment() string
	SetRawComment(comment string)
	SetIdBackgroundColor(color u.Color)
	SetIdTextColor(color u.Color)
	SetRepliedTo(posts []int)
	GetRepliedTo() []int
	SetQuotedBy(posts []int)
	SetNumPosts(numPosts int)
	IsEmbed() bool
	GetEmbed() string
	GetTrip() string
	GetFiles() []File
}

type Thread

type Thread interface {
	IsSticky() bool
	IsClosed() bool
	GetNumber() int
	GetSubject() string
	GetSanitizedComment() string
	GetPosts() *u.OrderedMap[int, Post]
	IsEmbed() bool
	GetEmbed() string
	GetTrip() string
	GetFiles() []File
	HasFiles() bool
	GetTotalReplies() int
	GetTotalImages() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL