File: Cache/Requests.lean

full_name: Cache.Requests.useFROCache
code: def useFROCache : Bool 
goal: Bool

full_name: Cache.Requests.URL
code: /-- Public URL for mathlib cache -/
def URL : String 
goal: String

full_name: Cache.Requests.getToken
code: /-- Retrieves the azure token from the environment -/
def getToken : IO String 
goal: IO String

full_name: Cache.Requests.mkFileURL
code: /--
Given a file name like `"1234.tar.gz"`, makes the URL to that file on the server.

The `f/` prefix means that it's a common file for caching.
-/
def mkFileURL (URL fileName : String) : String 
goal: String

full_name: Cache.Requests.mkGetConfigContent
code: /-- Formats the config file for `curl`, containing the list of files to be downloaded -/
def mkGetConfigContent (hashMap : IO.HashMap) : IO String 
goal: IO String

full_name: Cache.Requests.downloadFile
code: /-- Calls `curl` to download a single file from the server to `CACHEDIR` (`.cache`) -/
def downloadFile (hash : UInt64) : IO Bool 
goal: IO Bool

full_name: Cache.Requests.downloadFiles
code: /-- Call `curl` to download files from the server to `CACHEDIR` (`.cache`).
Exit the process with exit code 1 if any files failed to download. -/
def downloadFiles (hashMap : IO.HashMap) (forceDownload : Bool) (parallel : Bool) : IO Unit 
goal: IO Unit

full_name: Cache.Requests.checkForToolchainMismatch
code: /-- Check if the project's `lean-toolchain` file matches mathlib's.
Print and error and exit the process with error code 1 otherwise. -/
def checkForToolchainMismatch : IO.CacheM Unit 
goal: Cache.IO.CacheM Unit

full_name: Cache.Requests.getFiles
code: /-- Downloads missing files, and unpacks files. -/
def getFiles (hashMap : IO.HashMap) (forceDownload forceUnpack parallel decompress : Bool) :
    IO.CacheM Unit 
goal: Cache.IO.CacheM Unit

full_name: Cache.Requests.UPLOAD_URL
code: /-- FRO cache S3 URL -/
def UPLOAD_URL : String 
goal: String

full_name: Cache.Requests.mkPutConfigContent
code: /-- Formats the config file for `curl`, containing the list of files to be uploaded -/
def mkPutConfigContent (fileNames : Array String) (token : String) : IO String 
goal: IO String

full_name: Cache.Requests.putFiles
code: /-- Calls `curl` to send a set of cached files to the server -/
def putFiles (fileNames : Array String) (overwrite : Bool) (token : String) : IO Unit 
goal: IO Unit

full_name: Cache.Requests.isGitStatusClean
code: def isGitStatusClean : IO Bool 
goal: IO Bool

full_name: Cache.Requests.getGitCommitHash
code: def getGitCommitHash : IO String 
goal: IO String

full_name: Cache.Requests.commit
code: /--
Sends a commit file to the server, containing the hashes of the respective committed files.

The file name is the current Git hash and the `c/` prefix means that it's a commit file.
-/
def commit (hashMap : IO.HashMap) (overwrite : Bool) (token : String) : IO Unit 
goal: IO Unit

full_name: Cache.Requests.QueryType
code: inductive QueryType
  | files | commits | all
goal: Type

full_name: Cache.Requests.QueryType.commits
code: inductive QueryType
  | files | commits | all
goal: Cache.Requests.QueryType

full_name: Cache.Requests.QueryType.all
code: inductive QueryType
  | files | commits | all
goal: Cache.Requests.QueryType

full_name: Cache.Requests.QueryType.files
code: inductive QueryType
  | files | commits | all
goal: Cache.Requests.QueryType

full_name: Cache.Requests.QueryType.prefix
code: def QueryType.prefix : QueryType → String
  
goal: Cache.Requests.QueryType → String

full_name: Cache.Requests.formatError
code: def formatError : IO α 
goal: IO α

full_name: Cache.Requests.QueryType.desc
code: def QueryType.desc : QueryType → String
  
goal: Cache.Requests.QueryType → String

full_name: Cache.Requests.getFilesInfo
code: /--
Retrieves metadata about hosted files: their names and the timestamps of last modification.

Example: `["f/39476538726384726.tar.gz", "Sat, 24 Dec 2022 17:33:01 GMT"]`
-/
def getFilesInfo (q : QueryType) : IO <| List (String × String) 
goal: IO (List (String × String))