Documentation
¶
Index ¶
- type DB
- func (d *DB) DeleteInstalledMod(sourceID, modID, gameID, profileName string) error
- func (d *DB) DeleteToken(sourceID string) error
- func (d *DB) GetFileChecksum(sourceID, modID, gameID, profileName, fileID string) (string, error)
- func (d *DB) GetFilesWithChecksums(gameID, profileName string) ([]FileWithChecksum, error)
- func (d *DB) GetInstalledMod(sourceID, modID, gameID, profileName string) (*domain.InstalledMod, error)
- func (d *DB) GetInstalledMods(gameID, profileName string) ([]domain.InstalledMod, error)
- func (d *DB) GetModFileIDs(sourceID, modID, gameID, profileName string) ([]string, error)
- func (d *DB) GetToken(sourceID string) (*StoredToken, error)
- func (d *DB) HasToken(sourceID string) (bool, error)
- func (d *DB) SaveFileChecksum(sourceID, modID, gameID, profileName, fileID, checksum string) error
- func (d *DB) SaveInstalledMod(mod *domain.InstalledMod) error
- func (d *DB) SaveToken(sourceID, apiKey string) error
- func (d *DB) SetModDeployed(sourceID, modID, gameID, profileName string, deployed bool) error
- func (d *DB) SetModEnabled(sourceID, modID, gameID, profileName string, enabled bool) error
- func (d *DB) SetModFileIDs(sourceID, modID, gameID, profileName string, fileIDs []string) error
- func (d *DB) SetModLinkMethod(sourceID, modID, gameID, profileName string, linkMethod domain.LinkMethod) error
- func (d *DB) SwapModVersions(sourceID, modID, gameID, profileName string) error
- func (d *DB) UpdateModPolicy(sourceID, modID, gameID, profileName string, policy domain.UpdatePolicy) error
- func (d *DB) UpdateModVersion(sourceID, modID, gameID, profileName, newVersion string) error
- type FileWithChecksum
- type StoredToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB wraps the SQLite database connection
func (*DB) DeleteInstalledMod ¶
DeleteInstalledMod removes an installed mod record
func (*DB) DeleteToken ¶
DeleteToken removes an API token for a source
func (*DB) GetFileChecksum ¶ added in v0.8.0
GetFileChecksum retrieves the checksum for a specific file Returns empty string if file not found or has no checksum
func (*DB) GetFilesWithChecksums ¶ added in v0.8.0
func (d *DB) GetFilesWithChecksums(gameID, profileName string) ([]FileWithChecksum, error)
GetFilesWithChecksums returns all files for a game/profile with their checksums
func (*DB) GetInstalledMod ¶
func (d *DB) GetInstalledMod(sourceID, modID, gameID, profileName string) (*domain.InstalledMod, error)
GetInstalledMod retrieves a single installed mod
func (*DB) GetInstalledMods ¶
func (d *DB) GetInstalledMods(gameID, profileName string) ([]domain.InstalledMod, error)
GetInstalledMods returns all installed mods for a game/profile combination
func (*DB) GetModFileIDs ¶ added in v0.7.0
GetModFileIDs retrieves the file IDs for an installed mod
func (*DB) GetToken ¶
func (d *DB) GetToken(sourceID string) (*StoredToken, error)
GetToken retrieves an API token for a source
func (*DB) SaveFileChecksum ¶ added in v0.8.0
SaveFileChecksum stores the MD5 checksum for a downloaded file
func (*DB) SaveInstalledMod ¶
func (d *DB) SaveInstalledMod(mod *domain.InstalledMod) error
SaveInstalledMod inserts or updates an installed mod record
func (*DB) SetModDeployed ¶ added in v0.7.8
SetModDeployed sets whether a mod is currently deployed to the game directory
func (*DB) SetModEnabled ¶
SetModEnabled enables or disables a mod
func (*DB) SetModFileIDs ¶ added in v0.7.3
SetModFileIDs updates the file IDs for an installed mod
func (*DB) SetModLinkMethod ¶
func (d *DB) SetModLinkMethod(sourceID, modID, gameID, profileName string, linkMethod domain.LinkMethod) error
SetModLinkMethod updates the link method for an installed mod
func (*DB) SwapModVersions ¶
SwapModVersions swaps version and previous_version (for rollback)
func (*DB) UpdateModPolicy ¶
func (d *DB) UpdateModPolicy(sourceID, modID, gameID, profileName string, policy domain.UpdatePolicy) error
UpdateModPolicy updates the update policy for an installed mod
func (*DB) UpdateModVersion ¶
UpdateModVersion updates a mod's version, preserving the previous version for rollback
type FileWithChecksum ¶ added in v0.8.0
FileWithChecksum represents a file record with its checksum