Documentation ¶
Overview ¶
Package model provides a database model for the Defacto2 website.
Index ¶
- Constants
- Variables
- func ByForApproval(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func CategoryByteSum(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)
- func CategoryCount(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)
- func ClassificationCount(ctx context.Context, exec boil.ContextExecutor, section, platform string) (int64, error)
- func Counts(ctx context.Context, exec boil.ContextExecutor) (int64, int64, int64, error)
- func DeleteOne(ctx context.Context, exec boil.ContextExecutor, key int64) error
- func DemozooExists(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, error)
- func HashExists(ctx context.Context, exec boil.ContextExecutor, hash string) (bool, error)
- func InsertDemozoo(ctx context.Context, exec boil.ContextExecutor, id int64) (int64, string, error)
- func InsertPouet(ctx context.Context, exec boil.ContextExecutor, id int64) (int64, string, error)
- func InsertUpload(ctx context.Context, tx *sql.Tx, values url.Values, key string) (int64, uuid.UUID, error)
- func JsDosBinary(f *models.File) (string, error)
- func JsDosCommand(f *models.File) (string, error)
- func JsDosConfig(f *models.File) (string, error)
- func NewV7() (time.Time, uuid.UUID, error)
- func One(ctx context.Context, exec boil.ContextExecutor, deleted bool, key int) (*models.File, error)
- func OneByUUID(ctx context.Context, exec boil.ContextExecutor, deleted bool, uid string) (*models.File, error)
- func OneDemozoo(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, int64, error)
- func OneEditByKey(ctx context.Context, exec boil.ContextExecutor, key string) (*models.File, error)
- func OneFile(ctx context.Context, exec boil.ContextExecutor, id int64) (*models.File, error)
- func OneFileByKey(ctx context.Context, exec boil.ContextExecutor, key string) (*models.File, error)
- func OnePouet(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, int64, error)
- func PlatformByteSum(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)
- func PlatformCount(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)
- func PouetExists(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, error)
- func ReleaserByteSum(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)
- func SHA384Exists(ctx context.Context, exec boil.ContextExecutor, sha384 []byte) (bool, error)
- func UUIDExists(ctx context.Context, exec boil.ContextExecutor, uuid string) (bool, error)
- func Update16Colors(db *sql.DB, id int64, val string) error
- func UpdateBoolFrom(db *sql.DB, column boolFrom, id int64, val bool) error
- func UpdateClassification(db *sql.DB, id int64, platform, tag string) error
- func UpdateComment(db *sql.DB, id int64, val string) error
- func UpdateCreatorAudio(db *sql.DB, id int64, val string) error
- func UpdateCreatorIll(db *sql.DB, id int64, val string) error
- func UpdateCreatorProg(db *sql.DB, id int64, val string) error
- func UpdateCreatorText(db *sql.DB, id int64, val string) error
- func UpdateCreators(db *sql.DB, id int64, text, ill, prog, audio string) error
- func UpdateDateIssued(db *sql.DB, id int64, y, m, d string) error
- func UpdateDemozoo(db *sql.DB, id int64, val string) error
- func UpdateEmulateBroken(db *sql.DB, id int64, val bool) error
- func UpdateEmulateCPU(db *sql.DB, id int64, val string) error
- func UpdateEmulateEMS(db *sql.DB, id int64, val bool) error
- func UpdateEmulateMachine(db *sql.DB, id int64, val string) error
- func UpdateEmulateRunProgram(db *sql.DB, id int64, val string) error
- func UpdateEmulateSfx(db *sql.DB, id int64, val string) error
- func UpdateEmulateUMB(db *sql.DB, id int64, val bool) error
- func UpdateEmulateXMS(db *sql.DB, id int64, val bool) error
- func UpdateFilename(db *sql.DB, id int64, val string) error
- func UpdateGitHub(db *sql.DB, id int64, val string) error
- func UpdateInt64From(db *sql.DB, column int64From, id int64, val string) error
- func UpdateLinks(db *sql.DB, id int64, youtube, colors16, github, relations, sites string, ...) error
- func UpdateMagic(ctx context.Context, exec boil.ContextExecutor, id int64, magic string) error
- func UpdateOffline(db *sql.DB, id int64) error
- func UpdateOnline(db *sql.DB, id int64) error
- func UpdatePlatform(db *sql.DB, id int64, val string) error
- func UpdatePouet(db *sql.DB, id int64, val string) error
- func UpdateRelations(db *sql.DB, id int64, val string) error
- func UpdateReleasers(db *sql.DB, id int64, val string) error
- func UpdateSites(db *sql.DB, id int64, val string) error
- func UpdateStringFrom(db *sql.DB, column stringFrom, id int64, val string) error
- func UpdateTag(db *sql.DB, id int64, val string) error
- func UpdateTitle(db *sql.DB, id int64, val string) error
- func UpdateVirusTotal(db *sql.DB, id int64, val string) error
- func UpdateYMD(ctx context.Context, exec boil.ContextExecutor, id int64, y, m, d null.Int16) error
- func UpdateYouTube(db *sql.DB, id int64, val string) error
- func ValidD(d int16) null.Int16
- func ValidDateIssue(y, m, d string) (null.Int16, null.Int16, null.Int16)
- func ValidFilename(s string) null.String
- func ValidFilesize(size string) (null.Int64, error)
- func ValidIntegrity(integrity string) null.String
- func ValidLastMod(lastmod string) null.Time
- func ValidM(m int16) null.Int16
- func ValidMagic(mediatype string) null.String
- func ValidPlatform(platform string) null.String
- func ValidReleasers(s1, s2 string) (null.String, null.String)
- func ValidSceners(s string) null.String
- func ValidSection(section string) null.String
- func ValidString(s string) null.String
- func ValidTitle(s string) null.String
- func ValidY(y int16) null.Int16
- func ValidYouTube(s string) (null.String, error)
- func Validate(art *models.File) error
- type Advert
- type Announcement
- type Ansi
- type AnsiBBS
- type AnsiBrand
- type AnsiFTP
- type AnsiNfo
- type AnsiPack
- type Artifacts
- func (f *Artifacts) ByHidden(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) ByKey(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) ByMagicErr(ctx context.Context, exec boil.ContextExecutor, binaryData bool) (models.FileSlice, error)
- func (f *Artifacts) ByNewest(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) ByOldest(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) ByTextPlatform(ctx context.Context, exec boil.ContextExecutor) (models.FileSlice, error)
- func (f *Artifacts) ByUnwanted(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) ByUpdated(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (models.FileSlice, error)
- func (f *Artifacts) Description(ctx context.Context, exec boil.ContextExecutor, terms []string) (models.FileSlice, error)
- func (f *Artifacts) Filename(ctx context.Context, exec boil.ContextExecutor, terms []string) (models.FileSlice, error)
- func (f *Artifacts) ID(ctx context.Context, exec boil.ContextExecutor, ids []int, uuids ...uuid.UUID) (models.FileSlice, error)
- func (f *Artifacts) Public(ctx context.Context, exec boil.ContextExecutor) error
- type BBS
- type BBSImage
- type BBSText
- type BBStro
- type Database
- type Demoscene
- type Drama
- type FTP
- type FileUpload
- type HTML
- type Hack
- type HowTo
- type Image
- type ImagePack
- type Installer
- type Intro
- type IntroMsDos
- type IntroWindows
- type Java
- type JobAdvert
- type Linux
- type Macos
- type Magazine
- type MsDos
- type MsDosPack
- type Music
- type NewsArticle
- type Nfo
- type NfoTool
- type OrderBy
- type PDF
- type Proof
- type Releaser
- type ReleaserName
- type ReleaserNames
- type Releasers
- func (r *Releasers) BBS(ctx context.Context, exec boil.ContextExecutor, order OrderBy) error
- func (r *Releasers) FTP(ctx context.Context, exec boil.ContextExecutor) error
- func (r *Releasers) Limit(ctx context.Context, exec boil.ContextExecutor, order OrderBy, limit, page int) error
- func (r *Releasers) Magazine(ctx context.Context, exec boil.ContextExecutor) error
- func (r *Releasers) MagazineAZ(ctx context.Context, exec boil.ContextExecutor) error
- func (r *Releasers) Similar(ctx context.Context, exec boil.ContextExecutor, limit uint, names ...string) error
- func (r *Releasers) SimilarMagazine(ctx context.Context, exec boil.ContextExecutor, limit uint, names ...string) error
- func (r *Releasers) Slugs()
- func (r *Releasers) String() string
- func (r *Releasers) Where(ctx context.Context, exec boil.ContextExecutor, name string) (models.FileSlice, error)
- type Restrict
- type Scener
- type Sceners
- func (s *Sceners) Artist(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Sceners) Coder(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Sceners) Distinct(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Sceners) Musician(ctx context.Context, exec boil.ContextExecutor) error
- func (s Sceners) Sort() []string
- func (s *Sceners) Writer(ctx context.Context, exec boil.ContextExecutor) error
- type Script
- type Standard
- type StatFunc
- type Summary
- func (s *Summary) ByDescription(ctx context.Context, exec boil.ContextExecutor, terms []string) error
- func (s *Summary) ByFilename(ctx context.Context, exec boil.ContextExecutor, terms []string) error
- func (s *Summary) ByForApproval(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Summary) ByHidden(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Summary) ByMatch(ctx context.Context, exec boil.ContextExecutor, uri string) error
- func (s *Summary) ByPublic(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Summary) ByReleaser(ctx context.Context, exec boil.ContextExecutor, name string) error
- func (s *Summary) ByScener(ctx context.Context, exec boil.ContextExecutor, name string) error
- func (s *Summary) ByUnwanted(ctx context.Context, exec boil.ContextExecutor) error
- func (s *Summary) Matches() map[string]StatFunc
- func (s *Summary) Update(c, b, y0, y1 int)
- type Takedown
- type Text
- type TextAmiga
- type TextApple2
- type TextAtariST
- type TextPack
- type Tool
- type TrialCrackme
- type Video
- type Windows
- type WindowsPack
Constants ¶
const ( ShortLimit = 100 // ShortLimit is the maximum length of a short string. LongFilename = 255 // LongFilename is the maximum length of a filename. )
const ClauseNoSoftDel = "deletedat IS NULL"
ClauseNoSoftDel is the clause to exclude soft deleted records.
const ClauseOldDate = "date_issued_year ASC NULLS LAST, " +
"date_issued_month ASC NULLS LAST, " +
"date_issued_day ASC NULLS LAST"
ClauseOldDate orders the records by oldest date first.
const (
DemozooSanity = 450000 // Sanity is to check the maximum permitted production ID.
)
const EpochYear = 1980
EpochYear is the epoch year for the website, ie. the year 0 of the MS-DOS era.
const From = "files"
From is the name of the table containing records of files.
const Maximum = 998
Maximum number of files to return per query.
Variables ¶
var ( ErrColumn = errors.New("column not implemented") ErrDay = errors.New("invalid day") ErrDB = errors.New("database value is nil") ErrID = errors.New("file download database id cannot be found") ErrKey = errors.New("key value is zero or negative") ErrModel = errors.New("error, no file model") ErrMonth = errors.New("invalid month") ErrName = errors.New("name value is empty") ErrOrderBy = errors.New("order by value is invalid") ErrSize = errors.New("size value is invalid") ErrRels = errors.New("too many releasers, only two are allowed") ErrPlatform = errors.New("invalid platform") ErrSha384 = errors.New("sha384 value is invalid") ErrTime = errors.New("time value is invalid") ErrTx = errors.New("transaction value is nil") ErrURI = errors.New("uri value is invalid") ErrUUID = errors.New("could not create a new universial unique identifier") ErrYear = errors.New("invalid year") )
var ( ErrCPU = errors.New("emulate-cpu value must be one of auto, 8086, 386, 486") ErrMachine = errors.New("emulate-machine value must be one of auto, " + "cga, ega, vga, tandy, nolfb, et3000, paradise, et4000, oldvbe") ErrSfx = errors.New("emulate-sfx value must be one of auto, covox, sb1, sb16, gus, pcspeaker, none") )
var ( ErrTag = errors.New("category tag or section is missing") ErrTagInvalid = errors.New("category tag or section is invalid") ErrOS = errors.New("operating system or platform is missing") ErrOSInvalid = errors.New("operating system or platform is invalid") ErrFile = errors.New("the filename is missing") ErrRel = errors.New("at least one releaser is required") ErrMag = errors.New("a magazine requires an issue number or a title") )
Functions ¶
func ByForApproval ¶ added in v1.2.9
func ByForApproval(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByForApproval returns all of the file records that are waiting to be marked for approval.
This should not bind values to Artifacts struct as it can fail with a scan error due to unapproved files missing bytes and minyear/maxyear values.
func CategoryByteSum ¶
CategoryByteSum sums the byte file sizes for all the files that match the named category.
func CategoryCount ¶
CategoryCount counts the files that match the named category.
func ClassificationCount ¶
func ClassificationCount(ctx context.Context, exec boil.ContextExecutor, section, platform string) (int64, error)
ClassificationCount counts the files that match the named category and platform.
func Counts ¶ added in v0.8.0
Counts returns the total numbers of artifact records. The first result is the total number of public, the second is the number of non-public records. The final number is the number of new uploads waiting for approval.
func DeleteOne ¶ added in v0.8.0
One retrieves a single file record from the database using the record key. This function can return records that have been marked as deleted.
func DemozooExists ¶
DemozooExists returns true if the file record exists in the database using a Demozoo production ID. This function will also return true for records that have been marked as deleted.
func HashExists ¶
HashExists returns true if the file record exists in the database using a SHA-384 hexadecimal hash.
func InsertDemozoo ¶
InsertDemozoo inserts a new file record into the database using a Demozoo production ID. This will not check if the Demozoo production ID already exists in the database. When successful the function will return the new record ID.
func InsertPouet ¶
InsertPouet inserts a new file record into the database using a Pouet production ID. This will not check if the Pouet production ID already exists in the database. When successful the function will return the new record ID.
func InsertUpload ¶
func InsertUpload(ctx context.Context, tx *sql.Tx, values url.Values, key string) (int64, uuid.UUID, error)
InsertUpload inserts a new file record into the database using a URL values map. This will not check if the file already exists in the database. Invalid values will be ignored, but will not prevent the record from being inserted. When successful the function will return the new record ID key and the UUID.
func JsDosBinary ¶
JsDosBinary returns the program executable to run in the js-dos emulator. If the filename is a .com or .exe then it will return the filename. Otherwise, it will attempt to find the most likely executable in the archive.
func JsDosCommand ¶ added in v0.10.0
JsDosCommand returns the program executable or commands to run in the js-dos emulator. If the dosee_run_program is set then it is the preferred executable. If the filename is a .com or .exe then it will return the filename. Otherwise, it will attempt to find the most likely executable in the archive.
func JsDosConfig ¶
JsDosConfig creates a js-dos .ini configuration for the emulator.
func NewV7 ¶
NewV7 generates a new UUID version 7, if that fails then it will fallback to version 1. It also returns the current time.
func One ¶
func One(ctx context.Context, exec boil.ContextExecutor, deleted bool, key int) (*models.File, error)
One retrieves a single file record from the database using the record key. This function can return records that have been marked as deleted.
func OneByUUID ¶
func OneByUUID(ctx context.Context, exec boil.ContextExecutor, deleted bool, uid string) (*models.File, error)
OneByUUID returns the record associated with the UUID key. Generally this method of retrieval is less efficient than using the numeric, record key ID.
func OneDemozoo ¶
OneDemozoo retrieves the ID or key of a single file record from the database using a Demozoo production ID. This function will also return records that have been marked as deleted and flag those with the boolean. If the record is not found then the function will return an ID of 0 but without an error.
func OneEditByKey ¶
OneEditByKey retrieves a single file record from the database using the obfuscated record key. This function will also return records that have been marked as deleted.
func OneFile ¶
OneFile retrieves a single file record from the database using the record key. This function will also return records that have been marked as deleted.
func OneFileByKey ¶
OneFileByKey retrieves a single file record from the database using the obfuscated record key.
func OnePouet ¶
OnePouet retrieves the ID or key of a single file record from the database using a Pouet production ID. This function will also return records that have been marked as deleted and flag those with the boolean. If the record is not found then the function will return an ID of 0 but without an error.
func PlatformByteSum ¶
PlatformByteSum sums the byte filesizes for all the files that match the category name.
func PlatformCount ¶
PlatformCount counts the files that match the named platform.
func PouetExists ¶
PouetExists returns true if the file record exists in the database using a Pouet production ID. This function will also return true for records that have been marked as deleted.
func ReleaserByteSum ¶
ReleaserByteSum sums the byte file sizes for all the files that match the group name.
func SHA384Exists ¶
SHA384Exists returns true if the file record exists in the database using a SHA-384 hash.
func UUIDExists ¶ added in v1.0.3
UUIDExists returns true if the file record exists in the database using a UUID.
func Update16Colors ¶
Update16Colors updates the WebID16colors column value with val.
func UpdateBoolFrom ¶ added in v0.10.0
UpdateBoolFrom updates the column bool from value with val. The boolFrom columns are table columns that can either be null, empty, or have a smallint value.
func UpdateClassification ¶
UpdateClassification updates the classification of a file in the database. It takes an ID, platform, and tag as parameters and returns an error if any. Both platform and tag must be valid values.
func UpdateComment ¶
UpdateComment updates the Comment column value with val.
func UpdateCreatorAudio ¶
UpdateCreatorAudio updates the CreditAudio column with val.
func UpdateCreatorIll ¶
UpdateCreatorIll updates the CreditIllustration column with val.
func UpdateCreatorProg ¶
UpdateCreatorProg updates the CreditProgram column with val.
func UpdateCreatorText ¶
UpdateCreatorText updates the CreditText column with val.
func UpdateCreators ¶
UpdateCreators updates the text, illustration, program, and audio credit columns with the values provided.
func UpdateDateIssued ¶
UpdateDateIssued updates the date issued year, month and day columns with the values provided. Columns updated are DateIssuedYear, DateIssuedMonth, and DateIssuedDay.
func UpdateDemozoo ¶
UpdateDemozoo updates the WebIDDemozoo column with val.
func UpdateEmulateBroken ¶ added in v0.10.0
UpdateEmulateBroken updates the column dosee_broken with val.
func UpdateEmulateCPU ¶ added in v0.10.0
func UpdateEmulateEMS ¶ added in v0.10.0
UpdateEmulateEMS updates the column dosee_no_ems with val.
func UpdateEmulateMachine ¶ added in v0.10.0
func UpdateEmulateRunProgram ¶ added in v0.10.0
func UpdateEmulateSfx ¶ added in v0.10.0
func UpdateEmulateUMB ¶ added in v0.10.0
UpdateEmulateUMB updates the column dosee_no_umb with val.
func UpdateEmulateXMS ¶ added in v0.10.0
UpdateEmulateXMS updates the column dosee_no_xms with val.
func UpdateFilename ¶
UpdateFilename updates the Filename column with val.
func UpdateGitHub ¶
UpdateGitHub updates the WebIDGithub column with val.
func UpdateInt64From ¶
UpdateInt64From updates the column int64 from value with val. The int64From columns are table columns that can either be null, empty, or have an int64 value. The demozooProd and pouetProd values are validated to be within a sane range and a zero value will set their column's to null.
func UpdateLinks ¶ added in v0.8.0
func UpdateLinks(db *sql.DB, id int64, youtube, colors16, github, relations, sites string, demozoo, pouet int64, ) error
UpdateLinks updates the youtube, 16colors, relations, sites, demozoo, and pouet columns with the values provided.
func UpdateMagic ¶ added in v0.10.0
UpdateMagic updates the file magictype (magic number) column with the magic value provided.
func UpdateOffline ¶
UpdateOffline updates the record to be offline and inaccessible to the public.
func UpdateOnline ¶
UpdateOnline updates the record to be online and public.
func UpdatePlatform ¶
UpdatePlatform updates the Platform column value with val.
func UpdatePouet ¶
UpdatePouet updates the WebIDPouet column with val.
func UpdateRelations ¶
UpdateRelations updates the ListRelations column value with val.
func UpdateReleasers ¶
UpdateReleasers updates the releasers values with val. Two releases can be separated by a + (plus) character. The columns updated are GroupBrandFor and GroupBrandBy.
func UpdateSites ¶
UpdateSites updates the ListLinks column with val.
func UpdateStringFrom ¶
UpdateStringFrom updates the column string from value with val. The stringFrom columns are table columns that can either be null, empty, or have a string value.
func UpdateTitle ¶
UpdateTitle updates the RecordTitle column with val.
func UpdateVirusTotal ¶
UpdateVirusTotal updates the FileSecurityAlertURL value with val.
func UpdateYMD ¶
UpdateYMD updates the date issued year, month and day columns with the values provided.
func UpdateYouTube ¶
UpdateYouTube updates the WebIDYoutube column value with val.
func ValidDateIssue ¶
func ValidDateIssue(y, m, d string) (null.Int16, null.Int16, null.Int16)
ValidDateIssue returns a valid year, month and day or a null value.
func ValidFilename ¶
func ValidFilename(s string) null.String
ValidFilename returns a valid filename or a null value. The filename is trimmed and shortened to the long filename limit.
func ValidFilesize ¶
ValidFilesize returns a valid file size or an error. The file size is parsed as an unsigned integer. An error is returned if the string cannot be parsed as an integer.
func ValidIntegrity ¶
func ValidIntegrity(integrity string) null.String
ValidIntegrity confirms the integrity as a valid SHA-384 hexadecimal hash or returns a null value.
func ValidLastMod ¶
func ValidLastMod(lastmod string) null.Time
ValidLastMod returns a valid last modified time or a null value. The lastmod time is parsed as a Unix time in milliseconds. An error is returned if the string cannot be parsed as an integer. The lastmod time is validated to be within the current year and the epoch year of 1980.
func ValidMagic ¶
func ValidMagic(mediatype string) null.String
ValidMagic returns a valid media type or a null value. It is validated using the mime package. The media type is trimmed and validated using the mime package.
func ValidPlatform ¶
func ValidPlatform(platform string) null.String
ValidPlatform returns a valid platform or a null value.
func ValidReleasers ¶
func ValidReleasers(s1, s2 string) (null.String, null.String)
ValidReleasers returns two valid releaser group strings or null values.
func ValidSceners ¶
func ValidSceners(s string) null.String
ValidSceners returns a valid sceners string or a null value.
func ValidSection ¶
func ValidSection(section string) null.String
ValidSection returns a valid section or a null value.
func ValidString ¶
func ValidString(s string) null.String
ValidString returns a valid string or a null value.
func ValidTitle ¶
func ValidTitle(s string) null.String
ValidTitle returns a valid title or a null value. The title is trimmed and shortened to the short limit.
func ValidYouTube ¶
ValidYouTube returns true if the string is a valid YouTube video ID. An error is only returned if the regular expression match cannot compile.
Types ¶
type Advert ¶
type Advert struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Advert is a the model for the for sale.
type Announcement ¶
type Announcement struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Announcement is a the model for the public and community announcements.
func (*Announcement) List ¶
func (a *Announcement) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*Announcement) Stat ¶
func (a *Announcement) Stat(ctx context.Context, exec boil.ContextExecutor) error
type Ansi ¶
type Ansi struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Ansi is a the model for the ANSI formatted text and art files.
type AnsiBBS ¶
type AnsiBBS struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
AnsiBBS is a the model for the BBS advertisements created in ANSI text.
type AnsiBrand ¶
type AnsiBrand struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
AnsiBrand is a the model for the brand logos created in ANSI text.
type AnsiFTP ¶
type AnsiFTP struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
AnsiFTP is a the model for the FTP advertisements created in ANSI text.
type AnsiNfo ¶
type AnsiNfo struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
AnsiNfo is a the model for the NFO files created in ANSI text.
type AnsiPack ¶
type AnsiPack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
AnsiPack is a the model for the ANSI file packs.
type Artifacts ¶
type Artifacts struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Artifacts contain statistics for every artifact.
func (*Artifacts) ByHidden ¶
func (f *Artifacts) ByHidden(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByHidden returns all of the file records that are hidden ~ soft deleted.
func (*Artifacts) ByKey ¶
func (f *Artifacts) ByKey(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByKey returns the public files reversed ordered by the ID, key column.
func (*Artifacts) ByMagicErr ¶ added in v0.10.0
func (f *Artifacts) ByMagicErr(ctx context.Context, exec boil.ContextExecutor, binaryData bool) ( models.FileSlice, error, )
ByMagicErr returns all of the file records that require new magic numbers.
func (*Artifacts) ByNewest ¶
func (f *Artifacts) ByNewest(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByNewest returns all of the file records sorted by the date issued.
func (*Artifacts) ByOldest ¶
func (f *Artifacts) ByOldest(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByOldest returns all of the file records sorted by the date issued.
func (*Artifacts) ByTextPlatform ¶ added in v0.10.0
func (f *Artifacts) ByTextPlatform(ctx context.Context, exec boil.ContextExecutor) ( models.FileSlice, error, )
ByTextPlatform returns all of the file records that are text based, either text or textamiga.
func (*Artifacts) ByUnwanted ¶
func (f *Artifacts) ByUnwanted(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByUnwanted returns all of the file records that are flagged by Google as unwanted.
func (*Artifacts) ByUpdated ¶
func (f *Artifacts) ByUpdated(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
ByUpdated returns all of the file records sorted by the date updated.
func (*Artifacts) Description ¶
func (f *Artifacts) Description(ctx context.Context, exec boil.ContextExecutor, terms []string) ( models.FileSlice, error, )
Description returns a list of files that match the search terms. The search terms are matched against the record_title column. The results are ordered by the filename column in ascending order.
func (*Artifacts) Filename ¶
func (f *Artifacts) Filename(ctx context.Context, exec boil.ContextExecutor, terms []string) ( models.FileSlice, error, )
Filename returns a list of files that match the search terms. The search terms are matched against the filename column. The results are ordered by the filename column in ascending order.
type BBS ¶
type BBS struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
BBS is a the model for the Bulletin Board System files.
type BBSImage ¶
type BBSImage struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
BBSImage is a the model for the Bulletin Board System image files.
type BBSText ¶
type BBSText struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
BBSText is a the model for the Bulletin Board System text files.
type BBStro ¶
type BBStro struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
BBStro is a the model for the Bulletin Board System intro files.
type Database ¶
type Database struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Database is a the model for the database releases.
type Demoscene ¶
type Demoscene struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Demoscene is a the model for the demoscene releases.
type Drama ¶
type Drama struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Drama is the model for community drama.
type FTP ¶
type FTP struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
FTP is a the model for the FTP files.
type FileUpload ¶ added in v0.10.0
type FileUpload struct { Filename string Integrity string MagicNumber string Content string Filesize int64 LastMod time.Time }
FileUpload is a struct that contains the values needed to update an existing file record after a new file has been uploaded to the server.
func (FileUpload) Update ¶ added in v0.10.0
func (fu FileUpload) Update(ctx context.Context, exec boil.ContextExecutor, id int64) error
Update the file record with the values provided in the FileUpload struct. The id is the database id key of the record.
type HTML ¶
type HTML struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
HTML is a the model for the HTML and markdown files.
type Hack ¶
type Hack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Hack is a the model for the game hacks.
type HowTo ¶
type HowTo struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
HowTo is a the model for the guides and how-tos.
type Image ¶
type Image struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Image is a the model for the images.
type ImagePack ¶
type ImagePack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
ImagePack is a the model for the image file packs.
type Installer ¶
type Installer struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Installer contain statistics for releases that could be considered installers.
type Intro ¶
type Intro struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Intro contain statistics for releases that could be considered intros or cracktros.
type IntroMsDos ¶
type IntroMsDos struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
IntroMsDos contain statistics for releases that could be considered DOS intros or cracktros.
func (*IntroMsDos) List ¶
func (i *IntroMsDos) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*IntroMsDos) Stat ¶
func (i *IntroMsDos) Stat(ctx context.Context, exec boil.ContextExecutor) error
type IntroWindows ¶
type IntroWindows struct { Cache time.Time Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
IntroWindows contain statistics for releases that could be considered Windows intros or cracktros.
func (*IntroWindows) List ¶
func (i *IntroWindows) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*IntroWindows) Stat ¶
func (i *IntroWindows) Stat(ctx context.Context, exec boil.ContextExecutor) error
type Java ¶
type Java struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Java is a the model for the Java operating system.
type JobAdvert ¶
type JobAdvert struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
JobAdvert is a the model for group job advertisements.
type Linux ¶
type Linux struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Linux is a the model for the Linux operating system.
type Macos ¶
type Macos struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Macos is a the model for the Macintosh operating system.
type Magazine ¶
type Magazine struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Magazine is a the model for the magazine files.
type MsDos ¶
type MsDos struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
MsDos is a the model for the MS-DOS operating system.
type MsDosPack ¶
type MsDosPack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
MsDosPack is a the model for the DOS file packs.
type Music ¶
type Music struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Music is a the model for the music.
type NewsArticle ¶
type NewsArticle struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
NewsArticle is a the model for mainstream news articles.
func (*NewsArticle) List ¶
func (n *NewsArticle) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*NewsArticle) Stat ¶
func (n *NewsArticle) Stat(ctx context.Context, exec boil.ContextExecutor) error
type Nfo ¶
type Nfo struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Nfo is a the model for the NFO files.
type NfoTool ¶
type NfoTool struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
NfoTool is a the model for the NFO tools.
type PDF ¶
type PDF struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
PDF is a the model for the documents in PDF format.
type Proof ¶
type Proof struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Proof is a the model for the file proofs.
type Releaser ¶
type Releaser struct { Name string `boil:"releaser"` // Name of the releaser. URI string `` // URI slug for the releaser, with no boiler bind. Bytes int `boil:"size_total"` // Bytes are the total size of all the files under this releaser. Count int `boil:"count_sum"` // Count is the total number of files under this releaser. // Year is used for optional sorting and is the earliest year the releaser was active. Year null.Int `boil:"min_year"` }
Releaser is a collective, group or individual, that releases files.
type ReleaserName ¶
type ReleaserName struct {
Name string `boil:"releaser"`
}
ReleaserName is a releaser name.
type ReleaserNames ¶
type ReleaserNames []ReleaserName
ReleaserNames is a distinct data list of releasers.
func (*ReleaserNames) Distinct ¶
func (r *ReleaserNames) Distinct(ctx context.Context, exec boil.ContextExecutor) error
Distinct gets the unique releaser names.
func (*ReleaserNames) DistinctGroups ¶ added in v0.8.0
func (r *ReleaserNames) DistinctGroups(ctx context.Context, exec boil.ContextExecutor) error
DistinctGroups gets the unique releaser names that are groups.
type Releasers ¶
type Releasers []*struct { Unique Releaser `boil:",bind"` // Unique releaser. }
Releasers is a collection of releasers.
func (*Releasers) BBS ¶
BBS gets the unique BBS site names and their total file count and file sizes.
func (*Releasers) FTP ¶
FTP gets the unique FTP site names and their total file count and file sizes.
func (*Releasers) Limit ¶
func (r *Releasers) Limit(ctx context.Context, exec boil.ContextExecutor, order OrderBy, limit, page int) error
Limit gets the unique releaser names and their total file count and file sizes. When reorder is true the results are ordered by the total file counts.
func (*Releasers) Magazine ¶
Magazine gets the unique magazine titles and their total issue count and file sizes.
func (*Releasers) MagazineAZ ¶
Magazine gets the unique magazine titles and their total issue count and file sizes.
func (*Releasers) Similar ¶
func (r *Releasers) Similar(ctx context.Context, exec boil.ContextExecutor, limit uint, names ...string) error
Similar finds the unique releaser names that are similar to the named strings. The results are ordered by the total file counts. The required limit is the maximum number of results to return or defaults to 10.
func (*Releasers) SimilarMagazine ¶
func (r *Releasers) SimilarMagazine(ctx context.Context, exec boil.ContextExecutor, limit uint, names ...string) error
SimilarMagazine finds the unique releaser names that are similar to the named strings. The results are ordered by the total file counts. The required limit is the maximum number of results to return or defaults to 10.
type Restrict ¶
type Restrict struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
type Sceners ¶
type Sceners []*struct { Name Scener `boil:"scener"` }
Sceners is a collection of sceners.
type Script ¶
type Script struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Script is a the model for the script and interpreted languages.
type Standard ¶
type Standard struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Standard is a the model for community standards.
type StatFunc ¶ added in v0.17.0
type StatFunc func(context.Context, boil.ContextExecutor) error
StatFunc is a function that updates the summary statistics.
type Summary ¶
type Summary struct { SumBytes sql.NullInt64 `boil:"size_total"` // Sum total of the file sizes. SumCount sql.NullInt64 `boil:"count_total"` // Sum total count of the files. MinYear sql.NullInt16 `boil:"min_year"` // Minimum or earliest year of the files. MaxYear sql.NullInt16 `boil:"max_year"` // Maximum or latest year of the files. }
Summary counts the total number files, file sizes and the earliest and latest years.
func (*Summary) ByDescription ¶
func (s *Summary) ByDescription(ctx context.Context, exec boil.ContextExecutor, terms []string) error
ByDescription saves the summary statistics for the file description search.
func (*Summary) ByFilename ¶
ByFilename saves the summary statistics for the filename search.
func (*Summary) ByForApproval ¶
ByForApproval returns the summary statistics for files that require approval.
func (*Summary) ByHidden ¶
ByHidden returns the summary statistics for files that have been deleted.
func (*Summary) ByReleaser ¶
ByReleaser returns the summary statistics for the named releaser. The name is case insensitive and should be the URI slug of the releaser.
func (*Summary) ByUnwanted ¶
ByUnwanted returns the summary statistics for files that have been marked as unwanted.
type Takedown ¶
type Takedown struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Takedown is a the model for the bust and takedowns.
type Text ¶
type Text struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Text is a the model for the text files.
type TextAmiga ¶
type TextAmiga struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
TextAmiga is a the model for the text files for the Amiga operating system.
type TextApple2 ¶
type TextApple2 struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
TextApple2 is a the model for the text files for the Apple II operating system.
func (*TextApple2) List ¶
func (t *TextApple2) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*TextApple2) Stat ¶
func (t *TextApple2) Stat(ctx context.Context, exec boil.ContextExecutor) error
type TextAtariST ¶
type TextAtariST struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
TextAtariST is a the model for the text files for the Atari ST operating system.
func (*TextAtariST) List ¶
func (t *TextAtariST) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*TextAtariST) Stat ¶
func (t *TextAtariST) Stat(ctx context.Context, exec boil.ContextExecutor) error
type TextPack ¶
type TextPack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
TextPack is a the model for the text file packs.
type Tool ¶
type Tool struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Tool is a the model for the computer tools.
type TrialCrackme ¶
type TrialCrackme struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
TrialCrackme is a the model for group job trial crackme releases.
func (*TrialCrackme) List ¶
func (t *TrialCrackme) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*TrialCrackme) Stat ¶
func (t *TrialCrackme) Stat(ctx context.Context, exec boil.ContextExecutor) error
type Video ¶
type Video struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Video is a the model for the videos.
type Windows ¶
type Windows struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
Windows is a the model for the Windows operating system.
type WindowsPack ¶
type WindowsPack struct { Bytes int `boil:"size_total"` Count int `boil:"count_total"` MinYear int `boil:"min_year"` MaxYear int `boil:"max_year"` }
WindowsPack is a the model for the Windows file packs.
func (*WindowsPack) List ¶
func (w *WindowsPack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) ( models.FileSlice, error, )
func (*WindowsPack) Stat ¶
func (w *WindowsPack) Stat(ctx context.Context, exec boil.ContextExecutor) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package fix contains functions for repairing the database data.
|
Package fix contains functions for repairing the database data. |
Package htm3 is a sub-package of the model package that should only be used by the html3 handler.
|
Package htm3 is a sub-package of the model package that should only be used by the html3 handler. |
Package querymod provides the query mod expressions for the file database.
|
Package querymod provides the query mod expressions for the file database. |