Class: Cerbos::Output::PlanResources::Metadata
- Inherits:
-
Object
- Object
- Cerbos::Output::PlanResources::Metadata
- Defined in:
- lib/cerbos/output/plan_resources.rb
Overview
Additional information about the query plan.
Instance Attribute Summary collapse
-
#condition_string ⇒ String
readonly
The query condition abstract syntax tree rendered as a human-readable string, to help with debugging.
-
#matched_scope ⇒ String
readonly
The policy scope that was used to plan the query.
-
#matched_scopes ⇒ Hash{String => String}
readonly
The policy scopes that were used to plan the query for each action.
Instance Attribute Details
#condition_string ⇒ String (readonly)
The query condition abstract syntax tree rendered as a human-readable string, to help with debugging.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/cerbos/output/plan_resources.rb', line 132 PlanResources::Metadata = Output.new_class(:condition_string, :matched_scope, :matched_scopes) do # @!attribute [r] condition_string # The query condition abstract syntax tree rendered as a human-readable string, to help with debugging. # # @return [String] # @!attribute [r] matched_scope # The policy scope that was used to plan the query. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies # @!attribute [r] matched_scopes # The policy scopes that were used to plan the query for each action. # # @return [Hash{String => String}] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf() return nil if .nil? new( condition_string: .filter_debug, matched_scope: .matched_scope, matched_scopes: .matched_scopes ) end end |
#matched_scope ⇒ String (readonly)
The policy scope that was used to plan the query.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/cerbos/output/plan_resources.rb', line 132 PlanResources::Metadata = Output.new_class(:condition_string, :matched_scope, :matched_scopes) do # @!attribute [r] condition_string # The query condition abstract syntax tree rendered as a human-readable string, to help with debugging. # # @return [String] # @!attribute [r] matched_scope # The policy scope that was used to plan the query. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies # @!attribute [r] matched_scopes # The policy scopes that were used to plan the query for each action. # # @return [Hash{String => String}] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf() return nil if .nil? new( condition_string: .filter_debug, matched_scope: .matched_scope, matched_scopes: .matched_scopes ) end end |
#matched_scopes ⇒ Hash{String => String} (readonly)
The policy scopes that were used to plan the query for each action.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/cerbos/output/plan_resources.rb', line 132 PlanResources::Metadata = Output.new_class(:condition_string, :matched_scope, :matched_scopes) do # @!attribute [r] condition_string # The query condition abstract syntax tree rendered as a human-readable string, to help with debugging. # # @return [String] # @!attribute [r] matched_scope # The policy scope that was used to plan the query. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies # @!attribute [r] matched_scopes # The policy scopes that were used to plan the query for each action. # # @return [Hash{String => String}] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf() return nil if .nil? new( condition_string: .filter_debug, matched_scope: .matched_scope, matched_scopes: .matched_scopes ) end end |