# Packages
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
Close the database connection.
Connect establishes a connection to the database and creates the table structure, if necessary.
DeleteAllSessions logs all users out.
DeleteApiKey deletes an API key with the given ID.
DeleteEnd2EndInfo resets the encrypted e2e info.
DeleteHotlink deletes a hotlink with the given hotlink ID.
DeleteMetaData deletes information about a file.
DeleteSession deletes a session with the given ID.
GetAllApiKeys returns a map with all API keys.
GetAllHotlinks returns an array with all hotlink ids.
GetAllMetadata returns a map of all available files.
GetAllMetaDataIds returns all Ids that contain metadata.
GetAllUploadStatus returns all UploadStatus values from the past 24 hours.
GetApiKey returns a models.ApiKey if valid or false if the ID is not valid.
GetEnd2EndInfo retrieves the encrypted e2e info.
GetHotlink returns the id of the file associated or false if not found.
GetMetaDataById returns a models.File from the ID passed or false if the id is not valid.
GetSession returns the session with the given ID or false if not a valid ID.
GetUploadDefaults returns the last used setting for amount of downloads allowed, last expiry in days and a password for the file.
GetUploadStatus returns a models.UploadStatus from the ID passed or false if the id is not valid.
Migrate copies a database to a new location.
ParseUrl converts a database URL to a models.DbConnection struct.
RunGarbageCollection runs the databases GC.
SaveApiKey saves the API key to the database.
SaveEnd2EndInfo stores the encrypted e2e info.
SaveHotlink stores the hotlink associated with the file in the database.
SaveMetaData stores the metadata of a file to the disk.
SaveSession stores the given session.
SaveUploadDefaults saves the last used setting for an upload.
SaveUploadStatus stores the upload status of a new file for 24 hours.
UpdateTimeApiKey writes the content of LastUsage to the database.
Upgrade migrates the DB to a new Gokapi version, if required.