userver: userver/server/auth/user_id.hpp File Reference
Loading...
Searching...
No Matches
user_id.hpp File Reference

Detailed Description

Strongly typed user identifier (uid)

Definition in file user_id.hpp.

Go to the source code of this file.

#include <cstdint>
#include <iosfwd>
#include <string>
#include <vector>
#include <userver/formats/parse/to.hpp>
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  logging
 Logging levels, helpers, default logger, and related utilities.
 

Typedefs

using server::auth::UserIds = std::vector<UserId>
 

Enumerations

enum class  server::auth::UserId : std::uint64_t
 Strongly typed user identifier (uid) More...
 

Functions

template<class Value>
UserId server::auth::Parse (const Value &v, formats::parse::To< UserId >)
 
std::uint64_t server::auth::ToUInt64 (UserId v) noexcept
 
std::string server::auth::ToString (UserId v)
 
template<class Char>
std::basic_ostream< Char > & server::auth::operator<< (std::basic_ostream< Char > &os, UserId v)
 
logging::LogHelperserver::auth::operator<< (logging::LogHelper &os, UserId v)
 

Typedef Documentation

◆ UserIds

using server::auth::UserIds = std::vector<UserId>

Definition at line 28 of file user_id.hpp.

Enumeration Type Documentation

◆ UserId

enum class server::auth::UserId : std::uint64_t
strong

Strongly typed user identifier (uid)

Type that represents a yandex uid and has all the comparison and hashing operators. It is not implicitly convertible to/from integers and provides better type safety.

Definition at line 26 of file user_id.hpp.

Function Documentation

◆ operator<<()

template<class Char>
std::basic_ostream< Char > & server::auth::operator<< ( std::basic_ostream< Char > & os,
UserId v )

Definition at line 37 of file user_id.hpp.

◆ Parse()

template<class Value>
UserId server::auth::Parse ( const Value & v,
formats::parse::To< UserId >  )

Definition at line 31 of file user_id.hpp.

◆ ToUInt64()

std::uint64_t server::auth::ToUInt64 ( UserId v)
inlinenoexcept

Definition at line 35 of file user_id.hpp.