Documentation ¶
Index ¶
- func Close()
- func DeleteAllSessions()
- func DeleteApiKey(id string)
- func DeleteEnd2EndInfo()
- func DeleteHotlink(id string)
- func DeleteMetaData(id string)
- func DeleteSession(id string)
- func GetAllApiKeys() map[string]models.ApiKey
- func GetAllMetaDataIds() []string
- func GetAllMetadata() map[string]models.File
- func GetApiKey(id string) (models.ApiKey, bool)
- func GetEnd2EndInfo() models.E2EInfoEncrypted
- func GetHotlink(id string) (string, bool)
- func GetLengthAvailable() int
- func GetMetaDataById(id string) (models.File, bool)
- func GetRawKey(id string) ([]byte, bool)
- func GetSession(id string) (models.Session, bool)
- func GetUploadDefaults() models.LastUploadValues
- func Init(dbPath string)
- func RunGarbageCollection()
- func SaveApiKey(apikey models.ApiKey, updateTimeOnly bool)
- func SaveEnd2EndInfo(info models.E2EInfoEncrypted)
- func SaveHotlink(file models.File)
- func SaveMetaData(file models.File)
- func SaveSession(id string, session models.Session, expiry time.Duration)
- func SaveUploadDefaults(values models.LastUploadValues)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEnd2EndInfo ¶ added in v1.6.0
func DeleteEnd2EndInfo()
DeleteEnd2EndInfo resets the encrypted e2e info
func DeleteHotlink ¶
func DeleteHotlink(id string)
DeleteHotlink deletes a hotlink with the given ID
func DeleteMetaData ¶
func DeleteMetaData(id string)
DeleteMetaData deletes information about a file
func DeleteSession ¶
func DeleteSession(id string)
DeleteSession deletes a session with the given ID
func GetAllApiKeys ¶
GetAllApiKeys returns a map with all API keys
func GetAllMetaDataIds ¶ added in v1.6.0
func GetAllMetaDataIds() []string
GetAllMetaDataIds returns all Ids that contain metadata
func GetAllMetadata ¶
GetAllMetadata returns a map of all available files
func GetEnd2EndInfo ¶ added in v1.6.0
func GetEnd2EndInfo() models.E2EInfoEncrypted
GetEnd2EndInfo retrieves the encrypted e2e info
func GetHotlink ¶
GetHotlink returns the id of the file associated or false if not found
func GetLengthAvailable ¶
func GetLengthAvailable() int
GetLengthAvailable returns the maximum length for a key name
func GetMetaDataById ¶
GetMetaDataById returns a models.File,true from the ID passed or false if the id is not valid
func GetSession ¶
GetSession returns the session with the given ID or false if not a valid ID
func GetUploadDefaults ¶
func GetUploadDefaults() models.LastUploadValues
GetUploadDefaults returns the last used setting for amount of downloads allowed, last expiry in days and a password for the file
func SaveApiKey ¶
SaveApiKey saves the API key to the database. If updateTimeOnly is true, the database might not be synced afterwards
func SaveEnd2EndInfo ¶ added in v1.6.0
func SaveEnd2EndInfo(info models.E2EInfoEncrypted)
SaveEnd2EndInfo stores the encrypted e2e info
func SaveHotlink ¶
SaveHotlink stores the hotlink associated with the file in the bitcaskDb
func SaveMetaData ¶
SaveMetaData stores the metadata of a file to the disk
func SaveSession ¶
SaveSession stores the given session. After the expiry passed, it will be deleted automatically
func SaveUploadDefaults ¶
func SaveUploadDefaults(values models.LastUploadValues)
SaveUploadDefaults saves the last used setting for an upload
Types ¶
This section is empty.