Initial commit

This commit is contained in:
Leon Mika 2025-01-03 15:16:27 +11:00
commit 12f82e106e
10 changed files with 409 additions and 0 deletions

46
models.go Normal file
View file

@ -0,0 +1,46 @@
package main
type ChunkReport struct {
UploadedChunks int
UploadedBytes int64
TotalChunks int
TotalSize int64
}
type uploadInfo struct {
chunkID string
filename string
totalSize int64
contentType string
allowedDownloads int
expiryDays int
password string
}
type UploadResponse struct {
Result string `json:"Result"`
FileInfo FileInfo `json:"FileInfo"`
IncludeFilename bool `json:"IncludeFilename"`
}
type FileInfo struct {
ID string `json:"Id"`
Name string `json:"Name"`
Size string `json:"Size"`
HotlinkId string `json:"HotlinkId"`
ContentType string `json:"ContentType"`
ExpireAtString string `json:"ExpireAtString"`
UrlDownload string `json:"UrlDownload"`
UrlHotlink string `json:"UrlHotlink"`
ExpireAt int64 `json:"ExpireAt"`
SizeBytes int64 `json:"SizeBytes"`
DownloadsRemaining int `json:"DownloadsRemaining"`
DownloadsCount int `json:"DownloadsCount"`
UnlimitedDownloads bool `json:"UnlimitedDownloads"`
UnlimitedTime bool `json:"UnlimitedTime"`
RequiresClientSideDecryption bool `json:"RequiresClientSideDecryption"`
IsEncrypted bool `json:"IsEncrypted"`
IsEndToEndEncrypted bool `json:"IsEndToEndEncrypted"`
IsPasswordProtected bool `json:"IsPasswordProtected"`
IsSavedOnLocalStorage bool `json:"IsSavedOnLocalStorage"`
}