cerbos
Visit https://cerbos.dev and https://github.com/cerbos/cerbos for more information.Installation
dagger install github.com/cerbos/dagger-cerbos@v0.1.0Entrypoint
Return Type
Cerbos Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
func (m *MyModule) Example() *dagger.Cerbos {
return dag.
Cerbos()
}@function
def example() -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| policyDir | Directory ! | - | Directory containing the Cerbos policies. |
| outputFormat | String | - | Compile results output format. Valid values are "tree", "list" or "json". |
| ignoreSchemas | Boolean | - | Ignore schemas during compilation. |
| skipTests | Boolean | - | Only compile without running tests. |
| run | String | - | Regular expression matching the tests to run. |
| testOutputFormat | String | - | Test output format. Valid values are "tree", "list", "json" or "junit". |
| verboseFailures | Boolean | - | Produce execution traces on test failure. |
| cerbosVersion | String | "latest" | Cerbos version to use. |
Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
compile --policy-dir DIR_PATHfunc (m *MyModule) Example(ctx context.Context, policyDir *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| cerbosVersion | String | "latest" | Cerbos version to use. |
| config | [String ! ] | - | List of configuration values to pass to Cerbos in the format config.key=value format. |
| configFile | File | - | Directory containing the Cerbos configuration file. |
| policyDir | Directory | - | Directory containing the Cerbos policies. |
| logLevel | String | - | Cerbos log level. |
Example
dagger -m github.com/cerbos/dagger-cerbos@ffb25f18f978d2f709152d78b0de599c4d0f213a call \
serverfunc (m *MyModule) Example() *dagger.Service {
return dag.
Cerbos().
Server()
}@function
def example() -> dagger.Service:
return (
dag.cerbos()
.server()
)@func()
example(): Service {
return dag
.cerbos()
.server()
}