mnix: Nix binary-cache client PoC in MoonBit (install hello from cache.nixos.org) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
4e7ce11973
commit
fa70164336
48 files changed
+3112
-2
No files matched your search
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "experiments/moon-nix/cache"
|
||||
|
||||
import {
|
||||
"experiments/moon-nix/narinfo",
|
||||
"experiments/moon-nix/sign",
|
||||
"experiments/moon-nix/store",
|
||||
}
|
||||
|
||||
// Values
|
||||
pub fn decompress(String, Bytes) -> Bytes raise @store.NixError
|
||||
|
||||
pub let default_cache_url : String
|
||||
|
||||
pub async fn http_get(String, allow_404? : Bool, accept_json? : Bool) -> Bytes? raise @store.NixError
|
||||
|
||||
pub fn verify_nar_download(@narinfo.NarInfo, Bytes) -> Bytes raise @store.NixError
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub(all) struct Cache {
|
||||
url : String
|
||||
trusted_keys : Array[@sign.PublicKey]
|
||||
}
|
||||
pub async fn Cache::fetch_nar(Self, @narinfo.NarInfo) -> Bytes raise @store.NixError
|
||||
pub async fn Cache::fetch_narinfo(Self, String) -> @narinfo.NarInfo? raise @store.NixError
|
||||
pub fn Cache::new(url? : String, keys? : Array[String]) -> Self raise @store.NixError
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
Reference in new issue
Block a user