• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 15920880335

26 Jun 2025 03:30PM UTC coverage: 61.923% (-3.7%) from 65.652%
15920880335

push

github

web-flow
Merge pull request #15669 from miodvallat/serial_keyer

Increase zone serial number after zone key operations

38311 of 91850 branches covered (41.71%)

Branch coverage included in aggregate %.

27 of 29 new or added lines in 1 file covered. (93.1%)

6308 existing lines in 78 files now uncovered.

120482 of 164587 relevant lines covered (73.2%)

5965233.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

24.49
/pdns/recursordist/rec-rust-lib/cxxsettings-private.hh
1
/*
2
 * This file is part of PowerDNS or dnsdist.
3
 * Copyright -- PowerDNS.COM B.V. and its contributors
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of version 2 of the GNU General Public License as
7
 * published by the Free Software Foundation.
8
 *
9
 * In addition, for the avoidance of any doubt, permission is granted to
10
 * link this program with OpenSSL and to (re)distribute the binaries
11
 * produced as the result of such linking.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
 */
22
#pragma once
23

24
#include <cinttypes>
25
#include <sstream>
26
#include <variant>
27
#include <vector>
28

29
#include "rust/lib.rs.h"
30
#include "misc.hh"
31

32
using pdns::rust::settings::rec::AuthZone;
33
using pdns::rust::settings::rec::ForwardZone;
34
using pdns::rust::settings::rec::Recursorsettings;
35

36
namespace pdns::settings::rec
37
{
38
::rust::Vec<::rust::String> getStrings(const std::string& name);
39
::rust::Vec<ForwardZone> getForwardZones(const std::string& name);
40
::rust::Vec<AuthZone> getAuthZones(const std::string& name);
41

42
inline std::string to_arg(bool arg)
UNCOV
43
{
×
UNCOV
44
  return arg ? "yes" : "no";
×
UNCOV
45
}
×
46

47
inline std::string to_arg(uint64_t arg)
UNCOV
48
{
×
UNCOV
49
  return std::to_string(arg);
×
UNCOV
50
}
×
51

52
inline std::string to_arg(double arg)
UNCOV
53
{
×
UNCOV
54
  return std::to_string(arg);
×
UNCOV
55
}
×
56

57
inline std::string to_arg(const ::rust::String& str)
UNCOV
58
{
×
UNCOV
59
  return std::string(str);
×
UNCOV
60
}
×
61

62
std::string to_arg(const AuthZone& authzone);
63
std::string to_arg(const ForwardZone& forwardzone);
64

65
template <typename T>
66
std::string to_arg(const ::rust::Vec<T>& vec)
UNCOV
67
{
×
UNCOV
68
  std::ostringstream str;
×
UNCOV
69
  for (auto iter = vec.begin(); iter != vec.end(); ++iter) {
×
UNCOV
70
    if (iter != vec.begin()) {
×
UNCOV
71
      str << ',';
×
UNCOV
72
    }
×
UNCOV
73
    str << to_arg(*iter);
×
UNCOV
74
  }
×
UNCOV
75
  return str.str();
×
UNCOV
76
}
×
77

78
inline void to_yaml(bool& field, const std::string& val)
79
{
86✔
80
  field = val != "no" && val != "off";
86!
81
}
86✔
82

83
inline void to_yaml(::rust::String& field, const std::string& val)
84
{
98✔
85
  field = val;
98✔
86
}
98✔
87

88
inline void to_yaml(::rust::Vec<::rust::String>& field, const std::string& val)
89
{
52✔
90
  stringtok(field, val, ", ;");
52✔
91
}
52✔
92

93
void to_yaml(uint64_t& field, const std::string& val);
94
void to_yaml(double& field, const std::string& val);
95
void to_yaml(::rust::Vec<AuthZone>& field, const std::string& val);
96
void to_yaml(::rust::Vec<ForwardZone>& field, const std::string& val, bool recurse = false);
97
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc