Dagger
Search

cerbos

Visit https://cerbos.dev and https://github.com/cerbos/cerbos for more information.

Installation

dagger install github.com/cerbos/dagger-cerbos@v0.1.0

Entrypoint

Return Type
Cerbos
Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
func (m *myModule) example() *Cerbos  {
	return dag.
			Cerbos()
}
@function
def example() -> dag.Cerbos:
	return (
		dag.cerbos()
	)
@func()
example(): Cerbos {
	return dag
		.cerbos()
}

Types

Cerbos 🔗

compile() 🔗

Compile Cerbos policies and run any discovered tests. See https://docs.cerbos.dev/cerbos/latest/policies/compile.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
policyDirDirectory !-Directory containing the Cerbos policies.
outputFormatString -Compile results output format. Valid values are "tree", "list" or "json".
ignoreSchemasBoolean -Ignore schemas during compilation.
skipTestsBoolean -Only compile without running tests.
runString -Regular expression matching the tests to run.
testOutputFormatString -Test output format. Valid values are "tree", "list", "json" or "junit".
verboseFailuresBoolean -Produce execution traces on test failure.
cerbosVersionString "latest"Cerbos version to use.
Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
 compile --policy-dir DIR_PATH
func (m *myModule) example(ctx context.Context, policyDir *Directory) string  {
	return dag.
			Cerbos().
			Compile(ctx, policyDir)
}
@function
async def example(policy_dir: dagger.Directory) -> str:
	return await (
		dag.cerbos()
		.compile(policy_dir)
	)
@func()
async example(policyDir: Directory): Promise<string> {
	return dag
		.cerbos()
		.compile(policyDir)
}

server() 🔗

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
cerbosVersionString "latest"Cerbos version to use.
config[String ! ] -List of configuration values to pass to Cerbos in the format config.key=value format.
configFileFile -Directory containing the Cerbos configuration file.
policyDirDirectory -Directory containing the Cerbos policies.
logLevelString -Cerbos log level.
Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
 server
func (m *myModule) example() *Service  {
	return dag.
			Cerbos().
			Server()
}
@function
def example() -> dagger.Service:
	return (
		dag.cerbos()
		.server()
	)
@func()
example(): Service {
	return dag
		.cerbos()
		.server()
}