ejson
No long description provided.
Installation
dagger install github.com/becojo/daggerverse/ejson@v0.1.0Entrypoint
Return Type
Ejson Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
func (m *MyModule) Example() *dagger.Ejson {
return dag.
Ejson()
}@function
def example() -> dagger.Ejson:
return (
dag.ejson()
)@func()
example(): Ejson {
return dag
.ejson()
}Types
Ejson 🔗
container() 🔗
Compile EJSON and return a container with the binary in /usr/bin/ejson
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | No description provided |
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Ejson().
Container()
}@function
def example() -> dagger.Container:
return (
dag.ejson()
.container()
)@func()
example(): Container {
return dag
.ejson()
.container()
}encrypt() 🔗
Encrypt an EJSON file
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ejson | Secret ! | - | No description provided |
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
encrypt --ejson env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, ejson *dagger.Secret) string {
return dag.
Ejson().
Encrypt(ctx, ejson)
}@function
async def example(ejson: dagger.Secret) -> str:
return await (
dag.ejson()
.encrypt(ejson)
)@func()
async example(ejson: Secret): Promise<string> {
return dag
.ejson()
.encrypt(ejson)
}decryptSecrets() 🔗
Return a container with decrypted environment variables from an EJSON file
Similar to ejson2env, the EJSON file is expected to have a map of environment variables in the “environment” key. If the environment variable starts with an underscore, it will be added to the container’s environment variables with the leading underscore removed. Otherwise, it will be added as a secret variable.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | No description provided |
| ejson | File ! | - | No description provided |
| key | Secret ! | - | No description provided |
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
decrypt-secrets --ejson file:path --key env:MYSECRETfunc (m *MyModule) Example(ejson *dagger.File, key *dagger.Secret) *dagger.Container {
return dag.
Ejson().
DecryptSecrets(ejson, key)
}@function
def example(ejson: dagger.File, key: dagger.Secret) -> dagger.Container:
return (
dag.ejson()
.decrypt_secrets(ejson, key)
)@func()
example(ejson: File, key: Secret): Container {
return dag
.ejson()
.decryptSecrets(ejson, key)
}