Versions in this module Expand all Collapse all v0 v0.2.1 Oct 21, 2026 Changes in this version + func AdminRole(p *Policy) string + func CanonicalNumericLiteral(s string) (string, bool) + func CanonicalScalar(v any) (string, bool) + func DefaultRoleGrantsAdmin(p *Policy) bool + func IsAdmin(p *Policy, role string) bool + func ResolveRole(p *Policy, role string) string + func RoleAllowed(p *Policy, role string, allowedRoles []string) bool + func Validate(p *Policy) error + type ByteSize int64 + func (b *ByteSize) UnmarshalJSON(data []byte) error + func (b *ByteSize) UnmarshalYAML(value *yaml.Node) error + func (b ByteSize) Bytes() int64 + type ColumnKind uint8 + const ColumnNumeric + const ColumnOpaque + const ColumnText + const ColumnTime + type ColumnSpec struct + Kind ColumnKind + Numeric NumericSpec + ParseTime func(v any) (t time.Time, ok bool) + type Filter struct + Eq *string + Gt *string + In *string + Lt *string + Neq *string + type InsertPermissions struct + AllowColumns []string + Check map[string]Filter + DenyColumns []string + type LiteralValue string + type Millis int64 + func (m *Millis) UnmarshalJSON(data []byte) error + func (m *Millis) UnmarshalYAML(value *yaml.Node) error + func (m Millis) Duration() time.Duration + type NumericFamily uint8 + const NumericDecimal + const NumericFloat + const NumericInteger + const NumericNone + type NumericSpec struct + Bits int + Family NumericFamily + Precision int + Scale int + Unsigned bool + type Policy struct + AdminRole string + DefaultRole string + Tables map[string]TablePolicy + type ResolvedInsert struct + AllowColumns []string + CheckClauses map[string]any + DenyColumns []string + type ResolvedPermissions struct + Allowed bool + Insert *ResolvedInsert + Select *ResolvedSelect + func Evaluate(p *Policy, role, table, operation string, claims map[string]any) *ResolvedPermissions + func (p *ResolvedPermissions) HasRowFilter() bool + func (p *ResolvedPermissions) RowVisible(row map[string]any, cols map[string]ColumnSpec) bool + func (rp *ResolvedPermissions) AllowedProjection(cols []string) []string + func (rp *ResolvedPermissions) CheckClauses() (map[string]any, bool) + func (rp *ResolvedPermissions) IsAggregationAllowed(fn string) bool + func (rp *ResolvedPermissions) IsColumnAllowed(col string, insert bool) bool + func (rp *ResolvedPermissions) RestrictsColumns() bool + type ResolvedSelect struct + AllowColumns []string + AllowedAggregations []string + DeniedAggregations []string + DenyColumns []string + MaxExecutionTime Millis + MaxMemoryUsage ByteSize + MaxRows int + MaxRowsToRead int64 + WhereClause string + WhereParams []any + type RolePermissions struct + Insert *InsertPermissions + Select *SelectPermissions + type SelectPermissions struct + AllowColumns []string + AllowedAggregations []string + DeniedAggregations []string + DenyColumns []string + Filter map[string]Filter + MaxExecutionTime Millis + MaxMemoryUsage ByteSize + MaxRows int + MaxRowsToRead int64 + type Source func() *Policy + func Static(p *Policy) Source + type TablePolicy map[string]RolePermissions