1' Licensed under the Apache License, Version 2.0 (the "License");
2' you may not use this file except in compliance with the License.
3' You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4' Unless required by  applicable law or agreed to in writing, software distributed under the License is distributed
5' on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6' See the License for the specific language governing permissions and limitations under the License.
7
8@startuml
9
10hide empty members
11
12class UrlRewrite << RefCountObj >> {
13  forward_mappings
14  reverse_mappings
15  permanent_redirects
16  temporary_redirects
17  forward_mappings_with_recv_port
18}
19
20UrlRewrite --* MappingStore
21
22class MappingStore {
23  Rule collection
24}
25
26MappingStore --* "1" RegexMappingList
27MappingStore --* "1" URLTable
28
29class URLTable <<std::unordered_map>> {
30  key: FQDN
31  value: UrlMappingPathIndex
32}
33
34URLTable --* "*" UrlMappingPathIndex
35
36class acl_filter_rule {
37  Access check
38  ============
39  string name
40  IpMap src_ip
41  IpMap proxy_ip
42  std::vector<RemapArg> argv
43}
44
45acl_filter_rule --* "next" acl_filter_rule
46' acl_filter_rule --* "*" RemapArg
47' acl_filter_rule --* "2" IpMap
48
49class url_mapping {
50  rewrite rule
51  ================
52  URL from
53  URL to
54}
55note right: Mapping type is determined by\nwhich MappingStore owns\nthis mapping.
56
57url_mapping --* "1" acl_filter_rule
58note bottom: Local rule and copies of defined filters
59
60url_mapping --* "1" "std::vector<RemapPluginInfo*>"
61url_mapping --* "1" "std::vector<void*>"
62note bottom: "Plugin instance data"
63url_mapping --* "1" referrer_info
64url_mapping --* "1" redirect_tag_str
65url_mapping --* "2" URL
66
67"std::vector<RemapPluginInfo*>" --o "*" RemapPluginInfo
68
69redirect_tag_str --* "next" redirect_tag_str
70note bottom: Redirect URL format elements
71
72class referrer_info {
73  Host rewrite Referer data
74}
75
76referrer_info --* "next" referrer_info
77
78class UrlMappingPathIndex {
79}
80
81class UrlMappingTrie << Trie >> {
82  key: path
83  value: url_mapping
84}
85
86class UrlMappingGroup << std::map >> {
87  key: { scheme, port }
88  value: UrlMappingTrie
89}
90
91UrlMappingPathIndex --* "1" UrlMappingGroup
92UrlMappingGroup --* "*" UrlMappingTrie
93UrlMappingTrie --* "*" url_mapping
94
95RegexMappingList --* "*" url_mapping
96
97class RegexMappingList << Queue >> {
98}
99
100@enduml
101