import * as embassydSdk from "https://deno.land/x/embassyd_sdk@v0.3.4-alpha1/mod.ts";
Classes
This utility simplifies the volume backup process. | |
Given an object, we want to make sure the key exists and that the value on the key matches the parser Note: This will mutate the value sent through | |
A Parser is usually a function that takes a value and returns a Parsed value. For this class we have that as our main reason but we want to be able to have other methods including testing and showing text representations. | |
Given an object, we want to make sure the key exists and that the value on the key matches the parser | |
A Parser is usually a function that takes a value and returns a Parsed value. For this class we have that as our main reason but we want to be able to have other methods including testing and showing text representations. | |
Variables
Call with the configuration to get a standard getConfig for the expected exports Assumption: start9/config.yaml is where the config will be stored Throws: Error if there is no file Throws: Error if the config.yaml isn't yaml nor config shape | |
Call with the configuration to get a standard getConfig for the expected exports Assumption: start9/config.yaml is where the config will be stored Throws: Error if there is no file Throws: Error if the config.yaml isn't yaml nor config shape | |
Default will pull from a file (start9/stats.yaml) expected to be made on the main volume Assumption: start9/stats.yaml is created by some process Throws: stats.yaml isn't yaml | |
Will set the config to the default start9/config.yaml Assumption: start9/config.yaml is the location of the configuration | |
Want to be able to bring in the declarative nature that a functional programming language feature of the pattern matching and the switch statement. With the destructors the only thing left was to find the correct structure then move move forward. Using a structure in chainable fashion allows for a syntax that works with typescript while looking similar to matches statements in other languages | |
Want to be able to bring in the declarative nature that a functional programming language feature of the pattern matching and the switch statement. With the destructors the only thing left was to find the correct structure then move move forward. Using a structure in chainable fashion allows for a syntax that works with typescript while looking similar to matches statements in other languages | |
Good for duck typing an object, with optional values | |
Used to check if the file exists before hand | |
Functions
We would like to validate that all of the array is of the same type | |
Must pass the shape that we expect since typescript as of this point can't infer with recursive like structures like this. | |
Intersection is a good tool to make sure that the validated value
is in the intersection of all the validators passed in. Basically an | |
Create a custom type guard | |
Must pass the shape that we expect since typescript as of this point can't infer with recursive functions like this. | |
Tries and run the stringify, if that fails just return the toString | |
Union is a good tool to make sure that the validated value
is in the union of all the validators passed in. Basically an | |
ConfigSpec: Tells the UI how to ask for information, verification, and will send the service a config in a shape via the spec. ValueSpecAny: This is any of the values in a config spec. | |
ConfigSpec: Tells the UI how to ask for information, verification, and will send the service a config in a shape via the spec. ValueSpecAny: This is any of the values in a config spec. | |
Parses | |
Same as | |
Serializes |
Type Aliases
Used to reach out from the pure js runtime | |
For backing up service data though the embassyOS UI | |
These are how we make sure the our dependency configurations are valid and if not how to fix them. | |
Get configuration returns a shape that describes the format that the embassy ui will generate, and later send to the set config | |
This is the entrypoint for the main container. Used to start up something like the service that the package represents, like running a bitcoind in a bitcoind-wrapper. | |
Properties are used to get values from the docker, like a username + password, what ports we are hosting from | |
For restoring service data that was previously backed up using the embassyOS UI create backup flow. Backup restores are also triggered via the embassyOS UI, or doing a system restore flow during setup. | |
Set configuration is called after we have modified and saved the configuration in the embassy ui. Use this to make a file for the docker to read from for configuration. | |