rule

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rule provides Ent privacy rules for AgentComms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterTenantRule

func FilterTenantRule() privacy.QueryMutationRule

FilterTenantRule returns a privacy rule that filters queries and mutations by tenant_id. It extracts the tenant ID from context and adds a WHERE clause to filter by tenant_id. This rule works on both SQLite and PostgreSQL.

Types

type TenantFilter

type TenantFilter interface {
	WhereTenantID(p entql.StringP)
}

TenantFilter is an interface for filtering by tenant_id. Both AgentQuery and EventQuery implement this through their Filter() method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL