Documentation
¶
Index ¶
- type AnalyticsPlanAliasFact
- func (fact AnalyticsPlanAliasFact) FieldIDs() []policyir.FieldID
- func (fact AnalyticsPlanAliasFact) Matches(candidate string) bool
- func (fact AnalyticsPlanAliasFact) ModelID() policyir.ModelID
- func (fact AnalyticsPlanAliasFact) RelationID() (policyir.RelationID, bool)
- func (fact AnalyticsPlanAliasFact) Role() AnalyticsPlanAliasRole
- type AnalyticsPlanAliasRole
- type AnalyticsPlanMap
- type Column
- type FieldAuthorizationError
- type Plan
- type PolicySet
- type RelationHop
- type RenderOptions
- type Statement
- func (s Statement) Args() []any
- func (s Statement) Columns() []Column
- func (s Statement) Grouped() bool
- func (s Statement) Guarded() bool
- func (s Statement) LimitOverflow(contributionRows, intermediateGroups int64, resultRows int) string
- func (s Statement) PlanMap() AnalyticsPlanMap
- func (s Statement) ResultOverflow(rowCount int) bool
- func (s Statement) SQL() string
- func (s Statement) ScanColumnCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsPlanAliasFact ¶ added in v0.1.0
type AnalyticsPlanAliasFact struct {
// contains filtered or unexported fields
}
AnalyticsPlanAliasFact is one renderer-owned identity for an alias that a provider plan can name. It retains only an opaque matcher and stable schema identities. It never retains SQL, binds, predicates, actor data, or physical table, column, index, and schema names.
func (AnalyticsPlanAliasFact) FieldIDs ¶ added in v0.1.0
func (fact AnalyticsPlanAliasFact) FieldIDs() []policyir.FieldID
func (AnalyticsPlanAliasFact) Matches ¶ added in v0.1.0
func (fact AnalyticsPlanAliasFact) Matches(candidate string) bool
Matches compares an untrusted provider-plan alias with the renderer-owned token. Zero and incomplete facts always fail closed.
func (AnalyticsPlanAliasFact) ModelID ¶ added in v0.1.0
func (fact AnalyticsPlanAliasFact) ModelID() policyir.ModelID
func (AnalyticsPlanAliasFact) RelationID ¶ added in v0.1.0
func (fact AnalyticsPlanAliasFact) RelationID() (policyir.RelationID, bool)
func (AnalyticsPlanAliasFact) Role ¶ added in v0.1.0
func (fact AnalyticsPlanAliasFact) Role() AnalyticsPlanAliasRole
type AnalyticsPlanAliasRole ¶ added in v0.1.0
type AnalyticsPlanAliasRole uint8
AnalyticsPlanAliasRole classifies only the renderer-owned alias, not a provider plan node. A sanitizer must combine this closed provenance with the provider node kind and may never turn a derived alias into physical access.
const ( AnalyticsPlanAliasPhysicalAccess AnalyticsPlanAliasRole = iota + 1 AnalyticsPlanAliasAggregate AnalyticsPlanAliasMaterialize AnalyticsPlanAliasStructural )
type AnalyticsPlanMap ¶ added in v0.1.0
type AnalyticsPlanMap struct {
// contains filtered or unexported fields
}
AnalyticsPlanMap is the immutable alias identity map for one exact rendered analytics statement. Every returned slice is caller-owned. A missing match remains missing; the map never guesses from an alias naming convention.
func (AnalyticsPlanMap) AliasFacts ¶ added in v0.1.0
func (plan AnalyticsPlanMap) AliasFacts() []AnalyticsPlanAliasFact
func (AnalyticsPlanMap) MatchingAliasFacts ¶ added in v0.1.0
func (plan AnalyticsPlanMap) MatchingAliasFacts(candidate string) []AnalyticsPlanAliasFact
type Column ¶
type Column struct {
Term golem.FrozenAnalyticsTerm
Alias string
Type compilerir.LogicalTypeIR
Nullable bool
}
type FieldAuthorizationError ¶
type FieldAuthorizationError struct {
// contains filtered or unexported fields
}
FieldAuthorizationError identifies an analytical field only by its public logical name and stable identity. Provider details and physical names never enter this error, so the runtime can safely preserve the name in its public FORBIDDEN response while retaining the underlying reason for trusted logs.
func (*FieldAuthorizationError) Error ¶
func (failure *FieldAuthorizationError) Error() string
func (*FieldAuthorizationError) FieldID ¶
func (failure *FieldAuthorizationError) FieldID() golem.FieldID
func (*FieldAuthorizationError) LogicalName ¶
func (failure *FieldAuthorizationError) LogicalName() string
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
func System ¶
func System(request golem.FrozenAnalyticsRequest, registry *schema.Registry, providers policyir.ProviderSet, limits readplan.Limits) (Plan, error)
func (Plan) AuthorizedRead ¶
func (Plan) RelationPath ¶
func (plan Plan) RelationPath() []RelationHop
func (Plan) Request ¶
func (plan Plan) Request() golem.FrozenAnalyticsRequest
type RelationHop ¶
type RelationHop struct {
Endpoint schema.RelationEndpoint
Authorized readplan.Plan
}
type RenderOptions ¶
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func Render ¶
func Render(plan Plan, registry *schema.Registry, provider policyir.Provider, capabilities policysql.CapabilityProof, options ...RenderOptions) (Statement, error)
func (Statement) LimitOverflow ¶
func (Statement) PlanMap ¶ added in v0.1.0
func (s Statement) PlanMap() AnalyticsPlanMap