Dagger
Search

ejson

No long description provided.

Installation

dagger install github.com/becojo/daggerverse/ejson@v0.1.0

Entrypoint

Return Type
Ejson
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
func (m *myModule) example() *Ejson  {
	return dag.
			Ejson()
}
@function
def example() -> dag.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
NameTypeDefault ValueDescription
containerContainer -No description provided
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
 container
func (m *myModule) example() *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
NameTypeDefault ValueDescription
ejsonSecret !-No description provided
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
 encrypt --ejson env:MYSECRET
func (m *myModule) example(ctx context.Context, ejson *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
NameTypeDefault ValueDescription
containerContainer -No description provided
ejsonFile !-No description provided
keySecret !-No description provided
Example
dagger -m github.com/becojo/daggerverse/ejson@6f7c19fa4f50bc2b96d0fd15006404a47aeaeb2e call \
 decrypt-secrets --ejson file:path --key env:MYSECRET
func (m *myModule) example(ejson *File, key *Secret) *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)
}