Definition at line 12 of file handler_auth_config.hpp.
Inheritance diagram for server::handlers::auth::HandlerAuthConfig:Public Types | |
| enum class | Mode { kSecure , kEnvAllowed , kEnvAndFileAllowed } |
| using | const_iterator = Iterator<IterTraits> |
| using | Exception = yaml_config::Exception |
| using | ParseException = yaml_config::ParseException |
Public Member Functions | |
| HandlerAuthConfig (yaml_config::YamlConfig value) | |
| const std::vector< std::string > & | GetTypes () const |
| YamlConfig | operator[] (std::string_view key) const |
| Access member by key for read. | |
| YamlConfig | operator[] (size_t index) const |
| Access member by index for read. | |
| std::size_t | GetSize () const |
| Returns array size or object members count. | |
| bool | IsMissing () const noexcept |
Returns true if *this holds nothing. When IsMissing() returns true any attempt to get the actual value or iterate over *this will throw MemberMissingException. | |
| bool | IsNull () const noexcept |
| Returns true if *this holds 'null'. | |
| bool | IsBool () const noexcept |
| Returns true if *this is convertible to bool. | |
| bool | IsInt () const noexcept |
| Returns true if *this is convertible to int. | |
| bool | IsInt64 () const noexcept |
| Returns true if *this is convertible to int64_t. | |
| bool | IsUInt64 () const noexcept |
| Returns true if *this is convertible to uint64_t. | |
| bool | IsDouble () const noexcept |
| Returns true if *this is convertible to double. | |
| bool | IsString () const noexcept |
| Returns true if *this is convertible to std::string. | |
| bool | IsArray () const noexcept |
| Returns true if *this is an array (Type::kArray). | |
| bool | IsObject () const noexcept |
| Returns true if *this is a map (Type::kObject). | |
| void | CheckNotMissing () const |
| void | CheckArray () const |
| void | CheckArrayOrNull () const |
| void | CheckObjectOrNull () const |
| void | CheckObject () const |
| void | CheckString () const |
| void | CheckObjectOrArrayOrNull () const |
| template<typename T> | |
| auto | As () const |
| Returns value of *this converted to T. | |
| template<typename T, typename First, typename... Rest> | |
| auto | As (First &&default_arg, Rest &&... more_default_args) const |
| Returns value of *this converted to T or T(args) if this->IsMissing(). | |
| template<typename T> | |
| auto | As (DefaultConstructed) const |
| Returns value of *this converted to T or T() if this->IsMissing(). | |
| bool | HasMember (std::string_view key) const |
Returns true if *this holds a key. | |
| std::string | GetPath () const |
| Returns full path to this value. | |
| const_iterator | begin () const |
| Returns an iterator to the beginning of the held array or map. | |
| const_iterator | end () const |
| Returns an iterator to the end of the held array or map. | |
| formats::yaml::Value | GetRawYamlWithoutConfigVars () const |
| Get the plain Yaml without substitutions. It may contain raw references. | |
|
inherited |
Definition at line 88 of file yaml_config.hpp.
|
inherited |
Definition at line 89 of file yaml_config.hpp.
|
inherited |
Definition at line 90 of file yaml_config.hpp.
|
stronginherited |
| Enumerator | |
|---|---|
| kEnvAllowed | < secure mode, without reading environment variables or files |
| kEnvAndFileAllowed | < allows reading of environment variables |
Definition at line 81 of file yaml_config.hpp.
|
inherited |
Returns value of *this converted to T.
| Anything | derived from std::exception. |
Definition at line 217 of file yaml_config.hpp.
|
inherited |
Returns value of *this converted to T or T() if this->IsMissing().
| Anything | derived from std::exception. |
value.As<T>({}) Definition at line 252 of file yaml_config.hpp.
|
inherited |
Returns value of *this converted to T or T(args) if this->IsMissing().
| Anything | derived from std::exception. |
Definition at line 242 of file yaml_config.hpp.
|
inherited |
Returns an iterator to the beginning of the held array or map.
| TypeMismatchException | is the value of *this is not a map, array or Null. |
|
inherited |
| MemberMissingException | if *this is not an array. |
|
inherited |
| MemberMissingException | if *this is not an array or Null. |
|
inherited |
| MemberMissingException | if this->IsMissing(). |
|
inherited |
| TypeMismatchException | if *this is not a map. |
|
inherited |
| TypeMismatchException | if *this is not a map, array or Null. |
|
inherited |
| TypeMismatchException | if *this is not a map or Null. |
|
inherited |
| TypeMismatchException | if *this is not convertible to std::string. |
|
inherited |
Returns an iterator to the end of the held array or map.
| TypeMismatchException | is the value of *this is not a map, array or Null. |
|
inherited |
Get the plain Yaml without substitutions. It may contain raw references.
YamlConfig as a formats value, or use .As<formats::json::Value>() to get the correct treatment for $vars, #fallback, #env and #file.
|
inherited |
Returns array size or object members count.
| TypeMismatchException | if not array or object value. |
|
inline |
Definition at line 16 of file handler_auth_config.hpp.
|
inherited |
Returns true if *this holds a key.
| Nothing. |
|
inherited |
Access member by index for read.
| TypeMismatchException | if value is not missing and is not array. |
|
inherited |
Access member by key for read.
| TypeMismatchException | if value is not missing and is not object. |