-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
substitution_format_string.proto
116 lines (103 loc) · 4.43 KB
/
substitution_format_string.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
syntax = "proto3";
package envoy.config.core.v3;
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/extension.proto";
import "google/protobuf/struct.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.core.v3";
option java_outer_classname = "SubstitutionFormatStringProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Substitution format string]
// Configuration to use multiple :ref:`command operators <config_access_log_command_operators>`
// to generate a new string in either plain text or JSON format.
// [#next-free-field: 7]
message SubstitutionFormatString {
oneof format {
option (validate.required) = true;
// Specify a format with command operators to form a text string.
// Its details is described in :ref:`format string<config_access_log_format_strings>`.
//
// For example, setting ``text_format`` like below,
//
// .. validated-code-block:: yaml
// :type-name: envoy.config.core.v3.SubstitutionFormatString
//
// text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
//
// generates plain text similar to:
//
// .. code-block:: text
//
// upstream connect error:503:path=/foo
//
// Deprecated in favor of :ref:`text_format_source <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.text_format_source>`. To migrate text format strings, use the :ref:`inline_string <envoy_v3_api_field_config.core.v3.DataSource.inline_string>` field.
string text_format = 1
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
// Specify a format with command operators to form a JSON string.
// Its details is described in :ref:`format dictionary<config_access_log_format_dictionaries>`.
// Values are rendered as strings, numbers, or boolean values as appropriate.
// Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA).
// See the documentation for a specific command operator for details.
//
// .. validated-code-block:: yaml
// :type-name: envoy.config.core.v3.SubstitutionFormatString
//
// json_format:
// status: "%RESPONSE_CODE%"
// message: "%LOCAL_REPLY_BODY%"
//
// The following JSON object would be created:
//
// .. code-block:: json
//
// {
// "status": 500,
// "message": "My error message"
// }
//
google.protobuf.Struct json_format = 2 [(validate.rules).message = {required: true}];
// Specify a format with command operators to form a text string.
// Its details is described in :ref:`format string<config_access_log_format_strings>`.
//
// For example, setting ``text_format`` like below,
//
// .. validated-code-block:: yaml
// :type-name: envoy.config.core.v3.SubstitutionFormatString
//
// text_format_source:
// inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
//
// generates plain text similar to:
//
// .. code-block:: text
//
// upstream connect error:503:path=/foo
//
DataSource text_format_source = 5;
}
// If set to true, when command operators are evaluated to null,
//
// * for ``text_format``, the output of the empty operator is changed from ``-`` to an
// empty string, so that empty values are omitted entirely.
// * for ``json_format`` the keys with null values are omitted in the output structure.
bool omit_empty_values = 3;
// Specify a ``content_type`` field.
// If this field is not set then ``text/plain`` is used for ``text_format`` and
// ``application/json`` is used for ``json_format``.
//
// .. validated-code-block:: yaml
// :type-name: envoy.config.core.v3.SubstitutionFormatString
//
// content_type: "text/html; charset=UTF-8"
//
string content_type = 4
[(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies a collection of Formatter plugins that can be called from the access log configuration.
// See the formatters extensions documentation for details.
// [#extension-category: envoy.formatter]
repeated TypedExtensionConfig formatters = 6;
}