model

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 36 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 (
	DemozooSanity = 450000 // Sanity is to check the maximum permitted production ID.
)
View Source
const EpochYear = 1980

EpochYear is the epoch year for the website, ie. the year 0 of the MS-DOS era.

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.

Variables

View Source
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")
)
View Source
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")
)
View Source
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

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

CategoryByteSum sums the byte file sizes for all the files that match the named category.

func CategoryCount

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

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

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

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

func DeleteOne(ctx context.Context, exec boil.ContextExecutor, key int64) 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 DemozooExists

func DemozooExists(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, error)

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

func HashExists(ctx context.Context, exec boil.ContextExecutor, hash string) (bool, error)

HashExists returns true if the file record exists in the database using a SHA-384 hexadecimal hash.

func InsertDemozoo

func InsertDemozoo(ctx context.Context, exec boil.ContextExecutor, id int64) (int64, string, 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, id int64) (int64, string, 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, 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

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) (string, 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 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

func OneDemozoo(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, int64, 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, key 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, id 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, key string) (*models.File, error)

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

func OnePouet

func OnePouet(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, int64, 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 PlatformByteSum

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

PlatformByteSum sums the byte filesizes for all the files that match the category name.

func PlatformCount

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

PlatformCount counts the files that match the named platform.

func PouetExists

func PouetExists(ctx context.Context, exec boil.ContextExecutor, id int64) (bool, error)

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

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

ReleaserByteSum sums the byte file sizes for all the files that match the group name.

func SHA384Exists

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

SHA384Exists returns true if the file record exists in the database using a SHA-384 hash.

func UUIDExists added in v1.0.3

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

UUIDExists returns true if the file record exists in the database using a UUID.

func Update16Colors

func Update16Colors(db *sql.DB, id int64, val string) error

Update16Colors updates the WebID16colors column value with val.

func UpdateBoolFrom added in v0.10.0

func UpdateBoolFrom(db *sql.DB, column boolFrom, id int64, val bool) error

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

func UpdateClassification(db *sql.DB, id int64, platform, tag string) error

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

func UpdateComment(db *sql.DB, id int64, val string) error

UpdateComment updates the Comment column value with val.

func UpdateCreatorAudio

func UpdateCreatorAudio(db *sql.DB, id int64, val string) error

UpdateCreatorAudio updates the CreditAudio column with val.

func UpdateCreatorIll

func UpdateCreatorIll(db *sql.DB, id int64, val string) error

UpdateCreatorIll updates the CreditIllustration column with val.

func UpdateCreatorProg

func UpdateCreatorProg(db *sql.DB, id int64, val string) error

UpdateCreatorProg updates the CreditProgram column with val.

func UpdateCreatorText

func UpdateCreatorText(db *sql.DB, id int64, val string) error

UpdateCreatorText updates the CreditText column with val.

func UpdateCreators

func UpdateCreators(db *sql.DB, id int64, text, ill, prog, audio string) error

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

func UpdateDateIssued

func UpdateDateIssued(db *sql.DB, id int64, y, m, d string) error

UpdateDateIssued updates the date issued year, month and day columns with the values provided. Columns updated are DateIssuedYear, DateIssuedMonth, and DateIssuedDay.

func UpdateDemozoo

func UpdateDemozoo(db *sql.DB, id int64, val string) error

UpdateDemozoo updates the WebIDDemozoo column with val.

func UpdateEmulateBroken added in v0.10.0

func UpdateEmulateBroken(db *sql.DB, id int64, val bool) error

UpdateEmulateBroken updates the column dosee_broken with val.

func UpdateEmulateCPU added in v0.10.0

func UpdateEmulateCPU(db *sql.DB, id int64, val string) error

func UpdateEmulateEMS added in v0.10.0

func UpdateEmulateEMS(db *sql.DB, id int64, val bool) error

UpdateEmulateEMS updates the column dosee_no_ems with val.

func UpdateEmulateMachine added in v0.10.0

func UpdateEmulateMachine(db *sql.DB, id int64, val string) error

func UpdateEmulateRunProgram added in v0.10.0

func UpdateEmulateRunProgram(db *sql.DB, id int64, val string) error

func UpdateEmulateSfx added in v0.10.0

func UpdateEmulateSfx(db *sql.DB, id int64, val string) error

func UpdateEmulateUMB added in v0.10.0

func UpdateEmulateUMB(db *sql.DB, id int64, val bool) error

UpdateEmulateUMB updates the column dosee_no_umb with val.

func UpdateEmulateXMS added in v0.10.0

func UpdateEmulateXMS(db *sql.DB, id int64, val bool) error

UpdateEmulateXMS updates the column dosee_no_xms with val.

func UpdateFilename

func UpdateFilename(db *sql.DB, id int64, val string) error

UpdateFilename updates the Filename column with val.

func UpdateGitHub

func UpdateGitHub(db *sql.DB, id int64, val string) error

UpdateGitHub updates the WebIDGithub column with val.

func UpdateInt64From

func UpdateInt64From(db *sql.DB, column int64From, id int64, val string) error

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(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

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

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

func UpdateOffline

func UpdateOffline(db *sql.DB, id int64) error

UpdateOffline updates the record to be offline and inaccessible to the public.

func UpdateOnline

func UpdateOnline(db *sql.DB, id int64) error

UpdateOnline updates the record to be online and public.

func UpdatePlatform

func UpdatePlatform(db *sql.DB, id int64, val string) error

UpdatePlatform updates the Platform column value with val.

func UpdatePouet

func UpdatePouet(db *sql.DB, id int64, val string) error

UpdatePouet updates the WebIDPouet column with val.

func UpdateRelations

func UpdateRelations(db *sql.DB, id int64, val string) error

UpdateRelations updates the ListRelations column value with val.

func UpdateReleasers

func UpdateReleasers(db *sql.DB, id int64, val string) error

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

func UpdateSites(db *sql.DB, id int64, val string) error

UpdateSites updates the ListLinks column with val.

func UpdateStringFrom

func UpdateStringFrom(db *sql.DB, column stringFrom, id int64, val string) error

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 UpdateTag

func UpdateTag(db *sql.DB, id int64, val string) error

UpdateTag updates the Section column with val.

func UpdateTitle

func UpdateTitle(db *sql.DB, id int64, val string) error

UpdateTitle updates the RecordTitle column with val.

func UpdateVirusTotal

func UpdateVirusTotal(db *sql.DB, id int64, val string) error

UpdateVirusTotal updates the FileSecurityAlertURL value with val.

func UpdateYMD

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

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

func UpdateYouTube

func UpdateYouTube(db *sql.DB, id int64, val string) error

UpdateYouTube updates the WebIDYoutube column value with val.

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

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

func (*Advert) List

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

func (*Advert) Stat

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

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

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.

func (*Ansi) List

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

func (*Ansi) Stat

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

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.

func (*AnsiBBS) List

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

func (*AnsiBBS) Stat

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

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.

func (*AnsiBrand) List

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

func (*AnsiBrand) Stat

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

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.

func (*AnsiFTP) List

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

func (*AnsiFTP) Stat

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

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.

func (*AnsiNfo) List

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

func (*AnsiNfo) Stat

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

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.

func (*AnsiPack) List

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

func (*AnsiPack) Stat

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

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.

func (*Artifacts) ID added in v0.8.0

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

ID returns a list of files that match the list of record ids or uuids.

func (*Artifacts) Public

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

Public returns the total number of artifacts and the summed filesize of all artifacts that are not 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 a the model for the Bulletin Board System files.

func (*BBS) List

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

func (*BBS) Stat

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

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.

func (*BBSImage) List

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

func (*BBSImage) Stat

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

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.

func (*BBSText) List

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

func (*BBSText) Stat

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

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.

func (*BBStro) List

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

func (*BBStro) Stat

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

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.

func (*Database) List

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

func (*Database) Stat

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

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.

func (*Demoscene) List

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

func (*Demoscene) Stat

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

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

func (*Drama) Stat

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

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.

func (*FTP) List

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

func (*FTP) Stat

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

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.

func (*HTML) List

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

func (*HTML) Stat

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

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.

func (*Hack) List

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

func (*Hack) Stat

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

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.

func (*HowTo) List

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

func (*HowTo) Stat

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

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.

func (*Image) List

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

func (*Image) Stat

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

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.

func (*ImagePack) List

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

func (*ImagePack) Stat

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

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

func (*Installer) Stat

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

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

func (*Intro) Stat

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

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

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.

func (*Java) List

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

func (*Java) Stat

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

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.

func (*JobAdvert) List

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

func (*JobAdvert) Stat

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

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.

func (*Linux) List

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

func (*Linux) Stat

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

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.

func (*Macos) List

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

func (*Macos) Stat

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

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.

func (*Magazine) List

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

func (*Magazine) Stat

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

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.

func (*MsDos) List

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

func (*MsDos) Stat

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

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.

func (*MsDosPack) List

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

func (*MsDosPack) Stat

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

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.

func (*Music) List

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

func (*Music) Stat

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

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.

func (*Nfo) List

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

func (*Nfo) Stat

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

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.

func (*NfoTool) List

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

func (*NfoTool) Stat

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

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

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.

func (*PDF) List

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

func (*PDF) Stat

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

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.

func (*Proof) List

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

func (*Proof) Stat

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

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

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

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

func (*Releasers) FTP

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

func (r *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 (r *Releasers) MagazineAZ(ctx context.Context, exec boil.ContextExecutor) error

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.

func (*Releasers) Slugs

func (r *Releasers) Slugs()

Slugs sets URL friendly strings to the Group names.

func (*Releasers) String added in v1.0.7

func (r *Releasers) String() string

func (*Releasers) Where

func (r *Releasers) Where(ctx context.Context, exec boil.ContextExecutor, name string) (models.FileSlice, error)

Where gets the records that match the named releaser.

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

func (*Restrict) Stat

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

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, name 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 (s *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 (s *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 (s *Sceners) Distinct(ctx context.Context, exec boil.ContextExecutor) error

Distinct gets a list of all, distinct sceners.

func (*Sceners) Musician

func (s *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 (s Sceners) Sort() []string

Sort gets a sorted slice of unique sceners.

func (*Sceners) Writer

func (s *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 a the model for the script and interpreted languages.

func (*Script) List

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

func (*Script) Stat

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

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.

func (*Standard) List

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

func (*Standard) Stat

func (s *Standard) Stat(ctx context.Context, exec boil.ContextExecutor) error

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

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

ByFilename saves the summary statistics for the filename search.

func (*Summary) ByForApproval

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

ByForApproval returns the summary statistics for files that require approval.

func (*Summary) ByHidden

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

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

func (*Summary) ByMatch

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

ByMatch returns the summary statistics for the named uri.

func (*Summary) ByPublic

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

ByPublic selects the summary statistics for all public files.

func (*Summary) ByReleaser

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

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) ByScener

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

ByScener selects the summary statistics for the named sceners.

func (*Summary) ByUnwanted

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

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

func (*Summary) Matches added in v0.14.0

func (s *Summary) Matches() map[string]StatFunc

func (*Summary) Update added in v0.8.0

func (s *Summary) Update(c, b, y0, y1 int)

Update updates the summary statistics.

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.

func (*Takedown) List

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

func (*Takedown) Stat

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

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.

func (*Text) List

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

func (*Text) Stat

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

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.

func (*TextAmiga) List

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

func (*TextAmiga) Stat

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

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.

func (*TextPack) List

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

func (*TextPack) Stat

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

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.

func (*Tool) List

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

func (*Tool) Stat

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

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

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.

func (*Video) List

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

func (*Video) Stat

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

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.

func (*Windows) List

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

func (*Windows) Stat

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

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

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.

Jump to

Keyboard shortcuts

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