LCOV - code coverage report
Current view: top level - source/extensions/path/match/uri_template - uri_template_match.cc (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 1 5 20.0 %
Date: 2024-01-05 06:35:25 Functions: 1 2 50.0 %

          Line data    Source code
       1             : #include "source/extensions/path/match/uri_template/uri_template_match.h"
       2             : 
       3             : #include <map>
       4             : #include <string>
       5             : #include <utility>
       6             : #include <vector>
       7             : 
       8             : #include "source/common/http/path_utility.h"
       9             : 
      10             : #include "absl/status/statusor.h"
      11             : #include "absl/strings/str_split.h"
      12             : #include "absl/strings/string_view.h"
      13             : #include "re2/re2.h"
      14             : 
      15             : namespace Envoy {
      16             : namespace Extensions {
      17             : namespace UriTemplate {
      18             : namespace Match {
      19             : 
      20           0 : bool UriTemplateMatcher::match(absl::string_view path) const {
      21           0 :   RE2 matching_pattern_regex = RE2(convertPathPatternSyntaxToRegex(path_template_).value());
      22           0 :   return RE2::FullMatch(Http::PathUtil::removeQueryAndFragment(path), matching_pattern_regex);
      23           0 : }
      24             : 
      25         104 : absl::string_view UriTemplateMatcher::uriTemplate() const { return path_template_; }
      26             : 
      27             : } // namespace Match
      28             : } // namespace UriTemplate
      29             : } // namespace Extensions
      30             : } // namespace Envoy

Generated by: LCOV version 1.15