Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Banners by board stored in memory Banners = BannerStore{ // contains filtered or unexported fields } )
View Source
var Loading = FileStore{ // contains filtered or unexported fields }
Loading stores board-specific loading images
Functions ¶
func WatchVideoDir ¶
func WatchVideoDir()
WatchVideoDir watches the www/videos directory for changes.
Types ¶
type BannerStore ¶
type BannerStore struct {
// contains filtered or unexported fields
}
BannerStore stores multiple files by board in memory
func (*BannerStore) FileTypes ¶
func (s *BannerStore) FileTypes(board string) []uint16
FileTypes returns file types of banners for a specific board
func (*BannerStore) Get ¶
func (s *BannerStore) Get(board string, id int) (file File, ok bool)
Get returns the banner specified by board and ID. If none found, ok == false. file should not be mutted.
func (*BannerStore) Random ¶
func (s *BannerStore) Random(board string) (int, string, bool)
Random returns a random banner for the board. If none found, ok == false.
func (*BannerStore) Set ¶
func (s *BannerStore) Set(board string, files []File)
Set files stored for a certain board. Technically deleting a board would leak memory, but it's so rare and little.
Click to show internal directories.
Click to hide internal directories.