open-policy-agent
This module provides a function to evaluate a rego query and to create a development environment with Open Policy Agent installed.
Installation
dagger install github.com/tsirysndr/daggerverse/open-policy-agent@e8bed26dfefaaf4ef3d00958965575131f34c69c
Entrypoint
Return Type
OpenPolicyAgent
Example
dagger -m github.com/tsirysndr/daggerverse/open-policy-agent@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
func (m *myModule) example() *OpenPolicyAgent {
return dag.
OpenPolicyAgent()
}
@function
def example() -> dag.OpenPolicyAgent:
return (
dag.open_policy_agent()
)
@func()
example(): OpenPolicyAgent {
return dag
.openPolicyAgent()
}
Types
OpenPolicyAgent 🔗
evaluate() 🔗
Evaluate a rego query
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
data | String ! | - | No description provided |
input | String ! | - | No description provided |
query | String ! | - | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/open-policy-agent@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
evaluate --src DIR_PATH --data string --input string --query string
func (m *myModule) example(ctx context.Context, src *Directory, data string, input string, query string) string {
return dag.
OpenPolicyAgent().
Evaluate(ctx, src, data, input, query)
}
@function
async def example(src: dagger.Directory, data: str, input: str, query: str) -> str:
return await (
dag.open_policy_agent()
.evaluate(src, data, input, query)
)
@func()
async example(src: Directory, data: string, input: string, query: string): Promise<string> {
return dag
.openPolicyAgent()
.evaluate(src, data, input, query)
}
dev() 🔗
Returns a container with Open Policy Agent installed.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory | - | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/open-policy-agent@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
dev
func (m *myModule) example() *Container {
return dag.
OpenPolicyAgent().
Dev()
}
@function
def example() -> dagger.Container:
return (
dag.open_policy_agent()
.dev()
)
@func()
example(): Container {
return dag
.openPolicyAgent()
.dev()
}