载入中...
搜索中...
未找到
ConditionKeys.h 文件参考

Canonical Compare key prefixes and PolicyCall names for thin conditions. 更多...

#include "common/Export.h"
#include "common/Condition.h"
#include <optional>
#include <string>
#include <string_view>

浏览源代码.

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::condition
 

函数

std::string eve::condition::tagKey (std::string_view tag)
 Build a tag:<name> Compare key.
 
std::string eve::condition::attrKey (std::string_view name)
 Build an attr:<name> Compare key.
 
std::string eve::condition::resourceKey (std::string_view name)
 Build a resource:<name> Compare key.
 
std::string eve::condition::stateKey (std::string_view name)
 Build a state:<name> Compare key.
 
std::string eve::condition::authorityKey (std::string_view scope)
 Build an authority:<scope> dependency/watch key.
 
std::optional< std::string_view > eve::condition::stripPrefix (std::string_view key, std::string_view prefix)
 Strip a known domain prefix from a key.
 
Condition eve::condition::tagPresent (std::string tag)
 Compare that a tag key is present (tag:<name> == true).
 
Condition eve::condition::attributeExists (std::string name)
 Compare that an attribute key exists (attr:<name> Exists).
 
Condition eve::condition::resourceExists (std::string name)
 Compare that a resource key exists (resource:<name> Exists).
 
Condition eve::condition::stateEquals (std::string name, Value expected)
 Compare that a state key equals an expected value.
 
Condition eve::condition::authorityAllow (std::string scope)
 PolicyCall for read-only authority (authority.allow).
 
std::optional< std::string > eve::condition::authorityAllowScope (const Value &arguments)
 Extract the scope string from an authority.allow argument object.
 
template<class AuthorityQuery >
std::optional< ConditionResult > eve::condition::resolveAuthorityAllow (std::string_view name, const Value &arguments, AuthorityQuery &&authorityQuery)
 Resolve the built-in authority.allow policy when name matches.
 

变量

constexpr std::string_view eve::condition::kTagPrefix = "tag:"
 Prefix for tag membership booleans (tag:<name>).
 
constexpr std::string_view eve::condition::kAttrPrefix = "attr:"
 Prefix for attribute values (attr:<name>).
 
constexpr std::string_view eve::condition::kResourcePrefix = "resource:"
 Prefix for resource values (resource:<name>).
 
constexpr std::string_view eve::condition::kStatePrefix = "state:"
 Prefix for state values (state:<name>).
 
constexpr std::string_view eve::condition::kAuthorityPrefix = "authority:"
 Prefix for authority scopes used as watch/dependency keys.
 
constexpr std::string_view eve::condition::kPolicyPrefix = "policy:"
 Prefix for policy watch keys (policy:<name>).
 
constexpr std::string_view eve::condition::kAuthorityAllowPolicy = "authority.allow"
 PolicyCall name for read-only authority checks.
 

详细描述

Canonical Compare key prefixes and PolicyCall names for thin conditions.

Domain leaves (tag / attribute / resource / state / authority) are conventions over Compare keys and PolicyCall names, not ConditionKind variants.

在文件 ConditionKeys.h 中定义.