model

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Overview

Package model provides a database model for the Defacto2 website.

Index

Constants

View Source
const (
	ShortLimit   = 100 // ShortLimit is the maximum length of a short string.
	LongFilename = 255 // LongFilename is the maximum length of a filename.
)
View Source
const ClauseNoSoftDel = "deletedat IS NULL"

ClauseNoSoftDel is the clause to exclude soft deleted records.

View Source
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.

View Source
const EpochYear = 1980

EpochYear is the epoch year for the website, for example, using it as year zero for the era of MS-DOS.

View Source
const From = "files"

From is the name of the table containing records of files.

View Source
const Maximum = 998

Maximum number of files to return per query.

View Source
const PageSet = 10 // PageSet is the default number of results when limit/page arguments are offered.

Variables

View Source
var (
	ErrModel      = errors.New("model: file model is not provided")
	ErrMethod     = errors.New("model: method value is invalid")
	ErrName       = errors.New("model: name value is empty")
	ErrSearch     = errors.New("model: search term(s) is invalid")
	ErrSha384     = errors.New("model: sha384 value is invalid")
	ErrTime       = errors.New("model: time value is invalid")
	ErrURI        = errors.New("model: uri value is invalid")
	ErrUUID       = errors.New("model: could not create uuid")
	ErrBadDDay    = errors.New("model: invalid day")
	ErrBadDMonth  = errors.New("model: invalid month")
	ErrBadDYear   = errors.New("model: invalid year")
	ErrBadID      = errors.New("model: artifact key id cannot be found")
	ErrBadIDInt   = errors.New("model: artifact key id is zero or negative")
	ErrBadOS      = errors.New("model: operating system or platform tag is invalid")
	ErrBadTag     = errors.New("model: category or section tag is invalid")
	ErrBadFname   = errors.New("model: filename is missing")
	ErrBadRel     = errors.New("model: cannot update releasers, for must be set before by")
	ErrBadMag     = errors.New("model: magazine requires an issue number, volume, or a title")
	ErrBadYT      = errors.New("model: invalid youtube id")
	ErrBadCPU     = errors.New("model: emulate-cpu value must be one of auto, 8086, 386, 486")
	ErrBadMachine = errors.New("model: emulate-machine value must be one of auto, " +
		"cga, ega, vga, tandy, nolfb, et3000, paradise, et4000, oldvbe")
	ErrBadSFX = errors.New("model: emulate-sfx value must be one of " +
		"auto, covox, sb1, sb16, gus, pcspeaker, none")
)

Functions

func Count added in v1.10.5

func Count(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Count returns the total numbers of public artifact records.

func CountPlatform added in v1.14.0

func CountPlatform(ctx context.Context, exec boil.ContextExecutor, tag tags.Tag) (int64, error)

CountPlatform counts the files that match the platform tag.

func CountSection added in v1.14.0

func CountSection(ctx context.Context, exec boil.ContextExecutor, tag tags.Tag) (int64, error)

CountSection counts the files that match the section tag.

func CountTags added in v1.14.0

func CountTags(ctx context.Context, exec boil.ContextExecutor, section, platform tags.Tag) (int64, error)

CountTags counts the files that match the named category and platform.

func Counts added in v0.8.0

func Counts(ctx context.Context, exec boil.ContextExecutor) (total, public, waiting int64, err error)

Counts returns the total numbers of artifact records.

  • Returned are the total number of artifacts, both public and private.
  • The number of public artifacts.
  • The number of artifacts waiting for approval.

func DeleteOne added in v0.8.0

func DeleteOne(ctx context.Context, exec boil.ContextExecutor, key int64) error

DeleteOne retrieves a single file record from the database using the record key. This function can return records that have been marked as deleted.

func ExistDemozoo added in v1.14.0

func ExistDemozoo(ctx context.Context, exec boil.ContextExecutor, prodID int) (bool, error)

ExistDemozoo returns true if a file record links to a Demozoo production ID. This function will also return true for records that have been marked as deleted.

func ExistHash added in v1.14.0

func ExistHash(ctx context.Context, exec boil.ContextExecutor, hexHash string) (bool, error)

ExistHash returns true if a file record uses the hexadecimal representation of the SHA-384 hash.

func ExistPouet added in v1.14.0

func ExistPouet(ctx context.Context, exec boil.ContextExecutor, prodID int) (bool, error)

ExistPouet returns true if a file record links to a Pouet production ID. This function will also return true for records that have been marked as deleted.

func ExistSHA added in v1.14.0

func ExistSHA(ctx context.Context, exec boil.ContextExecutor, sha384 []byte) (bool, error)

ExistSHA returns true if a file record uses the SHA-384 hash.

func ExistUUID added in v1.14.0

func ExistUUID(ctx context.Context, exec boil.ContextExecutor, uuid string) (bool, error)

ExistUUID returns true if a file record uses the Universal Unique ID.

func InsertDemozoo

func InsertDemozoo(ctx context.Context, exec boil.ContextExecutor, prodID int) (key int64, unid string, err error)

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

func InsertPouet(ctx context.Context, exec boil.ContextExecutor, prodID int) (key int64, unid string, err error)

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, exec boil.ContextExecutor, values url.Values, prefix string) (
	key int64, unid uuid.UUID, err 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

func JsDosBinary(f *models.File) (string, error)

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

func JsDosCommand(f *models.File) (string, error)

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

func JsDosConfig(f *models.File) ([]byte, error)

JsDosConfig creates a js-dos .ini configuration for the emulator.

func NewV7

func NewV7() (time.Time, uuid.UUID, error)

NewV7 generates a new UUID version 7, if it fails then it fallbacks to a UUID version 1.

It also returns the current time.

func One

func One(ctx context.Context, exec boil.ContextExecutor, withDeleted 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 OneByHash added in v1.14.0

func OneByHash(ctx context.Context, exec boil.ContextExecutor, hexHash string) (string, error)

OneByHash returns the obfuscated ID of the file record that uses the hexadecimal representation of the SHA-384 hash.

func OneByUUID

func OneByUUID(ctx context.Context, exec boil.ContextExecutor, withDeleted 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

func OneDemozoo(ctx context.Context, exec boil.ContextExecutor, prodID int64) (
	deleted bool, key int64, err error,
)

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

func OneEditByKey(ctx context.Context, exec boil.ContextExecutor, obfsKey string) (*models.File, error)

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

func OneFile(ctx context.Context, exec boil.ContextExecutor, key int64) (*models.File, error)

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

func OneFileByKey(ctx context.Context, exec boil.ContextExecutor, obfsKey string) (*models.File, error)

OneFileByKey retrieves a single file record from the database using the obfuscated record key.

func OneFn added in v1.14.0

func OneFn(ctx context.Context, exec boil.ContextExecutor, sanity, prodID int64, mod qm.QueryMod) (
	deleted bool, key int64, err error,
)

func OnePouet

func OnePouet(ctx context.Context, exec boil.ContextExecutor, prodID int64) (
	deleted bool, key int64, err error,
)

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 OnlyApproval added in v1.14.0

func OnlyApproval(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

OnlyApproval 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 OnlyDescriptions added in v1.14.0

func OnlyDescriptions(ctx context.Context, sl *slog.Logger, exec boil.ContextExecutor, terms []string) (
	models.FileSlice, error,
)

OnlyDescriptions 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 OnlyFilenames added in v1.14.0

func OnlyFilenames(ctx context.Context, exec boil.ContextExecutor, terms []string) (
	models.FileSlice, error,
)

OnlyFilenames 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.

func OnlyHidden added in v1.14.0

func OnlyHidden(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

OnlyHidden returns all of the file records that are marked as hidden using soft delete.

func OnlyMagicErrs added in v1.14.0

func OnlyMagicErrs(ctx context.Context, exec boil.ContextExecutor, binaryData bool) (
	models.FileSlice, error,
)

OnlyMagicErrs returns all of the file records using legacy magic numbers that require replacements. The binary data bool will also replace magic strings that are set to "Binary data".

func OnlyTexts added in v1.14.0

func OnlyTexts(ctx context.Context, exec boil.ContextExecutor) (
	models.FileSlice, error,
)

OnlyTexts returns all of the file records that are text based, both text or textamiga.

func OnlyUniqueIDs added in v1.14.0

func OnlyUniqueIDs(
	ctx context.Context, exec boil.ContextExecutor, ids []int, uuids ...uuid.UUID) (
	models.FileSlice, error,
)

OnlyUniqueIDs returns a list of files that match the lists of records with id or uuid.

func ReleasersWhere added in v1.14.0

func ReleasersWhere(ctx context.Context, exec boil.ContextExecutor, releasers string) (models.FileSlice, error)

ReleasersWhere gets the records that match the named releaser. If the provided name is invalid, no results but no errors are returned.

func SiteAd added in v1.7.12

func SiteAd(releaser, section null.String) null.String

SiteAd will replace a tags.Nfo section to either tags.BBS or tags.Ftp if the releaser is a known BBS board or FTP site. Otherwise the supplied section is returned.

func SumPlatform added in v1.14.0

func SumPlatform(ctx context.Context, exec boil.ContextExecutor, tag tags.Tag) (int64, error)

SumPlatform sums the file byte sizes of the files that match the platform tag.

func SumReleaser added in v1.14.0

func SumReleaser(ctx context.Context, exec boil.ContextExecutor, name string) (int64, error)

SumReleaser sums the byte file sizes for all the files that match the named release or group.

func SumSection added in v1.14.0

func SumSection(ctx context.Context, exec boil.ContextExecutor, tag tags.Tag) (int64, error)

SumSection sums the file byte sizes of the files that match the section tag.

func SummCols added in v1.14.0

func SummCols() []string

SummCols returns a read-only slice reference to the Summary columns.

func UUID added in v1.5.18

UUID returns a slice of all the UUIDs in the database.

func UpdateEmulateCPU added in v0.10.0

func UpdateEmulateCPU(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

func UpdateEmulateMachine added in v0.10.0

func UpdateEmulateMachine(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

func UpdateEmulateRunProgram added in v0.10.0

func UpdateEmulateRunProgram(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

func UpdateEmulateSfx added in v0.10.0

func UpdateEmulateSfx(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

func UpdateMagic added in v0.10.0

func UpdateMagic(ctx context.Context, exec boil.ContextExecutor, key int64, magic string) error

UpdateMagic updates the file magictype (magic number) column with the magic value provided.

func UpdateOnline

func UpdateOnline(ctx context.Context, exec boil.ContextExecutor, status bool, key int64) error

UpdateOnline updates the record to be online and public.

func UpdateReleasers

func UpdateReleasers(ctx context.Context, exec boil.ContextExecutor, key int64, relFor, relBy string) error

UpdateReleasers updates the releasers values with relFor and relBy. It always overwrites the existing releases for the artifact id. If relFor or relBy are left empty, they will delete the existing releasers.

When providing single releasers, it must be placed in relFor. Using relBy, while leaving relFor blank will return an error.

The table columns updated are GroupBrandFor and GroupBrandBy.

func UpdateYMD

func UpdateYMD(ctx context.Context, exec boil.ContextExecutor, key int64, y, m, d null.Int16) error

UpdateYMD updates the date issued year, month and day columns with the int values provided.

  • y int16 represents a year
  • m int16 represents a numeric month
  • d int16 represents a numeric day of the month

func UpdateYMDS added in v1.14.0

func UpdateYMDS(ctx context.Context, exec boil.ContextExecutor, key int64, y, m, d string) error

UpdateYMDS updates the date issued year, month and day columns with the string values provided.

  • y is a year
  • m is a numeric month, 1 - 12
  • d is a numeric day of the month, 1 - 31

func ValidD

func ValidD(d int16) null.Int16

ValidD returns a valid day or a null value.

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

func ValidFilesize(size string) (null.Int64, error)

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 ValidM

func ValidM(m int16) null.Int16

ValidM returns a valid month or a null value.

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 ValidY

func ValidY(y int16) null.Int16

ValidY returns a valid year or a null value.

func ValidYouTube

func ValidYouTube(s string) null.String

ValidYouTube returns true if the string is a valid YouTube video ID. An error is only returned if the regular expression match cannot compile.

func Validate added in v0.8.0

func Validate(art *models.File) error

Validate checks the artifact record for any missing or invalid values that should prevent it from being published and public.

All found issues will be returned as joined error messages.

Types

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 the model for the for sale.

func (*Advert) List

func (q *Advert) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Advert) Stat

func (q *Advert) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Advert) Values added in v1.14.0

func (q *Advert) Values() (int, int, int, int)

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 the model for the public and community announcements.

func (*Announcement) List

func (q *Announcement) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Announcement) Stat

func (*Announcement) Values added in v1.14.0

func (q *Announcement) Values() (int, int, int, int)

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 the model for the ANSI formatted text and art files.

func (*Ansi) List

func (q *Ansi) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Ansi) Stat

func (q *Ansi) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Ansi) String added in v1.12.0

func (q *Ansi) String() string

func (*Ansi) Values added in v1.14.0

func (q *Ansi) Values() (int, int, int, int)

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 the model for the BBS advertisements created in ANSI text.

func (*AnsiBBS) List

func (q *AnsiBBS) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*AnsiBBS) Stat

func (q *AnsiBBS) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*AnsiBBS) String added in v1.12.0

func (q *AnsiBBS) String() string

func (*AnsiBBS) Values added in v1.14.0

func (q *AnsiBBS) Values() (int, int, int, int)

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 the model for the brand logos created in ANSI text.

func (*AnsiBrand) List

func (q *AnsiBrand) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*AnsiBrand) Stat

func (q *AnsiBrand) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*AnsiBrand) Values added in v1.14.0

func (q *AnsiBrand) Values() (int, int, int, int)

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 the model for the FTP advertisements created in ANSI text.

func (*AnsiFTP) List

func (q *AnsiFTP) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*AnsiFTP) Stat

func (q *AnsiFTP) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*AnsiFTP) Values added in v1.14.0

func (q *AnsiFTP) Values() (int, int, int, int)

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 the model for the NFO files created in ANSI text.

func (*AnsiNfo) List

func (q *AnsiNfo) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*AnsiNfo) Stat

func (q *AnsiNfo) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*AnsiNfo) Values added in v1.14.0

func (q *AnsiNfo) Values() (int, int, int, int)

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 the model for the ANSI file packs.

func (*AnsiPack) List

func (q *AnsiPack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*AnsiPack) Stat

func (q *AnsiPack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*AnsiPack) Values added in v1.14.0

func (q *AnsiPack) Values() (int, int, int, int)

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"`
	UpdatedAt time.Time `boil:"-"`
}

Artifacts statistics.

func (*Artifacts) ByKey

func (obj *Artifacts) ByKey(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

ByKey returns the public files reversed ordered, numeric key ID column.

func (*Artifacts) ByNewest

func (obj *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 (obj *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) ByUpdated

func (obj *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) OnlyUnwanted added in v1.14.0

func (obj *Artifacts) OnlyUnwanted(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

OnlyUnwanted returns all of the file records that are flagged by Google as unwanted.

func (*Artifacts) Public

func (obj *Artifacts) Public(ctx context.Context, exec boil.ContextExecutor) error

Public sets the Artifacts statistics for file artifacts that are not marked as hidden.

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 the model for the Bulletin Board System files.

func (*BBS) List

func (q *BBS) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*BBS) Stat

func (q *BBS) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*BBS) String added in v1.12.0

func (q *BBS) String() string

func (*BBS) Values added in v1.14.0

func (q *BBS) Values() (int, int, int, int)

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 the model for the Bulletin Board System image files.

func (*BBSImage) List

func (q *BBSImage) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*BBSImage) Stat

func (q *BBSImage) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*BBSImage) Values added in v1.14.0

func (q *BBSImage) Values() (int, int, int, int)

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 the model for the Bulletin Board System text files.

func (*BBSText) List

func (q *BBSText) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*BBSText) Stat

func (q *BBSText) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*BBSText) String added in v1.12.0

func (q *BBSText) String() string

func (*BBSText) Values added in v1.14.0

func (q *BBSText) Values() (int, int, int, int)

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 the model for the Bulletin Board System intro files.

func (*BBStro) List

func (q *BBStro) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*BBStro) Sensenstahl added in v1.5.2

func (q *BBStro) Sensenstahl(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*BBStro) Stat

func (q *BBStro) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*BBStro) String added in v1.12.0

func (q *BBStro) String() string

func (*BBStro) Values added in v1.14.0

func (q *BBStro) Values() (int, int, int, int)

type BoolFrom added in v1.14.0

type BoolFrom int

BoolFrom is a type for the bool columns that can be updated.

const (
	EmulateUMB    BoolFrom = iota // DoseeNoUmb with value
	EmulateEMS                    // DoseeNoEms with value
	EmulateXMS                    // DoseeNoXMS with value
	EmulateBroken                 // DoseeIncompatible with value
	ReadmeDisable                 // RetrotxtNoReadme with value
)

func (BoolFrom) Update added in v1.14.0

func (col BoolFrom) Update(ctx context.Context, exec boil.ContextExecutor, key int64, val bool) error

Update 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.

type By added in v1.14.0

type By struct {
	Clause string
	Offset int
	Limit  int
}

type Classification added in v1.14.0

type Classification struct {
	ID       int64
	Platform string
	Tag      string
}

func (Classification) Update added in v1.14.0

func (cl Classification) Update(ctx context.Context, exec boil.ContextExecutor) error

Update 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.

type Console added in v1.13.0

type Console struct {
	Bytes   int `boil:"size_total"`
	Count   int `boil:"count_total"`
	MinYear int `boil:"min_year"`
	MaxYear int `boil:"max_year"`
}

Console is the model for console releases.

func (*Console) List added in v1.13.0

func (q *Console) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Console) Stat added in v1.13.0

func (q *Console) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Console) String added in v1.13.0

func (q *Console) String() string

func (*Console) Values added in v1.14.0

func (q *Console) Values() (int, int, int, int)

type Creators added in v1.14.0

type Creators struct {
	ID    int64
	Text  string
	Ill   string
	Prog  string
	Audio string
}

func (Creators) Update added in v1.14.0

func (c Creators) Update(ctx context.Context, exec boil.ContextExecutor) error

Update updates the text, illustration, program, and audio credit columns with the values provided.

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 the model for the database releases.

func (*Database) List

func (q *Database) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Database) Stat

func (q *Database) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Database) Values added in v1.14.0

func (q *Database) Values() (int, int, int, int)

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 the model for the demoscene releases.

func (*Demoscene) List

func (q *Demoscene) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Demoscene) Stat

func (q *Demoscene) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Demoscene) String added in v1.12.0

func (q *Demoscene) String() string

func (*Demoscene) Values added in v1.14.0

func (q *Demoscene) Values() (int, int, int, int)

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.

func (*Drama) List

func (q *Drama) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Drama) Stat

func (q *Drama) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Drama) Values added in v1.14.0

func (q *Drama) Values() (int, int, int, int)

type Exist added in v1.14.0

type Exist struct {
	ProdID int
	Mod    qm.QueryMod
	Format string
}

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 the model for the FTP files.

func (*FTP) List

func (q *FTP) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*FTP) Stat

func (q *FTP) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*FTP) Values added in v1.14.0

func (q *FTP) Values() (int, int, int, int)

type FileUpload added in v0.10.0

type FileUpload struct {
	ID          int64
	LastMod     time.Time
	Filename    string
	Integrity   string
	MagicNumber string
	Content     string
	Filesize    int64
}

FileUpload 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) error

Update the file record with the values provided in FileUpload. 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 the model for the HTML and markdown files.

func (*HTML) List

func (q *HTML) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*HTML) Stat

func (q *HTML) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*HTML) Values added in v1.14.0

func (q *HTML) Values() (int, int, int, int)

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 the model for the game hacks.

func (*Hack) List

func (q *Hack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Hack) Stat

func (q *Hack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Hack) Values added in v1.14.0

func (q *Hack) Values() (int, int, int, int)

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 the model for the guides and how-to texts.

func (*HowTo) List

func (q *HowTo) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*HowTo) Stat

func (q *HowTo) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*HowTo) Values added in v1.14.0

func (q *HowTo) Values() (int, int, int, int)

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 the model for the images.

func (*Image) List

func (q *Image) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Image) Stat

func (q *Image) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Image) Values added in v1.14.0

func (q *Image) Values() (int, int, int, int)

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 the model for the image file packs.

func (*ImagePack) List

func (q *ImagePack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*ImagePack) Stat

func (q *ImagePack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*ImagePack) Values added in v1.14.0

func (q *ImagePack) Values() (int, int, int, int)

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.

func (*Installer) List

func (q *Installer) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Installer) Stat

func (q *Installer) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Installer) String added in v1.12.0

func (q *Installer) String() string

func (*Installer) Values added in v1.14.0

func (q *Installer) Values() (int, int, int, int)

type Int64From added in v1.14.0

type Int64From int

Int64From is a type for the int64 columns that can be updated.

const (
	Demozoo Int64From = iota // WebIDPouet column with value
	Pouet                    // WebIDDemozoo column with value
)

func (Int64From) Update added in v1.14.0

func (col Int64From) Update(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

Update 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 values for both demozoo and pouet are validated to be within a sane range and a zero value will set their column's to null.

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.

func (*Intro) List

func (q *Intro) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Intro) Stat

func (q *Intro) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Intro) String added in v1.12.0

func (q *Intro) String() string

func (*Intro) Values added in v1.14.0

func (q *Intro) Values() (int, int, int, int)

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 (q *IntroMsDos) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*IntroMsDos) Stat

func (q *IntroMsDos) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*IntroMsDos) String added in v1.12.0

func (q *IntroMsDos) String() string

func (*IntroMsDos) Values added in v1.14.0

func (q *IntroMsDos) Values() (int, int, int, int)

type IntroWindows

type IntroWindows struct {
	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 (q *IntroWindows) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*IntroWindows) Stat

func (*IntroWindows) String added in v1.12.0

func (q *IntroWindows) String() string

func (*IntroWindows) Values added in v1.14.0

func (q *IntroWindows) Values() (int, int, int, int)

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 the model for the Java operating system.

func (*Java) List

func (q *Java) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Java) Stat

func (q *Java) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Java) String added in v1.12.0

func (q *Java) String() string

func (*Java) Values added in v1.14.0

func (q *Java) Values() (int, int, int, int)

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 the model for group job advertisements.

func (*JobAdvert) List

func (q *JobAdvert) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*JobAdvert) Stat

func (q *JobAdvert) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*JobAdvert) Values added in v1.14.0

func (q *JobAdvert) Values() (int, int, int, int)

type Key added in v1.14.0

type Key string
const (
	KeyPCBoard      Key = "pcboard"
	KeyPCBoardPPE   Key = "pcboard-ppe"
	KeyPCBoardText  Key = "pcboard-text"
	KeyTextAmiga    Key = "text-amiga"
	KeyTextApple2   Key = "text-apple2"
	KeyTextAtariST  Key = "text-atari-st"
	KeyPDF          Key = "pdf"
	KeyHTML         Key = "html"
	KeyNewsArticle  Key = "news-article"
	KeyStandards    Key = "standards"
	KeyAnnouncement Key = "announcement"
	KeyJobAdvert    Key = "job-advert"
	KeyTrialCrackme Key = "trial-crackme"
	KeyHack         Key = "hack"
	KeyTool         Key = "tool"
	KeyTakedown     Key = "takedown"
	KeyDrama        Key = "drama"
	KeyAdvert       Key = "advert"
	KeyRestrict     Key = "restrict"
	KeyHowTo        Key = "how-to"
	KeyNFOTool      Key = "nfo-tool"
	KeyImage        Key = "image"
	KeyMusic        Key = "music"
	KeyVideo        Key = "video"
	KeyMSDOS        Key = "msdos"
	KeyWindows      Key = "windows"
	KeyMacOS        Key = "macos"
	KeyLinux        Key = "linux"
	KeyJava         Key = "java"
	KeyScript       Key = "script"
	KeyDatabase     Key = "database"
	KeyMSDOSPack    Key = "msdos-pack"
	KeyWindowsPack  Key = "windows-pack"
	KeyImagePack    Key = "image-pack"
	KeyTextPack     Key = "text-pack"
	KeyText         Key = "text"
	KeyMagazine     Key = "magazine"
	KeyFTP          Key = "ftp"
	KeyBBSText      Key = "bbs-text"
	KeyBBSImage     Key = "bbs-image"
	KeyBBStro       Key = "bbstro"
	KeyBBS          Key = "bbs"
	KeyANSINFO      Key = "ansi-nfo"
	KeyANSIPack     Key = "ansi-pack"
	KeyANSIFTP      Key = "ansi-ftp"
	KeyANSIBBS      Key = "ansi-bbs"
	KeyANSIBrand    Key = "ansi-brand"
	KeyANSI         Key = "ansi"
	KeyProof        Key = "proof"
	KeyNFO          Key = "nfo"
	KeyDemoscene    Key = "demoscene"
	KeyInstaller    Key = "installer"
	KeyIntro        Key = "intro"
	KeyIntroMSDOS   Key = "intro-msdos"
	KeyIntroWindows Key = "intro-windows"
	KeyConsole      Key = "console"
)

func Keys added in v1.14.0

func Keys() []Key

Keys is intended for testing boilerplate and returns the keys used in matches.

func (Key) IsValid added in v1.14.0

func (k Key) IsValid() bool

IsValid reports whether the Key is one of the defined key constants.

func (Key) String added in v1.14.0

func (k Key) String() string

String implements the fmt.Stringer interface for Key.

type Links struct {
	ID        int64
	Demozoo   int64
	Pouet     int64
	YouTube   string
	Colors16  string
	GitHub    string
	Relations string
	Sites     string
}

func (Links) Update added in v1.14.0

func (link Links) Update(ctx context.Context, exec boil.ContextExecutor) error

Update updates the youtube, 16colors, relations, sites, demozoo, and pouet columns with the values provided.

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 the model for the Linux operating system.

func (*Linux) List

func (q *Linux) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Linux) Stat

func (q *Linux) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Linux) String added in v1.12.0

func (q *Linux) String() string

func (*Linux) Values added in v1.14.0

func (q *Linux) Values() (int, int, int, int)

type Lookup added in v1.14.0

type Lookup int
const (
	Only Lookup = iota
	OnlyExact
	OnlyMagazine
)

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 the model for the Macintosh operating system.

func (*Macos) List

func (q *Macos) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Macos) Stat

func (q *Macos) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Macos) String added in v1.12.0

func (q *Macos) String() string

func (*Macos) Values added in v1.14.0

func (q *Macos) Values() (int, int, int, int)

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 the model for the magazine files.

func (*Magazine) List

func (q *Magazine) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Magazine) Stat

func (q *Magazine) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Magazine) String added in v1.12.0

func (q *Magazine) String() string

func (*Magazine) Values added in v1.14.0

func (q *Magazine) Values() (int, int, int, int)

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 the model for the MS-DOS operating system.

func (*MsDos) List

func (q *MsDos) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*MsDos) Stat

func (q *MsDos) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*MsDos) String added in v1.12.0

func (q *MsDos) String() string

func (*MsDos) Values added in v1.14.0

func (q *MsDos) Values() (int, int, int, int)

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 the model for the DOS file packs.

func (*MsDosPack) List

func (q *MsDosPack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*MsDosPack) Stat

func (q *MsDosPack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*MsDosPack) Values added in v1.14.0

func (q *MsDosPack) Values() (int, int, int, int)

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 the model for the music.

func (*Music) List

func (q *Music) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Music) Stat

func (q *Music) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Music) Values added in v1.14.0

func (q *Music) Values() (int, int, int, int)

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 the model for mainstream news articles.

func (*NewsArticle) List

func (q *NewsArticle) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*NewsArticle) Stat

func (q *NewsArticle) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*NewsArticle) Values added in v1.14.0

func (q *NewsArticle) Values() (int, int, int, int)

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 the model for the NFO files.

func (*Nfo) List

func (q *Nfo) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Nfo) Stat

func (q *Nfo) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Nfo) String added in v1.12.0

func (q *Nfo) String() string

func (*Nfo) Values added in v1.14.0

func (q *Nfo) Values() (int, int, int, int)

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 the model for the NFO tools.

func (*NfoTool) List

func (q *NfoTool) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*NfoTool) Stat

func (q *NfoTool) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*NfoTool) String added in v1.12.0

func (q *NfoTool) String() string

func (*NfoTool) Values added in v1.14.0

func (q *NfoTool) Values() (int, int, int, int)

type OrderBy

type OrderBy uint

OrderBy is the sorting order for ALL the releasers.

const (
	Prolific     OrderBy = iota // Prolific orders by the total artifact count.
	Alphabetical                // Alphabetical orders by the releaser name.
	Oldest                      // Oldest orders by the year of the first artifact.
)

func (OrderBy) BBS added in v1.14.0

func (order OrderBy) BBS(ctx context.Context, exec boil.ContextExecutor, obj *Releasers) error

BBS gets the unique BBS site names and their total file count and file sizes.

func (OrderBy) Limit added in v1.14.0

func (order OrderBy) Limit(ctx context.Context, exec boil.ContextExecutor, obj *Releasers, 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.

type PCBoard added in v1.10.4

type PCBoard struct {
	Bytes   int `boil:"size_total"`
	Count   int `boil:"count_total"`
	MinYear int `boil:"min_year"`
	MaxYear int `boil:"max_year"`
}

PCBoard is the model for PCBoard platform which can include text files and applications.

func (*PCBoard) List added in v1.10.4

func (q *PCBoard) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*PCBoard) Stat added in v1.10.4

func (q *PCBoard) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*PCBoard) Values added in v1.14.0

func (q *PCBoard) Values() (int, int, int, int)

type PCBoardPPE added in v1.10.4

type PCBoardPPE struct {
	Bytes   int `boil:"size_total"`
	Count   int `boil:"count_total"`
	MinYear int `boil:"min_year"`
	MaxYear int `boil:"max_year"`
}

PCBoardPPE is the model for PCBoard applications.

func (*PCBoardPPE) List added in v1.10.4

func (q *PCBoardPPE) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*PCBoardPPE) Stat added in v1.10.4

func (q *PCBoardPPE) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*PCBoardPPE) Values added in v1.14.0

func (q *PCBoardPPE) Values() (int, int, int, int)

type PCBoardText added in v1.10.4

type PCBoardText struct {
	Bytes   int `boil:"size_total"`
	Count   int `boil:"count_total"`
	MinYear int `boil:"min_year"`
	MaxYear int `boil:"max_year"`
}

PCBoardText is the model for PCBoard applications.

func (*PCBoardText) List added in v1.10.4

func (q *PCBoardText) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*PCBoardText) Stat added in v1.10.4

func (q *PCBoardText) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*PCBoardText) Values added in v1.14.0

func (q *PCBoardText) Values() (int, int, int, int)

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 the model for the documents in PDF format.

func (*PDF) List

func (q *PDF) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*PDF) Stat

func (q *PDF) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*PDF) Values added in v1.14.0

func (q *PDF) Values() (int, int, int, int)

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 the model for the file proofs.

func (*Proof) List

func (q *Proof) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Proof) Stat

func (q *Proof) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Proof) String added in v1.12.0

func (q *Proof) String() string

func (*Proof) Values added in v1.14.0

func (q *Proof) Values() (int, int, int, int)

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.

func (*ReleaserName) String added in v1.14.0

func (r *ReleaserName) String() string

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) DistinctBBS added in v1.10.5

func (r *ReleaserNames) DistinctBBS(ctx context.Context, exec boil.ContextExecutor) error

DistinctBBS gets the unique releaser names that are BBS sites.

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.

func (*ReleaserNames) DistinctMagazines added in v1.10.5

func (r *ReleaserNames) DistinctMagazines(ctx context.Context, exec boil.ContextExecutor) error

DistinctMagazines gets the unique releaser names that are magazines.

func (*ReleaserNames) Slugs added in v1.14.0

func (r *ReleaserNames) Slugs() Set

Slugs returns a map of distinct releaser URLs for lookups that use little memory and are fast.

Usage:

var names model.ReleaserNames
_ = names.DistinctGroups(ctx, db)
slugs := names.Slugs()
if slugs.Has("someone") {}

type Releasers

type Releasers []*struct {
	Unique Releaser `boil:",bind"` // Unique releaser.
}

Releasers is a collection of releasers.

func (*Releasers) FTP

func (obj *Releasers) FTP(ctx context.Context, exec boil.ContextExecutor) error

FTP gets the unique FTP site names and their total file count and file sizes.

func (*Releasers) Initialism added in v1.5.3

func (obj *Releasers) Initialism(ctx context.Context, exec boil.ContextExecutor, limit int, names ...string) error

Initialism finds the unique releaser names that match 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) Magazine

func (obj *Releasers) Magazine(ctx context.Context, exec boil.ContextExecutor) error

Magazine gets the unique magazine titles and their total issue count and file sizes.

func (*Releasers) MagazineAZ

func (obj *Releasers) MagazineAZ(ctx context.Context, exec boil.ContextExecutor) error

MagazineAZ gets the unique magazine titles and their total issue count and file sizes.

func (*Releasers) Similar

func (obj *Releasers) Similar(ctx context.Context, exec boil.ContextExecutor, limit int, 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 (obj *Releasers) SimilarMagazine(
	ctx context.Context, exec boil.ContextExecutor, limit int, 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.

func (*Releasers) Slugs

func (obj *Releasers) Slugs()

Slugs sets URL friendly strings to the Group names.

func (*Releasers) String added in v1.0.7

func (obj *Releasers) String() string

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"`
}

func (*Restrict) List

func (q *Restrict) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Restrict) Stat

func (q *Restrict) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Restrict) Values added in v1.14.0

func (q *Restrict) Values() (int, int, int, int)

type Scener

type Scener string

Scener is a collective, group or individual, that releases files.

func (*Scener) Where

func (s *Scener) Where(ctx context.Context, exec boil.ContextExecutor, scener string) (models.FileSlice, error)

Where gets the records of all files that have been credited to the named scener.

type Sceners

type Sceners []*struct {
	Name Scener `boil:"scener"`
}

Sceners is a collection of sceners.

func (*Sceners) Artist

func (obj *Sceners) Artist(ctx context.Context, exec boil.ContextExecutor) error

Artist gets a list of sceners who have been credited for graphics or art.

func (*Sceners) Coder

func (obj *Sceners) Coder(ctx context.Context, exec boil.ContextExecutor) error

Coder gets a list of sceners who have been credited for programming.

func (*Sceners) Distinct

func (obj *Sceners) Distinct(ctx context.Context, exec boil.ContextExecutor) error

Distinct gets a list of all, distinct sceners.

func (*Sceners) Musician

func (obj *Sceners) Musician(ctx context.Context, exec boil.ContextExecutor) error

Musician gets a list of sceners who have been credited for music or audio.

func (*Sceners) Sort

func (obj *Sceners) Sort() []string

Sort gets a sorted slice of unique sceners.

func (*Sceners) Writer

func (obj *Sceners) Writer(ctx context.Context, exec boil.ContextExecutor) error

Writer gets a list of sceners who have been credited for text.

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 the model for the script and interpreted languages.

func (*Script) List

func (q *Script) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Script) Stat

func (q *Script) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Script) String added in v1.12.0

func (q *Script) String() string

func (*Script) Values added in v1.14.0

func (q *Script) Values() (int, int, int, int)

type Set added in v1.14.0

type Set map[string]struct{}

Set is a zero-byte memory map used to store and reference string values.

func (Set) Add added in v1.14.0

func (s Set) Add(key string)

Add the key to the Set map.

func (Set) Has added in v1.14.0

func (s Set) Has(key string) bool

Has returns true when the key is found in the Set map.

type Standards added in v1.14.0

type Standards struct {
	Bytes   int `boil:"size_total"`
	Count   int `boil:"count_total"`
	MinYear int `boil:"min_year"`
	MaxYear int `boil:"max_year"`
}

Standards is the model for community standards.

func (*Standards) List added in v1.14.0

func (q *Standards) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Standards) Stat added in v1.14.0

func (q *Standards) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Standards) Values added in v1.14.0

func (q *Standards) Values() (int, int, int, int)

type StatFunc added in v0.17.0

type StatFunc func(*Summary, context.Context, boil.ContextExecutor) error

StatFunc is a function that updates the summary statistics.

type StatModel added in v1.14.0

type StatModel interface {
	Stat(ctx context.Context, exec boil.ContextExecutor) error
	Values() (count, bytes, minYear, maxYear int)
}

type StringFrom added in v1.14.0

type StringFrom int

StringFrom is a type for the string columns that can be updated.

const (
	Colors16     StringFrom = iota // WebID16colors column value
	Comment                        // Comment column value
	CreatorAudio                   // CreditAudio column value
	CreatorIll                     // CreditIllustration column value
	CreatorProg                    // CreditProgram column with value
	CreatorText                    // CreditText column with value
	Filename                       // Filename column with value
	GitHub                         // WebIDGithub column with value
	Integrity                      // FileIntegrityStrong column with value
	Platform                       // Platform column value with value
	Magic                          // FileMagicType value with value
	Relations                      // ListRelations column with value
	Section                        // Section column with value
	Sites                          // ListLinks column with value
	Title                          // RecordTitle column with value
	VirusTotal                     // FileSecurityAlertURL with value
	YouTube                        // WebIDYoutube column with value
	ZipContent                     // FileZipContent column with value
)

func (StringFrom) Update added in v1.14.0

func (sf StringFrom) Update(ctx context.Context, exec boil.ContextExecutor, key int64, val string) error

Update updates the StringFrom value with val. The StringFrom columns are table column cells that can either be null, empty, or have a string value.

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 (obj *Summary) ByDescription(ctx context.Context, exec boil.ContextExecutor, terms []string) error

ByDescription saves the summary statistics for the file description search.

func (*Summary) ByFilename

func (obj *Summary) ByFilename(ctx context.Context, exec boil.ContextExecutor, terms []string) error

ByFilename saves the summary statistics for the filename search.

func (*Summary) ByForApproval

func (obj *Summary) ByForApproval(ctx context.Context, exec boil.ContextExecutor) error

ByForApproval returns the summary statistics for files that require approval.

func (*Summary) ByHidden

func (obj *Summary) ByHidden(ctx context.Context, exec boil.ContextExecutor) error

ByHidden returns the summary statistics for files that have been deleted.

func (*Summary) ByMatch

func (obj *Summary) ByMatch(ctx context.Context, exec boil.ContextExecutor, uri string) error

ByMatch returns the summary statistics for the named uri.

func (*Summary) ByPublic

func (obj *Summary) ByPublic(ctx context.Context, exec boil.ContextExecutor) error

ByPublic selects the summary statistics for all public files.

func (*Summary) ByReleaser

func (obj *Summary) ByReleaser(ctx context.Context, exec boil.ContextExecutor, uri string) error

ByReleaser returns the summary statistics for the named releaser. The uri is case insensitive and must be the URI slug of the releaser or an error could be returned.

func (*Summary) ByScener

func (obj *Summary) ByScener(ctx context.Context, exec boil.ContextExecutor, scener string) error

ByScener selects the summary statistics for the named sceners.

func (*Summary) ByUnwanted

func (obj *Summary) ByUnwanted(ctx context.Context, exec boil.ContextExecutor) error

ByUnwanted returns the summary statistics for files that have been marked as unwanted.

func (*Summary) Update added in v0.8.0

func (obj *Summary) Update(count, bytes, yearMin, yearMax int)

Update updates the summary statistics, however there are no sanity checks of the values.

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 the model for the bust and take downs.

func (*Takedown) List

func (q *Takedown) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Takedown) Stat

func (q *Takedown) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Takedown) Values added in v1.14.0

func (q *Takedown) Values() (int, int, int, int)

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 the model for the text files.

func (*Text) List

func (q *Text) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Text) Stat

func (q *Text) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Text) String added in v1.12.0

func (q *Text) String() string

func (*Text) Values added in v1.14.0

func (q *Text) Values() (int, int, int, int)

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 the model for the text files for the Amiga operating system.

func (*TextAmiga) List

func (q *TextAmiga) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*TextAmiga) Stat

func (q *TextAmiga) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*TextAmiga) Values added in v1.14.0

func (q *TextAmiga) Values() (int, int, int, int)

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 the model for the text files about the Apple II microcomputer.

func (*TextApple2) List

func (q *TextApple2) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*TextApple2) Stat

func (q *TextApple2) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*TextApple2) Values added in v1.14.0

func (q *TextApple2) Values() (int, int, int, int)

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 the model for the text files about the Atari ST microcomputer.

func (*TextAtariST) List

func (q *TextAtariST) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*TextAtariST) Stat

func (q *TextAtariST) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*TextAtariST) Values added in v1.14.0

func (q *TextAtariST) Values() (int, int, int, int)

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 the model for the text file packs.

func (*TextPack) List

func (q *TextPack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*TextPack) Stat

func (q *TextPack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*TextPack) Values added in v1.14.0

func (q *TextPack) Values() (int, int, int, int)

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 the model for the computer tools.

func (*Tool) List

func (q *Tool) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Tool) Stat

func (q *Tool) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Tool) Values added in v1.14.0

func (q *Tool) Values() (int, int, int, int)

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 the model for group job trial "crackme" releases.

func (*TrialCrackme) List

func (q *TrialCrackme) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*TrialCrackme) Stat

func (*TrialCrackme) Values added in v1.14.0

func (q *TrialCrackme) Values() (int, int, int, int)

type UUIDVers added in v1.12.0

type UUIDVers struct {
	V1      int
	V2      int
	V3      int
	V4      int
	V5      int
	V6      int
	V7      int
	V8      int
	Count   int // Count is the total number of UUIDs parsed.
	Error   int // Error are the UUIDs parsed that returned an error.
	Unknown int // Unknown are the UUIDs parsed that returned an out of range version.
}

UUIDVers contains the UUID version usage statistics.

func UUIDs added in v1.12.0

func UUIDs(ctx context.Context, exec boil.ContextExecutor) (UUIDVers, error)

UUIDs counts the different UUID versions in use in the database, ranging from V1 to V8.

func (UUIDVers) String added in v1.12.0

func (u UUIDVers) String() string

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 the model for the videos.

func (*Video) List

func (q *Video) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Video) Stat

func (q *Video) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Video) Values added in v1.14.0

func (q *Video) Values() (int, int, int, int)

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 the model for the Windows operating system.

func (*Windows) List

func (q *Windows) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*Windows) Stat

func (q *Windows) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*Windows) String added in v1.12.0

func (q *Windows) String() string

func (*Windows) Values added in v1.14.0

func (q *Windows) Values() (int, int, int, int)

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 the model for the Windows file packs.

func (*WindowsPack) List

func (q *WindowsPack) List(ctx context.Context, exec boil.ContextExecutor, offset, limit int) (
	models.FileSlice, error,
)

func (*WindowsPack) Stat

func (q *WindowsPack) Stat(ctx context.Context, exec boil.ContextExecutor) error

func (*WindowsPack) Values added in v1.14.0

func (q *WindowsPack) Values() (int, int, int, int)

Directories

Path Synopsis
Package fix contains functions for repairing the database data.
Package fix contains functions for repairing the database data.
Package html3 is a sub-package of the model package that should only be used by the html3 handler.
Package html3 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.

Jump to

Keyboard shortcuts

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