Documentation
¶
Overview ¶
Package fileslice provides functions that return model FileSlices, which are multiple artifact records.
Index ¶
Constants ¶
View Source
const LastURI = _maxURI - 1
View Source
const StatsTTL = 10 * time.Minute // Stats time to live
Variables ¶
View Source
var ( ErrCategory = errors.New("fileslice: unknown artifacts categories") ErrPagi = errors.New("fileslice: pagination page and limit cannot be less than 1") )
Functions ¶
func FileInfo ¶
FileInfo is a helper function for Files that returns the page title, h1 title and lead text.
func Records ¶
func Records(ctx context.Context, exec boil.ContextExecutor, uri string, page, limit int) (models.FileSlice, error)
Records returns the records for the artifacts category URI. Note that the record statistics and counts get cached.
func RecordsSub ¶
RecordsSub returns the records for the artifacts category URI.
Types ¶
type Era ¶
type Era struct {
Name string
MinYear int // MinYear is the earliest or founding year
MaxYear int // MaxYear is the most recent or final year
}
Era is used to provide sorted statistics for artifact categories.
type Stats ¶
type Stats struct {
Record model.Artifacts
Ansi model.Ansi
AnsiBBS model.AnsiBBS
BBS model.BBS
BBSText model.BBSText
BBStro model.BBStro
Console model.Console
Demoscene model.Demoscene
MsDos model.MsDos
Intro model.Intro
IntroD model.IntroMsDos
IntroW model.IntroWindows
Installer model.Installer
Java model.Java
Linux model.Linux
Magazine model.Magazine
Macos model.Macos
Nfo model.Nfo
NfoTool model.NfoTool
Proof model.Proof
Script model.Script
Text model.Text
Windows model.Windows
}
Stats are the database statistics for the artifacts categories.
func Statistics ¶
func Statistics() Stats
Statistics returns the empty database statistics for the artifacts categories.
Click to show internal directories.
Click to hide internal directories.