Dagger
Search

opa

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d

Entrypoint

Return Type
Opa !
Arguments
NameTypeDefault ValueDescription
appString !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string
func (m *myModule) example(app string) *Opa  {
	return dag.
			Opa(app)
}
@function
def example(app: str) -> dag.Opa:
	return (
		dag.opa(app)
	)
@func()
example(app: string): Opa {
	return dag
		.opa(app)
}

Types

Opa 🔗

app() 🔗

Return Type
String !
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string app
func (m *myModule) example(ctx context.Context, app string) string  {
	return dag.
			Opa(app).
			App(ctx)
}
@function
async def example(app: str) -> str:
	return await (
		dag.opa(app)
		.app()
	)
@func()
async example(app: string): Promise<string> {
	return dag
		.opa(app)
		.app()
}

classifyClaims() 🔗

Return Type
[ClaimClassification ! ] !
Arguments
NameTypeDefault ValueDescription
claimsDirDirectory !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string classify-claims --claims-dir DIR_PATH
func (m *myModule) example(app string, claimsDir *Directory) []*OpaClaimClassification  {
	return dag.
			Opa(app).
			ClassifyClaims(claimsDir)
}
@function
def example(app: str, claims_dir: dagger.Directory) -> List[dag.OpaClaimClassification]:
	return (
		dag.opa(app)
		.classify_claims(claims_dir)
	)
@func()
example(app: string, claimsDir: Directory): OpaClaimClassification[] {
	return dag
		.opa(app)
		.classifyClaims(claimsDir)
}

validate() 🔗

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
policyFile !-No description provided
dataFile !-No description provided
fileFile !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string validate --policy file:path --data file:path --file file:path
func (m *myModule) example(app string, policy *File, data *File, file *File) *Container  {
	return dag.
			Opa(app).
			Validate(policy, data, file)
}
@function
def example(app: str, policy: dagger.File, data: dagger.File, file: dagger.File) -> dagger.Container:
	return (
		dag.opa(app)
		.validate(policy, data, file)
	)
@func()
example(app: string, policy: File, data: File, file: File): Container {
	return dag
		.opa(app)
		.validate(policy, data, file)
}

loadDataRules() 🔗

Return Type
[ClaimsDataRules ! ] !
Arguments
NameTypeDefault ValueDescription
validationsDirDirectory !-No description provided
appString !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string load-data-rules --validations-dir DIR_PATH --app string
func (m *myModule) example(app string, validationsDir *Directory, app1 string) []*OpaClaimsDataRules  {
	return dag.
			Opa(app).
			LoadDataRules(validationsDir, app1)
}
@function
def example(app: str, validations_dir: dagger.Directory, app1: str) -> List[dag.OpaClaimsDataRules]:
	return (
		dag.opa(app)
		.load_data_rules(validations_dir, app1)
	)
@func()
example(app: string, validationsDir: Directory, app1: string): OpaClaimsDataRules[] {
	return dag
		.opa(app)
		.loadDataRules(validationsDir, app1)
}

validateClaims() 🔗

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
claimsDirDirectory !-No description provided
validationsDirDirectory !-No description provided
policiesDirDirectory !-No description provided
Example
dagger -m github.com/prefapp/daggerverse/opa@5c65293f791471ae5fb1d1b46cfbe23e51bf731d call \
 --app string validate-claims --claims-dir DIR_PATH --validations-dir DIR_PATH --policies-dir DIR_PATH
func (m *myModule) example(ctx context.Context, app string, claimsDir *Directory, validationsDir *Directory, policiesDir *Directory)   {
	return dag.
			Opa(app).
			ValidateClaims(ctx, claimsDir, validationsDir, policiesDir)
}
@function
async def example(app: str, claims_dir: dagger.Directory, validations_dir: dagger.Directory, policies_dir: dagger.Directory) -> None:
	return await (
		dag.opa(app)
		.validate_claims(claims_dir, validations_dir, policies_dir)
	)
@func()
async example(app: string, claimsDir: Directory, validationsDir: Directory, policiesDir: Directory): Promise<void> {
	return dag
		.opa(app)
		.validateClaims(claimsDir, validationsDir, policiesDir)
}

findApplicableClaims() 🔗

Return Type
[ClaimClassification ! ] !
Arguments
NameTypeDefault ValueDescription
claims[ClaimClassification ! ] !-No description provided
dataClaimsDataRules !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(app string, claims []*OpaClaimClassification, data *OpaClaimsDataRules) []*OpaClaimClassification  {
	return dag.
			Opa(app).
			FindApplicableClaims(claims, data)
}
@function
def example(app: str, claims: List[dag.OpaClaimClassification], data: dag.OpaClaimsDataRules) -> List[dag.OpaClaimClassification]:
	return (
		dag.opa(app)
		.find_applicable_claims(claims, data)
	)
@func()
example(app: string, claims: OpaClaimClassification[], data: OpaClaimsDataRules): OpaClaimClassification[] {
	return dag
		.opa(app)
		.findApplicableClaims(claims, data)
}

ClaimClassification 🔗

name() 🔗

Return Type
String !
Example
Function OpaClaimClassification.name is not accessible from the opa module
Function OpaClaimClassification.name is not accessible from the opa module
Function OpaClaimClassification.name is not accessible from the opa module
Function OpaClaimClassification.name is not accessible from the opa module

kind() 🔗

Return Type
String !
Example
Function OpaClaimClassification.kind is not accessible from the opa module
Function OpaClaimClassification.kind is not accessible from the opa module
Function OpaClaimClassification.kind is not accessible from the opa module
Function OpaClaimClassification.kind is not accessible from the opa module

environment() 🔗

Return Type
String !
Example
Function OpaClaimClassification.environment is not accessible from the opa module
Function OpaClaimClassification.environment is not accessible from the opa module
Function OpaClaimClassification.environment is not accessible from the opa module
Function OpaClaimClassification.environment is not accessible from the opa module

resourceType() 🔗

Return Type
String !
Example
Function OpaClaimClassification.resourceType is not accessible from the opa module
Function OpaClaimClassification.resourceType is not accessible from the opa module
Function OpaClaimClassification.resourceType is not accessible from the opa module
Function OpaClaimClassification.resourceType is not accessible from the opa module

tenant() 🔗

Return Type
String !
Example
Function OpaClaimClassification.tenant is not accessible from the opa module
Function OpaClaimClassification.tenant is not accessible from the opa module
Function OpaClaimClassification.tenant is not accessible from the opa module
Function OpaClaimClassification.tenant is not accessible from the opa module

platform() 🔗

Return Type
String !
Example
Function OpaClaimClassification.platform is not accessible from the opa module
Function OpaClaimClassification.platform is not accessible from the opa module
Function OpaClaimClassification.platform is not accessible from the opa module
Function OpaClaimClassification.platform is not accessible from the opa module

app() 🔗

Return Type
String !
Example
Function OpaClaimClassification.app is not accessible from the opa module
Function OpaClaimClassification.app is not accessible from the opa module
Function OpaClaimClassification.app is not accessible from the opa module
Function OpaClaimClassification.app is not accessible from the opa module

file() 🔗

Return Type
File !
Example
Function OpaClaimClassification.file is not accessible from the opa module
Function OpaClaimClassification.file is not accessible from the opa module
Function OpaClaimClassification.file is not accessible from the opa module
Function OpaClaimClassification.file is not accessible from the opa module

ClaimsDataRules 🔗

name() 🔗

Return Type
String !
Example
Function OpaClaimsDataRules.name is not accessible from the opa module
Function OpaClaimsDataRules.name is not accessible from the opa module
Function OpaClaimsDataRules.name is not accessible from the opa module
Function OpaClaimsDataRules.name is not accessible from the opa module

description() 🔗

Return Type
String !
Example
Function OpaClaimsDataRules.description is not accessible from the opa module
Function OpaClaimsDataRules.description is not accessible from the opa module
Function OpaClaimsDataRules.description is not accessible from the opa module
Function OpaClaimsDataRules.description is not accessible from the opa module

regoFile() 🔗

Return Type
String !
Example
Function OpaClaimsDataRules.regoFile is not accessible from the opa module
Function OpaClaimsDataRules.regoFile is not accessible from the opa module
Function OpaClaimsDataRules.regoFile is not accessible from the opa module
Function OpaClaimsDataRules.regoFile is not accessible from the opa module

file() 🔗

Return Type
File !
Example
Function OpaClaimsDataRules.file is not accessible from the opa module
Function OpaClaimsDataRules.file is not accessible from the opa module
Function OpaClaimsDataRules.file is not accessible from the opa module
Function OpaClaimsDataRules.file is not accessible from the opa module

applyTo() 🔗

Return Type
[ApplicableRule ! ] !
Example
Function OpaClaimsDataRules.applyTo is not accessible from the opa module
Function OpaClaimsDataRules.applyTo is not accessible from the opa module
Function OpaClaimsDataRules.applyTo is not accessible from the opa module
Function OpaClaimsDataRules.applyTo is not accessible from the opa module

ApplicableRule 🔗

app() 🔗

Return Type
String !
Example
Function OpaApplicableRule.app is not accessible from the opa module
Function OpaApplicableRule.app is not accessible from the opa module
Function OpaApplicableRule.app is not accessible from the opa module
Function OpaApplicableRule.app is not accessible from the opa module

name() 🔗

Return Type
String !
Example
Function OpaApplicableRule.name is not accessible from the opa module
Function OpaApplicableRule.name is not accessible from the opa module
Function OpaApplicableRule.name is not accessible from the opa module
Function OpaApplicableRule.name is not accessible from the opa module

kind() 🔗

Return Type
String !
Example
Function OpaApplicableRule.kind is not accessible from the opa module
Function OpaApplicableRule.kind is not accessible from the opa module
Function OpaApplicableRule.kind is not accessible from the opa module
Function OpaApplicableRule.kind is not accessible from the opa module

resourceType() 🔗

Return Type
String !
Example
Function OpaApplicableRule.resourceType is not accessible from the opa module
Function OpaApplicableRule.resourceType is not accessible from the opa module
Function OpaApplicableRule.resourceType is not accessible from the opa module
Function OpaApplicableRule.resourceType is not accessible from the opa module

environment() 🔗

Return Type
String !
Example
Function OpaApplicableRule.environment is not accessible from the opa module
Function OpaApplicableRule.environment is not accessible from the opa module
Function OpaApplicableRule.environment is not accessible from the opa module
Function OpaApplicableRule.environment is not accessible from the opa module

tenant() 🔗

Return Type
String !
Example
Function OpaApplicableRule.tenant is not accessible from the opa module
Function OpaApplicableRule.tenant is not accessible from the opa module
Function OpaApplicableRule.tenant is not accessible from the opa module
Function OpaApplicableRule.tenant is not accessible from the opa module

platform() 🔗

Return Type
String !
Example
Function OpaApplicableRule.platform is not accessible from the opa module
Function OpaApplicableRule.platform is not accessible from the opa module
Function OpaApplicableRule.platform is not accessible from the opa module
Function OpaApplicableRule.platform is not accessible from the opa module