-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
167 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/target | ||
fluentci-*.json | ||
process-compose* | ||
process-compose* | ||
sdk/rescript/lib | ||
sdk/rescript/node_modules | ||
sdk/rescript/demo/lib | ||
sdk/rescript/demo/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*.beam | ||
*.ez | ||
/build | ||
erl_crash.dump | ||
erl_crash.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import fluentci/client.{dag, set_secret} | ||
import fluentci/secret.{plaintext} | ||
import gleam/io | ||
import gleam/javascript/promise.{await, resolve} | ||
|
||
pub fn main() { | ||
io.println("Hello from demo!") | ||
let secret = dag() |> set_secret("my-secret", "my-value") | ||
secret | ||
|> plaintext | ||
|> await(fn(value) { | ||
io.debug(value) | ||
resolve(value) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { dag } from "jsr:@fluentci/sdk"; | ||
|
||
export function client() { | ||
return dag; | ||
} | ||
|
||
export function setSecret(c, name, value) { | ||
return c.setSecret(name, value); | ||
} | ||
|
||
export function plaintext(secret) { | ||
return secret.plaintext(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import fluentci/cache.{type Cache} | ||
import fluentci/devbox.{type Devbox} | ||
import fluentci/devenv.{type Devenv} | ||
import fluentci/directory.{type Directory} | ||
import fluentci/file.{type File} | ||
import fluentci/flox.{type Flox} | ||
import fluentci/git.{type Git} | ||
import fluentci/nix.{type Nix} | ||
import fluentci/pipeline.{type Pipeline} | ||
import fluentci/pkgx.{type Pkgx} | ||
import fluentci/secret.{type Secret} | ||
import fluentci/secret_manager.{type SecretManager} | ||
|
||
pub type Client | ||
|
||
@external(javascript, "../fluentci.mjs", "client") | ||
pub fn dag() -> Client | ||
|
||
@external(javascript, "../fluentci.mjs", "setSecret") | ||
pub fn set_secret_(client: Client, name: String, value: String) -> Secret | ||
|
||
pub fn azure_secrets_manager( | ||
client: Client, | ||
region: String, | ||
access_key_id: String, | ||
secret_access_key: String, | ||
) -> SecretManager { | ||
todo | ||
} | ||
|
||
pub fn azure_keyvault( | ||
client: Client, | ||
client_id: String, | ||
client_secret: String, | ||
tenant_id: String, | ||
keyvault_name: String, | ||
keyvault_url: String, | ||
) -> SecretManager { | ||
todo | ||
} | ||
|
||
pub fn cache(client: Client, key: String) -> Cache { | ||
todo | ||
} | ||
|
||
pub fn devbox(client: Client) -> Devbox { | ||
todo | ||
} | ||
|
||
pub fn devenv(client: Client) -> Devenv { | ||
todo | ||
} | ||
|
||
pub fn directory(client: Client, path: String) -> Directory { | ||
todo | ||
} | ||
|
||
pub fn file(client: Client, path: String) -> File { | ||
todo | ||
} | ||
|
||
pub fn flox(client: Client) -> Flox { | ||
todo | ||
} | ||
|
||
pub fn git(client: Client, url: String) -> Git { | ||
todo | ||
} | ||
|
||
pub fn google_cloud_secret_manager( | ||
client: Client, | ||
project: String, | ||
google_credentials_file: String, | ||
) -> SecretManager { | ||
todo | ||
} | ||
|
||
pub fn hashicorp_vault( | ||
client: Client, | ||
address: String, | ||
token: String, | ||
cacerts: String, | ||
) -> SecretManager { | ||
todo | ||
} | ||
|
||
pub fn http(client: Client, url: String) -> File { | ||
todo | ||
} | ||
|
||
pub fn nix(client: Client) -> Nix { | ||
todo | ||
} | ||
|
||
pub fn pipeline(client: Client, name: String) -> Pipeline { | ||
todo | ||
} | ||
|
||
pub fn pkgx(client: Client) -> Pkgx { | ||
todo | ||
} | ||
|
||
pub fn set_secret(client: Client, name: String, value: String) -> Secret { | ||
set_secret_(client, name, value) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Devbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Devenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Flox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Mise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Pipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Pixi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Pkgx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import gleam/javascript/promise.{type Promise} | ||
|
||
pub type Secret | ||
|
||
@external(javascript, "../fluentci.mjs", "plaintext") | ||
pub fn plaintext_(secret: Secret) -> Promise(String) | ||
|
||
pub fn plaintext(secret: Secret) -> Promise(String) { | ||
plaintext_(secret) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type SecretManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub type Service |