sqlc

package
v0.0.0-...-f028939 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRomToCollectionParams

type AddRomToCollectionParams struct {
	CollectionID uuid.UUID `json:"collection_id"`
	RomID        uuid.UUID `json:"rom_id"`
	SortOrder    int32     `json:"sort_order"`
}

type ApiToken

type ApiToken struct {
	ID        uuid.UUID          `json:"id"`
	UserID    uuid.UUID          `json:"user_id"`
	Name      string             `json:"name"`
	TokenHash string             `json:"token_hash"`
	Scopes    []string           `json:"scopes"`
	LastUsed  pgtype.Timestamptz `json:"last_used"`
	ExpiresAt pgtype.Timestamptz `json:"expires_at"`
	CreatedAt time.Time          `json:"created_at"`
}

type CategoryCountsRow

type CategoryCountsRow struct {
	Category string `json:"category"`
	RomCount int64  `json:"rom_count"`
}

type Collection

type Collection struct {
	ID          uuid.UUID   `json:"id"`
	UserID      pgtype.UUID `json:"user_id"`
	Name        string      `json:"name"`
	Description *string     `json:"description"`
	Type        string      `json:"type"`
	CoverPath   *string     `json:"cover_path"`
	IsPublic    bool        `json:"is_public"`
	Criteria    []byte      `json:"criteria"`
	AutoSource  *string     `json:"auto_source"`
	CreatedAt   time.Time   `json:"created_at"`
	UpdatedAt   time.Time   `json:"updated_at"`
}

type CollectionImport

type CollectionImport struct {
	ID            uuid.UUID `json:"id"`
	DownloadJobID uuid.UUID `json:"download_job_id"`
	TotalFiles    int32     `json:"total_files"`
	MatchedFiles  int32     `json:"matched_files"`
	ReviewFiles   int32     `json:"review_files"`
	SelectedFiles []string  `json:"selected_files"`
	AiAnalysis    []byte    `json:"ai_analysis"`
	Status        string    `json:"status"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

type CollectionRom

type CollectionRom struct {
	CollectionID uuid.UUID `json:"collection_id"`
	RomID        uuid.UUID `json:"rom_id"`
	SortOrder    int32     `json:"sort_order"`
}

type CreateAPITokenParams

type CreateAPITokenParams struct {
	UserID    uuid.UUID          `json:"user_id"`
	Name      string             `json:"name"`
	TokenHash string             `json:"token_hash"`
	Scopes    []string           `json:"scopes"`
	ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}

type CreateCollectionImportParams

type CreateCollectionImportParams struct {
	DownloadJobID uuid.UUID `json:"download_job_id"`
	TotalFiles    int32     `json:"total_files"`
	MatchedFiles  int32     `json:"matched_files"`
	ReviewFiles   int32     `json:"review_files"`
	SelectedFiles []string  `json:"selected_files"`
	AiAnalysis    []byte    `json:"ai_analysis"`
	Status        string    `json:"status"`
}

type CreateCollectionParams

type CreateCollectionParams struct {
	UserID      pgtype.UUID `json:"user_id"`
	Name        string      `json:"name"`
	Description *string     `json:"description"`
	Type        string      `json:"type"`
	IsPublic    bool        `json:"is_public"`
	Criteria    []byte      `json:"criteria"`
	AutoSource  *string     `json:"auto_source"`
}

type CreateDatEntryParams

type CreateDatEntryParams struct {
	DatID       uuid.UUID `json:"dat_id"`
	GameName    string    `json:"game_name"`
	RomName     string    `json:"rom_name"`
	Size        *int64    `json:"size"`
	Crc32       *string   `json:"crc32"`
	Md5         *string   `json:"md5"`
	Sha1        *string   `json:"sha1"`
	Sha256      *string   `json:"sha256"`
	Status      *string   `json:"status"`
	ParentName  *string   `json:"parent_name"`
	CloneOf     *string   `json:"clone_of"`
	Region      []string  `json:"region"`
	Language    []string  `json:"language"`
	Category    *string   `json:"category"`
	Description *string   `json:"description"`
}

type CreateDatFileParams

type CreateDatFileParams struct {
	Name        string  `json:"name"`
	Description *string `json:"description"`
	Format      string  `json:"format"`
	Source      *string `json:"source"`
	Version     *string `json:"version"`
	Date        *string `json:"date"`
	RomCount    *int32  `json:"rom_count"`
	AutoUpdate  bool    `json:"auto_update"`
	FilePath    string  `json:"file_path"`
}

type CreateDeviceParams

type CreateDeviceParams struct {
	UserID     uuid.UUID `json:"user_id"`
	Name       string    `json:"name"`
	Type       string    `json:"type"`
	Hostname   *string   `json:"hostname"`
	IpAddress  *string   `json:"ip_address"`
	MacAddress *string   `json:"mac_address"`
	SyncMode   *string   `json:"sync_mode"`
	SshHost    *string   `json:"ssh_host"`
	SshPort    *int32    `json:"ssh_port"`
	SshUser    *string   `json:"ssh_user"`
	SshKeyPath *string   `json:"ssh_key_path"`
}

type CreateDownloadClientParams

type CreateDownloadClientParams struct {
	Name     string  `json:"name"`
	Kind     string  `json:"kind"`
	Host     string  `json:"host"`
	Port     *int32  `json:"port"`
	Username *string `json:"username"`
	Password *string `json:"password"`
	Category *string `json:"category"`
	UseSsl   bool    `json:"use_ssl"`
	Priority int32   `json:"priority"`
	Enabled  bool    `json:"enabled"`
	Settings []byte  `json:"settings"`
}

type CreateDownloadJobParams

type CreateDownloadJobParams struct {
	ReleaseID        uuid.UUID `json:"release_id"`
	DownloadClientID uuid.UUID `json:"download_client_id"`
	ClientJobID      *string   `json:"client_job_id"`
	Status           string    `json:"status"`
}

type CreateFirmwareParams

type CreateFirmwareParams struct {
	PlatformID uuid.UUID `json:"platform_id"`
	FileName   string    `json:"file_name"`
	FilePath   string    `json:"file_path"`
	FileSize   int64     `json:"file_size"`
	Crc32      *string   `json:"crc32"`
	Md5        *string   `json:"md5"`
	Sha1       *string   `json:"sha1"`
	Verified   bool      `json:"verified"`
}

type CreateIndexerParams

type CreateIndexerParams struct {
	Name       string   `json:"name"`
	Kind       string   `json:"kind"`
	Url        string   `json:"url"`
	ApiKey     *string  `json:"api_key"`
	Priority   int32    `json:"priority"`
	Enabled    bool     `json:"enabled"`
	Categories []string `json:"categories"`
	Settings   []byte   `json:"settings"`
}

type CreatePlatformParams

type CreatePlatformParams struct {
	Slug        string  `json:"slug"`
	Name        string  `json:"name"`
	Generation  *int32  `json:"generation"`
	Family      *string `json:"family"`
	IgdbID      *int64  `json:"igdb_id"`
	SgdbID      *int64  `json:"sgdb_id"`
	MobyID      *int64  `json:"moby_id"`
	SsID        *int64  `json:"ss_id"`
	RaID        *int64  `json:"ra_id"`
	CoverAspect *string `json:"cover_aspect"`
	Metadata    []byte  `json:"metadata"`
}

type CreatePlaySessionParams

type CreatePlaySessionParams struct {
	UserID    uuid.UUID   `json:"user_id"`
	RomID     uuid.UUID   `json:"rom_id"`
	DeviceID  pgtype.UUID `json:"device_id"`
	StartedAt time.Time   `json:"started_at"`
}

type CreateReleaseParams

type CreateReleaseParams struct {
	WantedID       pgtype.UUID        `json:"wanted_id"`
	IndexerID      uuid.UUID          `json:"indexer_id"`
	Title          string             `json:"title"`
	Guid           string             `json:"guid"`
	DownloadUrl    string             `json:"download_url"`
	Size           *int64             `json:"size"`
	Seeders        *int32             `json:"seeders"`
	Leechers       *int32             `json:"leechers"`
	PublishDate    pgtype.Timestamptz `json:"publish_date"`
	MimeType       *string            `json:"mime_type"`
	InfoHash       *string            `json:"info_hash"`
	Categories     []string           `json:"categories"`
	ParsedName     *string            `json:"parsed_name"`
	ParsedRegion   []string           `json:"parsed_region"`
	ParsedLanguage []string           `json:"parsed_language"`
	ParsedRevision *string            `json:"parsed_revision"`
	IsCollection   bool               `json:"is_collection"`
	MatchStatus    string             `json:"match_status"`
	MatchReason    *string            `json:"match_reason"`
	Confidence     float32            `json:"confidence"`
}

type CreateRomMediaParams

type CreateRomMediaParams struct {
	RomID    uuid.UUID `json:"rom_id"`
	Type     string    `json:"type"`
	Source   string    `json:"source"`
	Path     string    `json:"path"`
	Width    *int32    `json:"width"`
	Height   *int32    `json:"height"`
	Size     *int64    `json:"size"`
	MimeType *string   `json:"mime_type"`
}

type CreateRomNoteParams

type CreateRomNoteParams struct {
	UserID   uuid.UUID `json:"user_id"`
	RomID    uuid.UUID `json:"rom_id"`
	Content  string    `json:"content"`
	IsPublic bool      `json:"is_public"`
	Tags     []string  `json:"tags"`
}

type CreateRomParams

type CreateRomParams struct {
	PlatformID     uuid.UUID   `json:"platform_id"`
	FileName       string      `json:"file_name"`
	FilePath       string      `json:"file_path"`
	FileSize       int64       `json:"file_size"`
	Name           *string     `json:"name"`
	SortName       *string     `json:"sort_name"`
	Summary        *string     `json:"summary"`
	Description    *string     `json:"description"`
	Crc32          *string     `json:"crc32"`
	Md5            *string     `json:"md5"`
	Sha1           *string     `json:"sha1"`
	Sha256         *string     `json:"sha256"`
	RaHash         *string     `json:"ra_hash"`
	IgdbID         *int64      `json:"igdb_id"`
	MobyID         *int64      `json:"moby_id"`
	SsID           *int64      `json:"ss_id"`
	RaID           *int64      `json:"ra_id"`
	SteamgriddbID  *int64      `json:"steamgriddb_id"`
	Genres         []string    `json:"genres"`
	Franchises     []string    `json:"franchises"`
	Companies      []string    `json:"companies"`
	GameModes      []string    `json:"game_modes"`
	AgeRatings     []byte      `json:"age_ratings"`
	AltNames       []string    `json:"alt_names"`
	FirstRelease   pgtype.Date `json:"first_release"`
	AvgRating      *float32    `json:"avg_rating"`
	PlayerCount    *string     `json:"player_count"`
	YoutubeID      *string     `json:"youtube_id"`
	Category       string      `json:"category"`
	DatMatch       bool        `json:"dat_match"`
	DatName        *string     `json:"dat_name"`
	DatDescription *string     `json:"dat_description"`
	Region         []string    `json:"region"`
	Language       []string    `json:"language"`
	Revision       *string     `json:"revision"`
	Version        *string     `json:"version"`
	MultiFile      bool        `json:"multi_file"`
	ParentID       pgtype.UUID `json:"parent_id"`
	Metadata       []byte      `json:"metadata"`
}

type CreateSaveParams

type CreateSaveParams struct {
	UserID      uuid.UUID `json:"user_id"`
	RomID       uuid.UUID `json:"rom_id"`
	FileName    string    `json:"file_name"`
	FilePath    string    `json:"file_path"`
	FileSize    int64     `json:"file_size"`
	Emulator    *string   `json:"emulator"`
	Slot        *int32    `json:"slot"`
	ContentHash *string   `json:"content_hash"`
}

type CreateSyncSessionParams

type CreateSyncSessionParams struct {
	UserID    uuid.UUID `json:"user_id"`
	DeviceID  uuid.UUID `json:"device_id"`
	Status    string    `json:"status"`
	Direction string    `json:"direction"`
}

type CreateUserParams

type CreateUserParams struct {
	Username     string  `json:"username"`
	Email        *string `json:"email"`
	PasswordHash *string `json:"password_hash"`
	Role         string  `json:"role"`
}

type CreateWantedROMParams

type CreateWantedROMParams struct {
	UserID          pgtype.UUID `json:"user_id"`
	PlatformID      uuid.UUID   `json:"platform_id"`
	GameName        string      `json:"game_name"`
	DatEntryID      pgtype.UUID `json:"dat_entry_id"`
	ExpectedCrc32   *string     `json:"expected_crc32"`
	ExpectedSha1    *string     `json:"expected_sha1"`
	ExpectedMd5     *string     `json:"expected_md5"`
	PreferRegions   []string    `json:"prefer_regions"`
	PreferLanguages []string    `json:"prefer_languages"`
	PreferRevision  *string     `json:"prefer_revision"`
	AllowPrototype  bool        `json:"allow_prototype"`
	AllowBeta       bool        `json:"allow_beta"`
	AllowDemo       bool        `json:"allow_demo"`
	AllowHack       bool        `json:"allow_hack"`
	Priority        int32       `json:"priority"`
	Source          string      `json:"source"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DatEntry

type DatEntry struct {
	ID          uuid.UUID `json:"id"`
	DatID       uuid.UUID `json:"dat_id"`
	GameName    string    `json:"game_name"`
	RomName     string    `json:"rom_name"`
	Size        *int64    `json:"size"`
	Crc32       *string   `json:"crc32"`
	Md5         *string   `json:"md5"`
	Sha1        *string   `json:"sha1"`
	Sha256      *string   `json:"sha256"`
	Status      *string   `json:"status"`
	ParentName  *string   `json:"parent_name"`
	CloneOf     *string   `json:"clone_of"`
	Region      []string  `json:"region"`
	Language    []string  `json:"language"`
	Category    *string   `json:"category"`
	Description *string   `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
}

type DatFile

type DatFile struct {
	ID          uuid.UUID          `json:"id"`
	Name        string             `json:"name"`
	Description *string            `json:"description"`
	Format      string             `json:"format"`
	Source      *string            `json:"source"`
	Version     *string            `json:"version"`
	Date        *string            `json:"date"`
	RomCount    *int32             `json:"rom_count"`
	AutoUpdate  bool               `json:"auto_update"`
	FilePath    string             `json:"file_path"`
	LastUpdated pgtype.Timestamptz `json:"last_updated"`
	CreatedAt   time.Time          `json:"created_at"`
}

type Device

type Device struct {
	ID            uuid.UUID          `json:"id"`
	UserID        uuid.UUID          `json:"user_id"`
	Name          string             `json:"name"`
	Type          string             `json:"type"`
	Hostname      *string            `json:"hostname"`
	IpAddress     *string            `json:"ip_address"`
	MacAddress    *string            `json:"mac_address"`
	ClientVersion *string            `json:"client_version"`
	SyncMode      *string            `json:"sync_mode"`
	SshHost       *string            `json:"ssh_host"`
	SshPort       *int32             `json:"ssh_port"`
	SshUser       *string            `json:"ssh_user"`
	SshKeyPath    *string            `json:"ssh_key_path"`
	LastSeen      pgtype.Timestamptz `json:"last_seen"`
	CreatedAt     time.Time          `json:"created_at"`
	UpdatedAt     time.Time          `json:"updated_at"`
}

type DownloadClient

type DownloadClient struct {
	ID        uuid.UUID `json:"id"`
	Name      string    `json:"name"`
	Kind      string    `json:"kind"`
	Host      string    `json:"host"`
	Port      *int32    `json:"port"`
	Username  *string   `json:"username"`
	Password  *string   `json:"password"`
	Category  *string   `json:"category"`
	UseSsl    bool      `json:"use_ssl"`
	Priority  int32     `json:"priority"`
	Enabled   bool      `json:"enabled"`
	Settings  []byte    `json:"settings"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type DownloadJob

type DownloadJob struct {
	ID               uuid.UUID          `json:"id"`
	ReleaseID        uuid.UUID          `json:"release_id"`
	DownloadClientID uuid.UUID          `json:"download_client_id"`
	ClientJobID      *string            `json:"client_job_id"`
	Status           string             `json:"status"`
	Progress         float32            `json:"progress"`
	BytesDownloaded  int64              `json:"bytes_downloaded"`
	DownloadPath     *string            `json:"download_path"`
	ErrorMessage     *string            `json:"error_message"`
	StartedAt        pgtype.Timestamptz `json:"started_at"`
	CompletedAt      pgtype.Timestamptz `json:"completed_at"`
	ImportedAt       pgtype.Timestamptz `json:"imported_at"`
	CreatedAt        time.Time          `json:"created_at"`
	UpdatedAt        time.Time          `json:"updated_at"`
}

type EndPlaySessionParams

type EndPlaySessionParams struct {
	ID           uuid.UUID          `json:"id"`
	EndedAt      pgtype.Timestamptz `json:"ended_at"`
	DurationSecs *int32             `json:"duration_secs"`
}

type Firmware

type Firmware struct {
	ID         uuid.UUID `json:"id"`
	PlatformID uuid.UUID `json:"platform_id"`
	FileName   string    `json:"file_name"`
	FilePath   string    `json:"file_path"`
	FileSize   int64     `json:"file_size"`
	Crc32      *string   `json:"crc32"`
	Md5        *string   `json:"md5"`
	Sha1       *string   `json:"sha1"`
	Verified   bool      `json:"verified"`
	CreatedAt  time.Time `json:"created_at"`
}

type GenreCountsRow

type GenreCountsRow struct {
	Genre    interface{} `json:"genre"`
	RomCount int64       `json:"rom_count"`
}

type GetUserRomPropsParams

type GetUserRomPropsParams struct {
	UserID uuid.UUID `json:"user_id"`
	RomID  uuid.UUID `json:"rom_id"`
}

type Indexer

type Indexer struct {
	ID          uuid.UUID          `json:"id"`
	Name        string             `json:"name"`
	Kind        string             `json:"kind"`
	Url         string             `json:"url"`
	ApiKey      *string            `json:"api_key"`
	Priority    int32              `json:"priority"`
	Enabled     bool               `json:"enabled"`
	Categories  []string           `json:"categories"`
	Settings    []byte             `json:"settings"`
	LastRssSync pgtype.Timestamptz `json:"last_rss_sync"`
	CreatedAt   time.Time          `json:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at"`
}

type ListCollectionImportsParams

type ListCollectionImportsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListCollectionRomsParams

type ListCollectionRomsParams struct {
	CollectionID uuid.UUID `json:"collection_id"`
	Limit        int32     `json:"limit"`
	Offset       int32     `json:"offset"`
}

type ListCollectionsByUserParams

type ListCollectionsByUserParams struct {
	UserID pgtype.UUID `json:"user_id"`
	Limit  int32       `json:"limit"`
	Offset int32       `json:"offset"`
}

type ListCollectionsParams

type ListCollectionsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListDatEntriesByDatParams

type ListDatEntriesByDatParams struct {
	DatID  uuid.UUID `json:"dat_id"`
	Limit  int32     `json:"limit"`
	Offset int32     `json:"offset"`
}

type ListDatFilesParams

type ListDatFilesParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListDownloadJobsParams

type ListDownloadJobsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListPendingReleasesParams

type ListPendingReleasesParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListPlatformsParams

type ListPlatformsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListPlaySessionsByRomParams

type ListPlaySessionsByRomParams struct {
	RomID  uuid.UUID `json:"rom_id"`
	Limit  int32     `json:"limit"`
	Offset int32     `json:"offset"`
}

type ListPlaySessionsByUserParams

type ListPlaySessionsByUserParams struct {
	UserID uuid.UUID `json:"user_id"`
	Limit  int32     `json:"limit"`
	Offset int32     `json:"offset"`
}

type ListReviewReleasesParams

type ListReviewReleasesParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListRomsByCategoryParams

type ListRomsByCategoryParams struct {
	Category string `json:"category"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type ListRomsByPlatformParams

type ListRomsByPlatformParams struct {
	PlatformID uuid.UUID `json:"platform_id"`
	Limit      int32     `json:"limit"`
	Offset     int32     `json:"offset"`
}

type ListRomsParams

type ListRomsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListSavesByUserAndRomParams

type ListSavesByUserAndRomParams struct {
	UserID uuid.UUID `json:"user_id"`
	RomID  uuid.UUID `json:"rom_id"`
}

type ListSyncSessionsByDeviceParams

type ListSyncSessionsByDeviceParams struct {
	DeviceID uuid.UUID `json:"device_id"`
	Limit    int32     `json:"limit"`
	Offset   int32     `json:"offset"`
}

type ListUnmatchedRomsParams

type ListUnmatchedRomsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListUsersParams

type ListUsersParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type ListWantedROMsByStatusParams

type ListWantedROMsByStatusParams struct {
	Status string `json:"status"`
	Limit  int32  `json:"limit"`
	Offset int32  `json:"offset"`
}

type ListWantedROMsParams

type ListWantedROMsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type Platform

type Platform struct {
	ID           uuid.UUID `json:"id"`
	Slug         string    `json:"slug"`
	Name         string    `json:"name"`
	Generation   *int32    `json:"generation"`
	Family       *string   `json:"family"`
	IgdbID       *int64    `json:"igdb_id"`
	SgdbID       *int64    `json:"sgdb_id"`
	MobyID       *int64    `json:"moby_id"`
	SsID         *int64    `json:"ss_id"`
	RaID         *int64    `json:"ra_id"`
	LaunchboxID  *int64    `json:"launchbox_id"`
	HasheousID   *int64    `json:"hasheous_id"`
	TgdbID       *int64    `json:"tgdb_id"`
	FlashpointID *int64    `json:"flashpoint_id"`
	CoverAspect  *string   `json:"cover_aspect"`
	Metadata     []byte    `json:"metadata"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type PlatformROMCountsRow

type PlatformROMCountsRow struct {
	Slug     string `json:"slug"`
	Name     string `json:"name"`
	RomCount int64  `json:"rom_count"`
}

type PlaySession

type PlaySession struct {
	ID           uuid.UUID          `json:"id"`
	UserID       uuid.UUID          `json:"user_id"`
	RomID        uuid.UUID          `json:"rom_id"`
	DeviceID     pgtype.UUID        `json:"device_id"`
	StartedAt    time.Time          `json:"started_at"`
	EndedAt      pgtype.Timestamptz `json:"ended_at"`
	DurationSecs *int32             `json:"duration_secs"`
	CreatedAt    time.Time          `json:"created_at"`
}

type Querier

type Querier interface {
	AddRomToCollection(ctx context.Context, arg AddRomToCollectionParams) error
	CategoryCounts(ctx context.Context) ([]CategoryCountsRow, error)
	CountCollectionRoms(ctx context.Context, collectionID uuid.UUID) (int64, error)
	CountCollections(ctx context.Context) (int64, error)
	CountDatEntriesByDat(ctx context.Context, datID uuid.UUID) (int64, error)
	CountDatFiles(ctx context.Context) (int64, error)
	CountPlatforms(ctx context.Context) (int64, error)
	CountRoms(ctx context.Context) (int64, error)
	CountRomsByPlatform(ctx context.Context, platformID uuid.UUID) (int64, error)
	CountSaves(ctx context.Context) (int64, error)
	CountUsers(ctx context.Context) (int64, error)
	CountWantedROMs(ctx context.Context) (int64, error)
	CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (ApiToken, error)
	CreateCollection(ctx context.Context, arg CreateCollectionParams) (Collection, error)
	CreateCollectionImport(ctx context.Context, arg CreateCollectionImportParams) (CollectionImport, error)
	CreateDatEntry(ctx context.Context, arg CreateDatEntryParams) error
	CreateDatFile(ctx context.Context, arg CreateDatFileParams) (DatFile, error)
	CreateDevice(ctx context.Context, arg CreateDeviceParams) (Device, error)
	CreateDownloadClient(ctx context.Context, arg CreateDownloadClientParams) (DownloadClient, error)
	CreateDownloadJob(ctx context.Context, arg CreateDownloadJobParams) (DownloadJob, error)
	CreateFirmware(ctx context.Context, arg CreateFirmwareParams) (Firmware, error)
	CreateIndexer(ctx context.Context, arg CreateIndexerParams) (Indexer, error)
	CreatePlatform(ctx context.Context, arg CreatePlatformParams) (Platform, error)
	CreatePlaySession(ctx context.Context, arg CreatePlaySessionParams) (PlaySession, error)
	CreateRelease(ctx context.Context, arg CreateReleaseParams) (Release, error)
	CreateRom(ctx context.Context, arg CreateRomParams) (Rom, error)
	CreateRomMedia(ctx context.Context, arg CreateRomMediaParams) (RomMedium, error)
	CreateRomNote(ctx context.Context, arg CreateRomNoteParams) (RomNote, error)
	CreateSave(ctx context.Context, arg CreateSaveParams) (Safe, error)
	CreateSyncSession(ctx context.Context, arg CreateSyncSessionParams) (SyncSession, error)
	CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
	CreateWantedROM(ctx context.Context, arg CreateWantedROMParams) (WantedRom, error)
	DATMatchPercentage(ctx context.Context) (float64, error)
	DeleteAPIToken(ctx context.Context, id uuid.UUID) error
	DeleteAllRomMedia(ctx context.Context, romID uuid.UUID) error
	DeleteCollection(ctx context.Context, id uuid.UUID) error
	DeleteDatEntriesByDat(ctx context.Context, datID uuid.UUID) error
	DeleteDatFile(ctx context.Context, id uuid.UUID) error
	DeleteDevice(ctx context.Context, id uuid.UUID) error
	DeleteDownloadClient(ctx context.Context, id uuid.UUID) error
	DeleteFirmware(ctx context.Context, id uuid.UUID) error
	DeleteIndexer(ctx context.Context, id uuid.UUID) error
	DeletePlatform(ctx context.Context, id uuid.UUID) error
	DeleteRelease(ctx context.Context, id uuid.UUID) error
	DeleteRom(ctx context.Context, id uuid.UUID) error
	DeleteRomMedia(ctx context.Context, id uuid.UUID) error
	DeleteRomNote(ctx context.Context, id uuid.UUID) error
	DeleteSave(ctx context.Context, id uuid.UUID) error
	DeleteUser(ctx context.Context, id uuid.UUID) error
	DeleteWantedROM(ctx context.Context, id uuid.UUID) error
	EndPlaySession(ctx context.Context, arg EndPlaySessionParams) error
	FindDatEntryByCRC32(ctx context.Context, crc32 *string) ([]DatEntry, error)
	FindDatEntryBySHA1(ctx context.Context, sha1 *string) ([]DatEntry, error)
	FindRomByCRC32(ctx context.Context, crc32 *string) ([]Rom, error)
	FindRomByFilePath(ctx context.Context, filePath string) (Rom, error)
	FindRomByMD5(ctx context.Context, md5 *string) ([]Rom, error)
	FindRomBySHA1(ctx context.Context, sha1 *string) ([]Rom, error)
	FindWantedByCRC32(ctx context.Context, expectedCrc32 *string) ([]WantedRom, error)
	FindWantedBySHA1(ctx context.Context, expectedSha1 *string) ([]WantedRom, error)
	GenreCounts(ctx context.Context) ([]GenreCountsRow, error)
	GetAPIToken(ctx context.Context, id uuid.UUID) (ApiToken, error)
	GetCollection(ctx context.Context, id uuid.UUID) (Collection, error)
	GetCollectionImport(ctx context.Context, id uuid.UUID) (CollectionImport, error)
	GetCollectionImportByJob(ctx context.Context, downloadJobID uuid.UUID) (CollectionImport, error)
	GetDatFile(ctx context.Context, id uuid.UUID) (DatFile, error)
	GetDevice(ctx context.Context, id uuid.UUID) (Device, error)
	GetDownloadClient(ctx context.Context, id uuid.UUID) (DownloadClient, error)
	GetDownloadJob(ctx context.Context, id uuid.UUID) (DownloadJob, error)
	GetFirmware(ctx context.Context, id uuid.UUID) (Firmware, error)
	GetIndexer(ctx context.Context, id uuid.UUID) (Indexer, error)
	GetPlatform(ctx context.Context, id uuid.UUID) (Platform, error)
	GetPlatformBySlug(ctx context.Context, slug string) (Platform, error)
	GetPlaySession(ctx context.Context, id uuid.UUID) (PlaySession, error)
	GetRelease(ctx context.Context, id uuid.UUID) (Release, error)
	GetRom(ctx context.Context, id uuid.UUID) (Rom, error)
	GetRomMedia(ctx context.Context, romID uuid.UUID) ([]RomMedium, error)
	GetRomNote(ctx context.Context, id uuid.UUID) (RomNote, error)
	GetSave(ctx context.Context, id uuid.UUID) (Safe, error)
	GetSyncSession(ctx context.Context, id uuid.UUID) (SyncSession, error)
	GetUser(ctx context.Context, id uuid.UUID) (User, error)
	GetUserByEmail(ctx context.Context, email *string) (User, error)
	GetUserByOIDCSubject(ctx context.Context, oidcSubject *string) (User, error)
	GetUserByUsername(ctx context.Context, username string) (User, error)
	GetUserRomProps(ctx context.Context, arg GetUserRomPropsParams) (UserRomProp, error)
	GetWantedROM(ctx context.Context, id uuid.UUID) (WantedRom, error)
	ListAPITokensByUser(ctx context.Context, userID uuid.UUID) ([]ApiToken, error)
	ListActiveDownloadJobs(ctx context.Context) ([]DownloadJob, error)
	ListAutoUpdateDats(ctx context.Context) ([]DatFile, error)
	ListAwaitingReview(ctx context.Context) ([]CollectionImport, error)
	ListBacklog(ctx context.Context, userID uuid.UUID) ([]Rom, error)
	ListCollectionImports(ctx context.Context, arg ListCollectionImportsParams) ([]CollectionImport, error)
	ListCollectionRoms(ctx context.Context, arg ListCollectionRomsParams) ([]Rom, error)
	ListCollections(ctx context.Context, arg ListCollectionsParams) ([]Collection, error)
	ListCollectionsByUser(ctx context.Context, arg ListCollectionsByUserParams) ([]Collection, error)
	ListDatEntriesByDat(ctx context.Context, arg ListDatEntriesByDatParams) ([]DatEntry, error)
	ListDatFiles(ctx context.Context, arg ListDatFilesParams) ([]DatFile, error)
	ListDevicesByUser(ctx context.Context, userID uuid.UUID) ([]Device, error)
	ListDownloadClients(ctx context.Context) ([]DownloadClient, error)
	ListDownloadJobs(ctx context.Context, arg ListDownloadJobsParams) ([]DownloadJob, error)
	ListEnabledDownloadClients(ctx context.Context) ([]DownloadClient, error)
	ListEnabledIndexers(ctx context.Context) ([]Indexer, error)
	ListFirmwareByPlatform(ctx context.Context, platformID uuid.UUID) ([]Firmware, error)
	ListIndexers(ctx context.Context) ([]Indexer, error)
	ListNowPlaying(ctx context.Context, userID uuid.UUID) ([]Rom, error)
	ListPendingReleases(ctx context.Context, arg ListPendingReleasesParams) ([]Release, error)
	ListPlatforms(ctx context.Context, arg ListPlatformsParams) ([]Platform, error)
	ListPlaySessionsByRom(ctx context.Context, arg ListPlaySessionsByRomParams) ([]PlaySession, error)
	ListPlaySessionsByUser(ctx context.Context, arg ListPlaySessionsByUserParams) ([]PlaySession, error)
	ListPublicRomNotes(ctx context.Context, romID uuid.UUID) ([]RomNote, error)
	ListReleasesByWanted(ctx context.Context, wantedID pgtype.UUID) ([]Release, error)
	ListReviewReleases(ctx context.Context, arg ListReviewReleasesParams) ([]Release, error)
	ListRomNotes(ctx context.Context, romID uuid.UUID) ([]RomNote, error)
	ListRoms(ctx context.Context, arg ListRomsParams) ([]Rom, error)
	ListRomsByCategory(ctx context.Context, arg ListRomsByCategoryParams) ([]Rom, error)
	ListRomsByPlatform(ctx context.Context, arg ListRomsByPlatformParams) ([]Rom, error)
	ListSavesByUserAndRom(ctx context.Context, arg ListSavesByUserAndRomParams) ([]Safe, error)
	ListSearchableWanted(ctx context.Context, limit int32) ([]WantedRom, error)
	ListSyncSessionsByDevice(ctx context.Context, arg ListSyncSessionsByDeviceParams) ([]SyncSession, error)
	ListUnmatchedRoms(ctx context.Context, arg ListUnmatchedRomsParams) ([]Rom, error)
	ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
	ListWantedROMs(ctx context.Context, arg ListWantedROMsParams) ([]WantedRom, error)
	ListWantedROMsByStatus(ctx context.Context, arg ListWantedROMsByStatusParams) ([]WantedRom, error)
	PlatformROMCounts(ctx context.Context) ([]PlatformROMCountsRow, error)
	RecentPlaySessions(ctx context.Context, arg RecentPlaySessionsParams) ([]RecentPlaySessionsRow, error)
	RecentROMs(ctx context.Context, limit int32) ([]Rom, error)
	RegionCounts(ctx context.Context) ([]RegionCountsRow, error)
	RemoveRomFromCollection(ctx context.Context, arg RemoveRomFromCollectionParams) error
	SearchCollectionsByName(ctx context.Context, arg SearchCollectionsByNameParams) ([]Collection, error)
	SearchPlatformsByName(ctx context.Context, arg SearchPlatformsByNameParams) ([]Platform, error)
	SearchROMsByName(ctx context.Context, arg SearchROMsByNameParams) ([]SearchROMsByNameRow, error)
	SearchRomsByName(ctx context.Context, arg SearchRomsByNameParams) ([]Rom, error)
	TotalLibrarySize(ctx context.Context) (int64, error)
	TotalPlayTimeByRom(ctx context.Context, romID uuid.UUID) (int64, error)
	TotalPlayTimeByUser(ctx context.Context, userID uuid.UUID) (int64, error)
	UpdateAPITokenLastUsed(ctx context.Context, id uuid.UUID) error
	UpdateCollection(ctx context.Context, arg UpdateCollectionParams) (Collection, error)
	UpdateCollectionAnalysis(ctx context.Context, arg UpdateCollectionAnalysisParams) error
	UpdateCollectionImportStatus(ctx context.Context, arg UpdateCollectionImportStatusParams) error
	UpdateCollectionSelection(ctx context.Context, arg UpdateCollectionSelectionParams) error
	UpdateDatFile(ctx context.Context, arg UpdateDatFileParams) (DatFile, error)
	UpdateDeviceLastSeen(ctx context.Context, id uuid.UUID) error
	UpdateDownloadClient(ctx context.Context, arg UpdateDownloadClientParams) error
	UpdateDownloadJobProgress(ctx context.Context, arg UpdateDownloadJobProgressParams) error
	UpdateIndexer(ctx context.Context, arg UpdateIndexerParams) error
	UpdateIndexerLastSync(ctx context.Context, id uuid.UUID) error
	UpdatePlatform(ctx context.Context, arg UpdatePlatformParams) (Platform, error)
	UpdateReleaseMatch(ctx context.Context, arg UpdateReleaseMatchParams) error
	UpdateRomDatMatch(ctx context.Context, arg UpdateRomDatMatchParams) error
	UpdateRomHashes(ctx context.Context, arg UpdateRomHashesParams) error
	UpdateRomMetadata(ctx context.Context, arg UpdateRomMetadataParams) (Rom, error)
	UpdateRomNote(ctx context.Context, arg UpdateRomNoteParams) (RomNote, error)
	UpdateSyncSession(ctx context.Context, arg UpdateSyncSessionParams) error
	UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
	UpdateUserOIDC(ctx context.Context, arg UpdateUserOIDCParams) error
	UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
	UpdateUserTOTP(ctx context.Context, arg UpdateUserTOTPParams) error
	UpdateUserWebAuthn(ctx context.Context, arg UpdateUserWebAuthnParams) error
	UpdateWantedStatus(ctx context.Context, arg UpdateWantedStatusParams) error
	UpsertUserRomProps(ctx context.Context, arg UpsertUserRomPropsParams) error
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddRomToCollection

func (q *Queries) AddRomToCollection(ctx context.Context, arg AddRomToCollectionParams) error

func (*Queries) CategoryCounts

func (q *Queries) CategoryCounts(ctx context.Context) ([]CategoryCountsRow, error)

func (*Queries) CountCollectionRoms

func (q *Queries) CountCollectionRoms(ctx context.Context, collectionID uuid.UUID) (int64, error)

func (*Queries) CountCollections

func (q *Queries) CountCollections(ctx context.Context) (int64, error)

func (*Queries) CountDatEntriesByDat

func (q *Queries) CountDatEntriesByDat(ctx context.Context, datID uuid.UUID) (int64, error)

func (*Queries) CountDatFiles

func (q *Queries) CountDatFiles(ctx context.Context) (int64, error)

func (*Queries) CountPlatforms

func (q *Queries) CountPlatforms(ctx context.Context) (int64, error)

func (*Queries) CountRoms

func (q *Queries) CountRoms(ctx context.Context) (int64, error)

func (*Queries) CountRomsByPlatform

func (q *Queries) CountRomsByPlatform(ctx context.Context, platformID uuid.UUID) (int64, error)

func (*Queries) CountSaves

func (q *Queries) CountSaves(ctx context.Context) (int64, error)

func (*Queries) CountUsers

func (q *Queries) CountUsers(ctx context.Context) (int64, error)

func (*Queries) CountWantedROMs

func (q *Queries) CountWantedROMs(ctx context.Context) (int64, error)

func (*Queries) CreateAPIToken

func (q *Queries) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (ApiToken, error)

func (*Queries) CreateCollection

func (q *Queries) CreateCollection(ctx context.Context, arg CreateCollectionParams) (Collection, error)

func (*Queries) CreateCollectionImport

func (q *Queries) CreateCollectionImport(ctx context.Context, arg CreateCollectionImportParams) (CollectionImport, error)

func (*Queries) CreateDatEntry

func (q *Queries) CreateDatEntry(ctx context.Context, arg CreateDatEntryParams) error

func (*Queries) CreateDatFile

func (q *Queries) CreateDatFile(ctx context.Context, arg CreateDatFileParams) (DatFile, error)

func (*Queries) CreateDevice

func (q *Queries) CreateDevice(ctx context.Context, arg CreateDeviceParams) (Device, error)

func (*Queries) CreateDownloadClient

func (q *Queries) CreateDownloadClient(ctx context.Context, arg CreateDownloadClientParams) (DownloadClient, error)

func (*Queries) CreateDownloadJob

func (q *Queries) CreateDownloadJob(ctx context.Context, arg CreateDownloadJobParams) (DownloadJob, error)

func (*Queries) CreateFirmware

func (q *Queries) CreateFirmware(ctx context.Context, arg CreateFirmwareParams) (Firmware, error)

func (*Queries) CreateIndexer

func (q *Queries) CreateIndexer(ctx context.Context, arg CreateIndexerParams) (Indexer, error)

func (*Queries) CreatePlatform

func (q *Queries) CreatePlatform(ctx context.Context, arg CreatePlatformParams) (Platform, error)

func (*Queries) CreatePlaySession

func (q *Queries) CreatePlaySession(ctx context.Context, arg CreatePlaySessionParams) (PlaySession, error)

func (*Queries) CreateRelease

func (q *Queries) CreateRelease(ctx context.Context, arg CreateReleaseParams) (Release, error)

func (*Queries) CreateRom

func (q *Queries) CreateRom(ctx context.Context, arg CreateRomParams) (Rom, error)

func (*Queries) CreateRomMedia

func (q *Queries) CreateRomMedia(ctx context.Context, arg CreateRomMediaParams) (RomMedium, error)

func (*Queries) CreateRomNote

func (q *Queries) CreateRomNote(ctx context.Context, arg CreateRomNoteParams) (RomNote, error)

func (*Queries) CreateSave

func (q *Queries) CreateSave(ctx context.Context, arg CreateSaveParams) (Safe, error)

func (*Queries) CreateSyncSession

func (q *Queries) CreateSyncSession(ctx context.Context, arg CreateSyncSessionParams) (SyncSession, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) CreateWantedROM

func (q *Queries) CreateWantedROM(ctx context.Context, arg CreateWantedROMParams) (WantedRom, error)

func (*Queries) DATMatchPercentage

func (q *Queries) DATMatchPercentage(ctx context.Context) (float64, error)

func (*Queries) DeleteAPIToken

func (q *Queries) DeleteAPIToken(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteAllRomMedia

func (q *Queries) DeleteAllRomMedia(ctx context.Context, romID uuid.UUID) error

func (*Queries) DeleteCollection

func (q *Queries) DeleteCollection(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteDatEntriesByDat

func (q *Queries) DeleteDatEntriesByDat(ctx context.Context, datID uuid.UUID) error

func (*Queries) DeleteDatFile

func (q *Queries) DeleteDatFile(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteDevice

func (q *Queries) DeleteDevice(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteDownloadClient

func (q *Queries) DeleteDownloadClient(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteFirmware

func (q *Queries) DeleteFirmware(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteIndexer

func (q *Queries) DeleteIndexer(ctx context.Context, id uuid.UUID) error

func (*Queries) DeletePlatform

func (q *Queries) DeletePlatform(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteRelease

func (q *Queries) DeleteRelease(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteRom

func (q *Queries) DeleteRom(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteRomMedia

func (q *Queries) DeleteRomMedia(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteRomNote

func (q *Queries) DeleteRomNote(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteSave

func (q *Queries) DeleteSave(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteWantedROM

func (q *Queries) DeleteWantedROM(ctx context.Context, id uuid.UUID) error

func (*Queries) EndPlaySession

func (q *Queries) EndPlaySession(ctx context.Context, arg EndPlaySessionParams) error

func (*Queries) FindDatEntryByCRC32

func (q *Queries) FindDatEntryByCRC32(ctx context.Context, crc32 *string) ([]DatEntry, error)

func (*Queries) FindDatEntryBySHA1

func (q *Queries) FindDatEntryBySHA1(ctx context.Context, sha1 *string) ([]DatEntry, error)

func (*Queries) FindRomByCRC32

func (q *Queries) FindRomByCRC32(ctx context.Context, crc32 *string) ([]Rom, error)

func (*Queries) FindRomByFilePath

func (q *Queries) FindRomByFilePath(ctx context.Context, filePath string) (Rom, error)

func (*Queries) FindRomByMD5

func (q *Queries) FindRomByMD5(ctx context.Context, md5 *string) ([]Rom, error)

func (*Queries) FindRomBySHA1

func (q *Queries) FindRomBySHA1(ctx context.Context, sha1 *string) ([]Rom, error)

func (*Queries) FindWantedByCRC32

func (q *Queries) FindWantedByCRC32(ctx context.Context, expectedCrc32 *string) ([]WantedRom, error)

func (*Queries) FindWantedBySHA1

func (q *Queries) FindWantedBySHA1(ctx context.Context, expectedSha1 *string) ([]WantedRom, error)

func (*Queries) GenreCounts

func (q *Queries) GenreCounts(ctx context.Context) ([]GenreCountsRow, error)

func (*Queries) GetAPIToken

func (q *Queries) GetAPIToken(ctx context.Context, id uuid.UUID) (ApiToken, error)

func (*Queries) GetCollection

func (q *Queries) GetCollection(ctx context.Context, id uuid.UUID) (Collection, error)

func (*Queries) GetCollectionImport

func (q *Queries) GetCollectionImport(ctx context.Context, id uuid.UUID) (CollectionImport, error)

func (*Queries) GetCollectionImportByJob

func (q *Queries) GetCollectionImportByJob(ctx context.Context, downloadJobID uuid.UUID) (CollectionImport, error)

func (*Queries) GetDatFile

func (q *Queries) GetDatFile(ctx context.Context, id uuid.UUID) (DatFile, error)

func (*Queries) GetDevice

func (q *Queries) GetDevice(ctx context.Context, id uuid.UUID) (Device, error)

func (*Queries) GetDownloadClient

func (q *Queries) GetDownloadClient(ctx context.Context, id uuid.UUID) (DownloadClient, error)

func (*Queries) GetDownloadJob

func (q *Queries) GetDownloadJob(ctx context.Context, id uuid.UUID) (DownloadJob, error)

func (*Queries) GetFirmware

func (q *Queries) GetFirmware(ctx context.Context, id uuid.UUID) (Firmware, error)

func (*Queries) GetIndexer

func (q *Queries) GetIndexer(ctx context.Context, id uuid.UUID) (Indexer, error)

func (*Queries) GetPlatform

func (q *Queries) GetPlatform(ctx context.Context, id uuid.UUID) (Platform, error)

func (*Queries) GetPlatformBySlug

func (q *Queries) GetPlatformBySlug(ctx context.Context, slug string) (Platform, error)

func (*Queries) GetPlaySession

func (q *Queries) GetPlaySession(ctx context.Context, id uuid.UUID) (PlaySession, error)

func (*Queries) GetRelease

func (q *Queries) GetRelease(ctx context.Context, id uuid.UUID) (Release, error)

func (*Queries) GetRom

func (q *Queries) GetRom(ctx context.Context, id uuid.UUID) (Rom, error)

func (*Queries) GetRomMedia

func (q *Queries) GetRomMedia(ctx context.Context, romID uuid.UUID) ([]RomMedium, error)

func (*Queries) GetRomNote

func (q *Queries) GetRomNote(ctx context.Context, id uuid.UUID) (RomNote, error)

func (*Queries) GetSave

func (q *Queries) GetSave(ctx context.Context, id uuid.UUID) (Safe, error)

func (*Queries) GetSyncSession

func (q *Queries) GetSyncSession(ctx context.Context, id uuid.UUID) (SyncSession, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id uuid.UUID) (User, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email *string) (User, error)

func (*Queries) GetUserByOIDCSubject

func (q *Queries) GetUserByOIDCSubject(ctx context.Context, oidcSubject *string) (User, error)

func (*Queries) GetUserByUsername

func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)

func (*Queries) GetUserRomProps

func (q *Queries) GetUserRomProps(ctx context.Context, arg GetUserRomPropsParams) (UserRomProp, error)

func (*Queries) GetWantedROM

func (q *Queries) GetWantedROM(ctx context.Context, id uuid.UUID) (WantedRom, error)

func (*Queries) ListAPITokensByUser

func (q *Queries) ListAPITokensByUser(ctx context.Context, userID uuid.UUID) ([]ApiToken, error)

func (*Queries) ListActiveDownloadJobs

func (q *Queries) ListActiveDownloadJobs(ctx context.Context) ([]DownloadJob, error)

func (*Queries) ListAutoUpdateDats

func (q *Queries) ListAutoUpdateDats(ctx context.Context) ([]DatFile, error)

func (*Queries) ListAwaitingReview

func (q *Queries) ListAwaitingReview(ctx context.Context) ([]CollectionImport, error)

func (*Queries) ListBacklog

func (q *Queries) ListBacklog(ctx context.Context, userID uuid.UUID) ([]Rom, error)

func (*Queries) ListCollectionImports

func (q *Queries) ListCollectionImports(ctx context.Context, arg ListCollectionImportsParams) ([]CollectionImport, error)

func (*Queries) ListCollectionRoms

func (q *Queries) ListCollectionRoms(ctx context.Context, arg ListCollectionRomsParams) ([]Rom, error)

func (*Queries) ListCollections

func (q *Queries) ListCollections(ctx context.Context, arg ListCollectionsParams) ([]Collection, error)

func (*Queries) ListCollectionsByUser

func (q *Queries) ListCollectionsByUser(ctx context.Context, arg ListCollectionsByUserParams) ([]Collection, error)

func (*Queries) ListDatEntriesByDat

func (q *Queries) ListDatEntriesByDat(ctx context.Context, arg ListDatEntriesByDatParams) ([]DatEntry, error)

func (*Queries) ListDatFiles

func (q *Queries) ListDatFiles(ctx context.Context, arg ListDatFilesParams) ([]DatFile, error)

func (*Queries) ListDevicesByUser

func (q *Queries) ListDevicesByUser(ctx context.Context, userID uuid.UUID) ([]Device, error)

func (*Queries) ListDownloadClients

func (q *Queries) ListDownloadClients(ctx context.Context) ([]DownloadClient, error)

func (*Queries) ListDownloadJobs

func (q *Queries) ListDownloadJobs(ctx context.Context, arg ListDownloadJobsParams) ([]DownloadJob, error)

func (*Queries) ListEnabledDownloadClients

func (q *Queries) ListEnabledDownloadClients(ctx context.Context) ([]DownloadClient, error)

func (*Queries) ListEnabledIndexers

func (q *Queries) ListEnabledIndexers(ctx context.Context) ([]Indexer, error)

func (*Queries) ListFirmwareByPlatform

func (q *Queries) ListFirmwareByPlatform(ctx context.Context, platformID uuid.UUID) ([]Firmware, error)

func (*Queries) ListIndexers

func (q *Queries) ListIndexers(ctx context.Context) ([]Indexer, error)

func (*Queries) ListNowPlaying

func (q *Queries) ListNowPlaying(ctx context.Context, userID uuid.UUID) ([]Rom, error)

func (*Queries) ListPendingReleases

func (q *Queries) ListPendingReleases(ctx context.Context, arg ListPendingReleasesParams) ([]Release, error)

func (*Queries) ListPlatforms

func (q *Queries) ListPlatforms(ctx context.Context, arg ListPlatformsParams) ([]Platform, error)

func (*Queries) ListPlaySessionsByRom

func (q *Queries) ListPlaySessionsByRom(ctx context.Context, arg ListPlaySessionsByRomParams) ([]PlaySession, error)

func (*Queries) ListPlaySessionsByUser

func (q *Queries) ListPlaySessionsByUser(ctx context.Context, arg ListPlaySessionsByUserParams) ([]PlaySession, error)

func (*Queries) ListPublicRomNotes

func (q *Queries) ListPublicRomNotes(ctx context.Context, romID uuid.UUID) ([]RomNote, error)

func (*Queries) ListReleasesByWanted

func (q *Queries) ListReleasesByWanted(ctx context.Context, wantedID pgtype.UUID) ([]Release, error)

func (*Queries) ListReviewReleases

func (q *Queries) ListReviewReleases(ctx context.Context, arg ListReviewReleasesParams) ([]Release, error)

func (*Queries) ListRomNotes

func (q *Queries) ListRomNotes(ctx context.Context, romID uuid.UUID) ([]RomNote, error)

func (*Queries) ListRoms

func (q *Queries) ListRoms(ctx context.Context, arg ListRomsParams) ([]Rom, error)

func (*Queries) ListRomsByCategory

func (q *Queries) ListRomsByCategory(ctx context.Context, arg ListRomsByCategoryParams) ([]Rom, error)

func (*Queries) ListRomsByPlatform

func (q *Queries) ListRomsByPlatform(ctx context.Context, arg ListRomsByPlatformParams) ([]Rom, error)

func (*Queries) ListSavesByUserAndRom

func (q *Queries) ListSavesByUserAndRom(ctx context.Context, arg ListSavesByUserAndRomParams) ([]Safe, error)

func (*Queries) ListSearchableWanted

func (q *Queries) ListSearchableWanted(ctx context.Context, limit int32) ([]WantedRom, error)

func (*Queries) ListSyncSessionsByDevice

func (q *Queries) ListSyncSessionsByDevice(ctx context.Context, arg ListSyncSessionsByDeviceParams) ([]SyncSession, error)

func (*Queries) ListUnmatchedRoms

func (q *Queries) ListUnmatchedRoms(ctx context.Context, arg ListUnmatchedRomsParams) ([]Rom, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)

func (*Queries) ListWantedROMs

func (q *Queries) ListWantedROMs(ctx context.Context, arg ListWantedROMsParams) ([]WantedRom, error)

func (*Queries) ListWantedROMsByStatus

func (q *Queries) ListWantedROMsByStatus(ctx context.Context, arg ListWantedROMsByStatusParams) ([]WantedRom, error)

func (*Queries) PlatformROMCounts

func (q *Queries) PlatformROMCounts(ctx context.Context) ([]PlatformROMCountsRow, error)

func (*Queries) RecentPlaySessions

func (q *Queries) RecentPlaySessions(ctx context.Context, arg RecentPlaySessionsParams) ([]RecentPlaySessionsRow, error)

func (*Queries) RecentROMs

func (q *Queries) RecentROMs(ctx context.Context, limit int32) ([]Rom, error)

func (*Queries) RegionCounts

func (q *Queries) RegionCounts(ctx context.Context) ([]RegionCountsRow, error)

func (*Queries) RemoveRomFromCollection

func (q *Queries) RemoveRomFromCollection(ctx context.Context, arg RemoveRomFromCollectionParams) error

func (*Queries) SearchCollectionsByName

func (q *Queries) SearchCollectionsByName(ctx context.Context, arg SearchCollectionsByNameParams) ([]Collection, error)

func (*Queries) SearchPlatformsByName

func (q *Queries) SearchPlatformsByName(ctx context.Context, arg SearchPlatformsByNameParams) ([]Platform, error)

func (*Queries) SearchROMsByName

func (q *Queries) SearchROMsByName(ctx context.Context, arg SearchROMsByNameParams) ([]SearchROMsByNameRow, error)

func (*Queries) SearchRomsByName

func (q *Queries) SearchRomsByName(ctx context.Context, arg SearchRomsByNameParams) ([]Rom, error)

func (*Queries) TotalLibrarySize

func (q *Queries) TotalLibrarySize(ctx context.Context) (int64, error)

func (*Queries) TotalPlayTimeByRom

func (q *Queries) TotalPlayTimeByRom(ctx context.Context, romID uuid.UUID) (int64, error)

func (*Queries) TotalPlayTimeByUser

func (q *Queries) TotalPlayTimeByUser(ctx context.Context, userID uuid.UUID) (int64, error)

func (*Queries) UpdateAPITokenLastUsed

func (q *Queries) UpdateAPITokenLastUsed(ctx context.Context, id uuid.UUID) error

func (*Queries) UpdateCollection

func (q *Queries) UpdateCollection(ctx context.Context, arg UpdateCollectionParams) (Collection, error)

func (*Queries) UpdateCollectionAnalysis

func (q *Queries) UpdateCollectionAnalysis(ctx context.Context, arg UpdateCollectionAnalysisParams) error

func (*Queries) UpdateCollectionImportStatus

func (q *Queries) UpdateCollectionImportStatus(ctx context.Context, arg UpdateCollectionImportStatusParams) error

func (*Queries) UpdateCollectionSelection

func (q *Queries) UpdateCollectionSelection(ctx context.Context, arg UpdateCollectionSelectionParams) error

func (*Queries) UpdateDatFile

func (q *Queries) UpdateDatFile(ctx context.Context, arg UpdateDatFileParams) (DatFile, error)

func (*Queries) UpdateDeviceLastSeen

func (q *Queries) UpdateDeviceLastSeen(ctx context.Context, id uuid.UUID) error

func (*Queries) UpdateDownloadClient

func (q *Queries) UpdateDownloadClient(ctx context.Context, arg UpdateDownloadClientParams) error

func (*Queries) UpdateDownloadJobProgress

func (q *Queries) UpdateDownloadJobProgress(ctx context.Context, arg UpdateDownloadJobProgressParams) error

func (*Queries) UpdateIndexer

func (q *Queries) UpdateIndexer(ctx context.Context, arg UpdateIndexerParams) error

func (*Queries) UpdateIndexerLastSync

func (q *Queries) UpdateIndexerLastSync(ctx context.Context, id uuid.UUID) error

func (*Queries) UpdatePlatform

func (q *Queries) UpdatePlatform(ctx context.Context, arg UpdatePlatformParams) (Platform, error)

func (*Queries) UpdateReleaseMatch

func (q *Queries) UpdateReleaseMatch(ctx context.Context, arg UpdateReleaseMatchParams) error

func (*Queries) UpdateRomDatMatch

func (q *Queries) UpdateRomDatMatch(ctx context.Context, arg UpdateRomDatMatchParams) error

func (*Queries) UpdateRomHashes

func (q *Queries) UpdateRomHashes(ctx context.Context, arg UpdateRomHashesParams) error

func (*Queries) UpdateRomMetadata

func (q *Queries) UpdateRomMetadata(ctx context.Context, arg UpdateRomMetadataParams) (Rom, error)

func (*Queries) UpdateRomNote

func (q *Queries) UpdateRomNote(ctx context.Context, arg UpdateRomNoteParams) (RomNote, error)

func (*Queries) UpdateSyncSession

func (q *Queries) UpdateSyncSession(ctx context.Context, arg UpdateSyncSessionParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) UpdateUserOIDC

func (q *Queries) UpdateUserOIDC(ctx context.Context, arg UpdateUserOIDCParams) error

func (*Queries) UpdateUserPassword

func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error

func (*Queries) UpdateUserTOTP

func (q *Queries) UpdateUserTOTP(ctx context.Context, arg UpdateUserTOTPParams) error

func (*Queries) UpdateUserWebAuthn

func (q *Queries) UpdateUserWebAuthn(ctx context.Context, arg UpdateUserWebAuthnParams) error

func (*Queries) UpdateWantedStatus

func (q *Queries) UpdateWantedStatus(ctx context.Context, arg UpdateWantedStatusParams) error

func (*Queries) UpsertUserRomProps

func (q *Queries) UpsertUserRomProps(ctx context.Context, arg UpsertUserRomPropsParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RecentPlaySessionsParams

type RecentPlaySessionsParams struct {
	UserID uuid.UUID `json:"user_id"`
	Limit  int32     `json:"limit"`
}

type RecentPlaySessionsRow

type RecentPlaySessionsRow struct {
	ID           uuid.UUID `json:"id"`
	StartedAt    time.Time `json:"started_at"`
	DurationSecs *int32    `json:"duration_secs"`
	RomName      *string   `json:"rom_name"`
	PlatformName string    `json:"platform_name"`
}

type RegionCountsRow

type RegionCountsRow struct {
	Region   interface{} `json:"region"`
	RomCount int64       `json:"rom_count"`
}

type Release

type Release struct {
	ID             uuid.UUID          `json:"id"`
	WantedID       pgtype.UUID        `json:"wanted_id"`
	IndexerID      uuid.UUID          `json:"indexer_id"`
	Title          string             `json:"title"`
	Guid           string             `json:"guid"`
	DownloadUrl    string             `json:"download_url"`
	Size           *int64             `json:"size"`
	Seeders        *int32             `json:"seeders"`
	Leechers       *int32             `json:"leechers"`
	PublishDate    pgtype.Timestamptz `json:"publish_date"`
	MimeType       *string            `json:"mime_type"`
	InfoHash       *string            `json:"info_hash"`
	Categories     []string           `json:"categories"`
	ParsedName     *string            `json:"parsed_name"`
	ParsedRegion   []string           `json:"parsed_region"`
	ParsedLanguage []string           `json:"parsed_language"`
	ParsedRevision *string            `json:"parsed_revision"`
	IsCollection   bool               `json:"is_collection"`
	MatchStatus    string             `json:"match_status"`
	MatchReason    *string            `json:"match_reason"`
	Confidence     float32            `json:"confidence"`
	RejectedReason *string            `json:"rejected_reason"`
	CreatedAt      time.Time          `json:"created_at"`
}

type RemoveRomFromCollectionParams

type RemoveRomFromCollectionParams struct {
	CollectionID uuid.UUID `json:"collection_id"`
	RomID        uuid.UUID `json:"rom_id"`
}

type Rom

type Rom struct {
	ID             uuid.UUID   `json:"id"`
	PlatformID     uuid.UUID   `json:"platform_id"`
	FileName       string      `json:"file_name"`
	FilePath       string      `json:"file_path"`
	FileSize       int64       `json:"file_size"`
	Name           *string     `json:"name"`
	SortName       *string     `json:"sort_name"`
	Summary        *string     `json:"summary"`
	Description    *string     `json:"description"`
	Crc32          *string     `json:"crc32"`
	Md5            *string     `json:"md5"`
	Sha1           *string     `json:"sha1"`
	Sha256         *string     `json:"sha256"`
	RaHash         *string     `json:"ra_hash"`
	IgdbID         *int64      `json:"igdb_id"`
	MobyID         *int64      `json:"moby_id"`
	SsID           *int64      `json:"ss_id"`
	RaID           *int64      `json:"ra_id"`
	SteamgriddbID  *int64      `json:"steamgriddb_id"`
	Genres         []string    `json:"genres"`
	Franchises     []string    `json:"franchises"`
	Companies      []string    `json:"companies"`
	GameModes      []string    `json:"game_modes"`
	AgeRatings     []byte      `json:"age_ratings"`
	AltNames       []string    `json:"alt_names"`
	FirstRelease   pgtype.Date `json:"first_release"`
	AvgRating      *float32    `json:"avg_rating"`
	PlayerCount    *string     `json:"player_count"`
	YoutubeID      *string     `json:"youtube_id"`
	Category       string      `json:"category"`
	DatMatch       bool        `json:"dat_match"`
	DatName        *string     `json:"dat_name"`
	DatDescription *string     `json:"dat_description"`
	Region         []string    `json:"region"`
	Language       []string    `json:"language"`
	Revision       *string     `json:"revision"`
	Version        *string     `json:"version"`
	MultiFile      bool        `json:"multi_file"`
	ParentID       pgtype.UUID `json:"parent_id"`
	Metadata       []byte      `json:"metadata"`
	CreatedAt      time.Time   `json:"created_at"`
	UpdatedAt      time.Time   `json:"updated_at"`
}

type RomMedium

type RomMedium struct {
	ID        uuid.UUID `json:"id"`
	RomID     uuid.UUID `json:"rom_id"`
	Type      string    `json:"type"`
	Source    string    `json:"source"`
	Path      string    `json:"path"`
	Width     *int32    `json:"width"`
	Height    *int32    `json:"height"`
	Size      *int64    `json:"size"`
	MimeType  *string   `json:"mime_type"`
	CreatedAt time.Time `json:"created_at"`
}

type RomNote

type RomNote struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	RomID     uuid.UUID `json:"rom_id"`
	Content   string    `json:"content"`
	IsPublic  bool      `json:"is_public"`
	Tags      []string  `json:"tags"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Safe

type Safe struct {
	ID          uuid.UUID `json:"id"`
	UserID      uuid.UUID `json:"user_id"`
	RomID       uuid.UUID `json:"rom_id"`
	FileName    string    `json:"file_name"`
	FilePath    string    `json:"file_path"`
	FileSize    int64     `json:"file_size"`
	Emulator    *string   `json:"emulator"`
	Slot        *int32    `json:"slot"`
	ContentHash *string   `json:"content_hash"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type Screenshot

type Screenshot struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	RomID     uuid.UUID `json:"rom_id"`
	FilePath  string    `json:"file_path"`
	FileSize  int64     `json:"file_size"`
	CreatedAt time.Time `json:"created_at"`
}

type SearchCollectionsByNameParams

type SearchCollectionsByNameParams struct {
	Column1 *string `json:"column_1"`
	Limit   int32   `json:"limit"`
}

type SearchPlatformsByNameParams

type SearchPlatformsByNameParams struct {
	Column1 *string `json:"column_1"`
	Limit   int32   `json:"limit"`
}

type SearchROMsByNameParams

type SearchROMsByNameParams struct {
	Column1 *string `json:"column_1"`
	Limit   int32   `json:"limit"`
}

type SearchROMsByNameRow

type SearchROMsByNameRow struct {
	ID             uuid.UUID   `json:"id"`
	PlatformID     uuid.UUID   `json:"platform_id"`
	FileName       string      `json:"file_name"`
	FilePath       string      `json:"file_path"`
	FileSize       int64       `json:"file_size"`
	Name           *string     `json:"name"`
	SortName       *string     `json:"sort_name"`
	Summary        *string     `json:"summary"`
	Description    *string     `json:"description"`
	Crc32          *string     `json:"crc32"`
	Md5            *string     `json:"md5"`
	Sha1           *string     `json:"sha1"`
	Sha256         *string     `json:"sha256"`
	RaHash         *string     `json:"ra_hash"`
	IgdbID         *int64      `json:"igdb_id"`
	MobyID         *int64      `json:"moby_id"`
	SsID           *int64      `json:"ss_id"`
	RaID           *int64      `json:"ra_id"`
	SteamgriddbID  *int64      `json:"steamgriddb_id"`
	Genres         []string    `json:"genres"`
	Franchises     []string    `json:"franchises"`
	Companies      []string    `json:"companies"`
	GameModes      []string    `json:"game_modes"`
	AgeRatings     []byte      `json:"age_ratings"`
	AltNames       []string    `json:"alt_names"`
	FirstRelease   pgtype.Date `json:"first_release"`
	AvgRating      *float32    `json:"avg_rating"`
	PlayerCount    *string     `json:"player_count"`
	YoutubeID      *string     `json:"youtube_id"`
	Category       string      `json:"category"`
	DatMatch       bool        `json:"dat_match"`
	DatName        *string     `json:"dat_name"`
	DatDescription *string     `json:"dat_description"`
	Region         []string    `json:"region"`
	Language       []string    `json:"language"`
	Revision       *string     `json:"revision"`
	Version        *string     `json:"version"`
	MultiFile      bool        `json:"multi_file"`
	ParentID       pgtype.UUID `json:"parent_id"`
	Metadata       []byte      `json:"metadata"`
	CreatedAt      time.Time   `json:"created_at"`
	UpdatedAt      time.Time   `json:"updated_at"`
	PlatformName   string      `json:"platform_name"`
}

type SearchRomsByNameParams

type SearchRomsByNameParams struct {
	Column1 *string `json:"column_1"`
	Limit   int32   `json:"limit"`
	Offset  int32   `json:"offset"`
}

type State

type State struct {
	ID             uuid.UUID `json:"id"`
	UserID         uuid.UUID `json:"user_id"`
	RomID          uuid.UUID `json:"rom_id"`
	FileName       string    `json:"file_name"`
	FilePath       string    `json:"file_path"`
	FileSize       int64     `json:"file_size"`
	Emulator       *string   `json:"emulator"`
	Slot           *int32    `json:"slot"`
	ContentHash    *string   `json:"content_hash"`
	ScreenshotPath *string   `json:"screenshot_path"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
}

type SyncSession

type SyncSession struct {
	ID           uuid.UUID          `json:"id"`
	UserID       uuid.UUID          `json:"user_id"`
	DeviceID     uuid.UUID          `json:"device_id"`
	Status       string             `json:"status"`
	Direction    string             `json:"direction"`
	FilesSynced  *int32             `json:"files_synced"`
	BytesSynced  *int64             `json:"bytes_synced"`
	StartedAt    pgtype.Timestamptz `json:"started_at"`
	CompletedAt  pgtype.Timestamptz `json:"completed_at"`
	ErrorMessage *string            `json:"error_message"`
	CreatedAt    time.Time          `json:"created_at"`
}

type UpdateCollectionAnalysisParams

type UpdateCollectionAnalysisParams struct {
	ID           uuid.UUID `json:"id"`
	TotalFiles   int32     `json:"total_files"`
	MatchedFiles int32     `json:"matched_files"`
	ReviewFiles  int32     `json:"review_files"`
	AiAnalysis   []byte    `json:"ai_analysis"`
	Status       string    `json:"status"`
}

type UpdateCollectionImportStatusParams

type UpdateCollectionImportStatusParams struct {
	ID     uuid.UUID `json:"id"`
	Status string    `json:"status"`
}

type UpdateCollectionParams

type UpdateCollectionParams struct {
	ID          uuid.UUID `json:"id"`
	Name        *string   `json:"name"`
	Description *string   `json:"description"`
	IsPublic    *bool     `json:"is_public"`
}

type UpdateCollectionSelectionParams

type UpdateCollectionSelectionParams struct {
	ID            uuid.UUID `json:"id"`
	SelectedFiles []string  `json:"selected_files"`
	Status        string    `json:"status"`
}

type UpdateDatFileParams

type UpdateDatFileParams struct {
	ID       uuid.UUID `json:"id"`
	Version  *string   `json:"version"`
	RomCount *int32    `json:"rom_count"`
}

type UpdateDownloadClientParams

type UpdateDownloadClientParams struct {
	ID       uuid.UUID `json:"id"`
	Name     string    `json:"name"`
	Host     string    `json:"host"`
	Port     *int32    `json:"port"`
	Username *string   `json:"username"`
	Password *string   `json:"password"`
	Category *string   `json:"category"`
	UseSsl   bool      `json:"use_ssl"`
	Priority int32     `json:"priority"`
	Enabled  bool      `json:"enabled"`
	Settings []byte    `json:"settings"`
}

type UpdateDownloadJobProgressParams

type UpdateDownloadJobProgressParams struct {
	ID              uuid.UUID          `json:"id"`
	Status          string             `json:"status"`
	Progress        float32            `json:"progress"`
	BytesDownloaded int64              `json:"bytes_downloaded"`
	DownloadPath    *string            `json:"download_path"`
	ErrorMessage    *string            `json:"error_message"`
	CompletedAt     pgtype.Timestamptz `json:"completed_at"`
}

type UpdateIndexerParams

type UpdateIndexerParams struct {
	ID         uuid.UUID `json:"id"`
	Name       string    `json:"name"`
	Url        string    `json:"url"`
	ApiKey     *string   `json:"api_key"`
	Priority   int32     `json:"priority"`
	Enabled    bool      `json:"enabled"`
	Categories []string  `json:"categories"`
	Settings   []byte    `json:"settings"`
}

type UpdatePlatformParams

type UpdatePlatformParams struct {
	ID         uuid.UUID `json:"id"`
	Name       *string   `json:"name"`
	Generation *int32    `json:"generation"`
	Family     *string   `json:"family"`
	IgdbID     *int64    `json:"igdb_id"`
	SgdbID     *int64    `json:"sgdb_id"`
	MobyID     *int64    `json:"moby_id"`
	Metadata   []byte    `json:"metadata"`
}

type UpdateReleaseMatchParams

type UpdateReleaseMatchParams struct {
	ID          uuid.UUID `json:"id"`
	MatchStatus string    `json:"match_status"`
	MatchReason *string   `json:"match_reason"`
	Confidence  float32   `json:"confidence"`
	ParsedName  *string   `json:"parsed_name"`
}

type UpdateRomDatMatchParams

type UpdateRomDatMatchParams struct {
	ID             uuid.UUID `json:"id"`
	DatMatch       bool      `json:"dat_match"`
	DatName        *string   `json:"dat_name"`
	DatDescription *string   `json:"dat_description"`
}

type UpdateRomHashesParams

type UpdateRomHashesParams struct {
	ID     uuid.UUID `json:"id"`
	Crc32  *string   `json:"crc32"`
	Md5    *string   `json:"md5"`
	Sha1   *string   `json:"sha1"`
	Sha256 *string   `json:"sha256"`
	RaHash *string   `json:"ra_hash"`
}

type UpdateRomMetadataParams

type UpdateRomMetadataParams struct {
	ID           uuid.UUID   `json:"id"`
	Name         *string     `json:"name"`
	Summary      *string     `json:"summary"`
	Description  *string     `json:"description"`
	IgdbID       *int64      `json:"igdb_id"`
	MobyID       *int64      `json:"moby_id"`
	Genres       []string    `json:"genres"`
	Franchises   []string    `json:"franchises"`
	Companies    []string    `json:"companies"`
	FirstRelease pgtype.Date `json:"first_release"`
	AvgRating    *float32    `json:"avg_rating"`
	Metadata     []byte      `json:"metadata"`
}

type UpdateRomNoteParams

type UpdateRomNoteParams struct {
	ID       uuid.UUID `json:"id"`
	Content  string    `json:"content"`
	IsPublic bool      `json:"is_public"`
	Tags     []string  `json:"tags"`
}

type UpdateSyncSessionParams

type UpdateSyncSessionParams struct {
	ID           uuid.UUID          `json:"id"`
	Status       string             `json:"status"`
	FilesSynced  *int32             `json:"files_synced"`
	BytesSynced  *int64             `json:"bytes_synced"`
	StartedAt    pgtype.Timestamptz `json:"started_at"`
	CompletedAt  pgtype.Timestamptz `json:"completed_at"`
	ErrorMessage *string            `json:"error_message"`
}

type UpdateUserOIDCParams

type UpdateUserOIDCParams struct {
	ID          uuid.UUID `json:"id"`
	OidcSubject *string   `json:"oidc_subject"`
}

type UpdateUserParams

type UpdateUserParams struct {
	ID        uuid.UUID `json:"id"`
	Username  *string   `json:"username"`
	Email     *string   `json:"email"`
	AvatarUrl *string   `json:"avatar_url"`
	Role      *string   `json:"role"`
	Settings  []byte    `json:"settings"`
}

type UpdateUserPasswordParams

type UpdateUserPasswordParams struct {
	ID           uuid.UUID `json:"id"`
	PasswordHash *string   `json:"password_hash"`
}

type UpdateUserTOTPParams

type UpdateUserTOTPParams struct {
	ID          uuid.UUID `json:"id"`
	TotpSecret  *string   `json:"totp_secret"`
	TotpEnabled bool      `json:"totp_enabled"`
}

type UpdateUserWebAuthnParams

type UpdateUserWebAuthnParams struct {
	ID            uuid.UUID `json:"id"`
	WebauthnCreds []byte    `json:"webauthn_creds"`
}

type UpdateWantedStatusParams

type UpdateWantedStatusParams struct {
	ID             uuid.UUID          `json:"id"`
	Status         string             `json:"status"`
	LastSearchedAt pgtype.Timestamptz `json:"last_searched_at"`
}

type UpsertUserRomPropsParams

type UpsertUserRomPropsParams struct {
	UserID        uuid.UUID          `json:"user_id"`
	RomID         uuid.UUID          `json:"rom_id"`
	Rating        *float32           `json:"rating"`
	Difficulty    *float32           `json:"difficulty"`
	CompletionPct *float32           `json:"completion_pct"`
	Status        *string            `json:"status"`
	Backlogged    bool               `json:"backlogged"`
	NowPlaying    bool               `json:"now_playing"`
	Hidden        bool               `json:"hidden"`
	LastPlayed    pgtype.Timestamptz `json:"last_played"`
}

type User

type User struct {
	ID            uuid.UUID `json:"id"`
	Username      string    `json:"username"`
	Email         *string   `json:"email"`
	PasswordHash  *string   `json:"password_hash"`
	Role          string    `json:"role"`
	AvatarUrl     *string   `json:"avatar_url"`
	OidcSubject   *string   `json:"oidc_subject"`
	WebauthnCreds []byte    `json:"webauthn_creds"`
	TotpSecret    *string   `json:"totp_secret"`
	TotpEnabled   bool      `json:"totp_enabled"`
	Settings      []byte    `json:"settings"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

type UserRomProp

type UserRomProp struct {
	UserID        uuid.UUID          `json:"user_id"`
	RomID         uuid.UUID          `json:"rom_id"`
	Rating        *float32           `json:"rating"`
	Difficulty    *float32           `json:"difficulty"`
	CompletionPct *float32           `json:"completion_pct"`
	Status        *string            `json:"status"`
	Backlogged    bool               `json:"backlogged"`
	NowPlaying    bool               `json:"now_playing"`
	Hidden        bool               `json:"hidden"`
	LastPlayed    pgtype.Timestamptz `json:"last_played"`
}

type WantedRom

type WantedRom struct {
	ID              uuid.UUID          `json:"id"`
	UserID          pgtype.UUID        `json:"user_id"`
	PlatformID      uuid.UUID          `json:"platform_id"`
	GameName        string             `json:"game_name"`
	DatEntryID      pgtype.UUID        `json:"dat_entry_id"`
	ExpectedCrc32   *string            `json:"expected_crc32"`
	ExpectedSha1    *string            `json:"expected_sha1"`
	ExpectedMd5     *string            `json:"expected_md5"`
	PreferRegions   []string           `json:"prefer_regions"`
	PreferLanguages []string           `json:"prefer_languages"`
	PreferRevision  *string            `json:"prefer_revision"`
	AllowPrototype  bool               `json:"allow_prototype"`
	AllowBeta       bool               `json:"allow_beta"`
	AllowDemo       bool               `json:"allow_demo"`
	AllowHack       bool               `json:"allow_hack"`
	Status          string             `json:"status"`
	Priority        int32              `json:"priority"`
	Source          string             `json:"source"`
	LastSearchedAt  pgtype.Timestamptz `json:"last_searched_at"`
	CreatedAt       time.Time          `json:"created_at"`
	UpdatedAt       time.Time          `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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