userver: protobuf Namespace Reference
Loading...
Searching...
No Matches
protobuf Namespace Reference

Detailed Description

Top namespace for the userver protobuf library.

Namespaces

namespace  json
 Top namespace for the protobuf JSON utilities.
 

Classes

class  Error
 Library base exception type. More...
 

Functions

bool IsValidDuration (std::int64_t seconds, std::int32_t nanos) noexcept
 Returns true if combination of seconds and nanos represent a valid google.protobuf.Duration.
 
bool IsValidTimestamp (std::int64_t seconds, std::int32_t nanos) noexcept
 Returns true if combination of seconds and nanos represent a valid google.protobuf.Timestamp.
 

Variables

constexpr std::int64_t kMinDurationSeconds = -315'576'000'000LL
 
constexpr std::int64_t kMaxDurationSeconds = 315'576'000'000LL
 
constexpr std::int32_t kMinDurationNanos = -999'999'999
 
constexpr std::int32_t kMaxDurationNanos = 999'999'999
 
constexpr std::int64_t kMinTimestampSeconds = -62'135'596'800LL
 
constexpr std::int64_t kMaxTimestampSeconds = 253'402'300'799LL
 
constexpr std::int32_t kMinTimestampNanos = 0
 
constexpr std::int32_t kMaxTimestampNanos = 999'999'999
 

Function Documentation

◆ IsValidDuration()

bool protobuf::IsValidDuration ( const std::int64_t  seconds,
const std::int32_t  nanos 
)
noexcept

Returns true if combination of seconds and nanos represent a valid google.protobuf.Duration.

Definition at line 7 of file datetime.cpp.

◆ IsValidTimestamp()

bool protobuf::IsValidTimestamp ( const std::int64_t  seconds,
const std::int32_t  nanos 
)
noexcept

Returns true if combination of seconds and nanos represent a valid google.protobuf.Timestamp.

Definition at line 23 of file datetime.cpp.

Variable Documentation

◆ kMaxDurationNanos

constexpr std::int32_t protobuf::kMaxDurationNanos = 999'999'999
inlineconstexpr

Definition at line 15 of file datetime.hpp.

◆ kMaxDurationSeconds

constexpr std::int64_t protobuf::kMaxDurationSeconds = 315'576'000'000LL
inlineconstexpr

Definition at line 13 of file datetime.hpp.

◆ kMaxTimestampNanos

constexpr std::int32_t protobuf::kMaxTimestampNanos = 999'999'999
inlineconstexpr

Definition at line 19 of file datetime.hpp.

◆ kMaxTimestampSeconds

constexpr std::int64_t protobuf::kMaxTimestampSeconds = 253'402'300'799LL
inlineconstexpr

Definition at line 17 of file datetime.hpp.

◆ kMinDurationNanos

constexpr std::int32_t protobuf::kMinDurationNanos = -999'999'999
inlineconstexpr

Definition at line 14 of file datetime.hpp.

◆ kMinDurationSeconds

constexpr std::int64_t protobuf::kMinDurationSeconds = -315'576'000'000LL
inlineconstexpr

Definition at line 12 of file datetime.hpp.

◆ kMinTimestampNanos

constexpr std::int32_t protobuf::kMinTimestampNanos = 0
inlineconstexpr

Definition at line 18 of file datetime.hpp.

◆ kMinTimestampSeconds

constexpr std::int64_t protobuf::kMinTimestampSeconds = -62'135'596'800LL
inlineconstexpr

Definition at line 16 of file datetime.hpp.