Documentation
¶
Index ¶
- Variables
- type GrpcJsonReverseTranscoder
- func (x *GrpcJsonReverseTranscoder) ClearMaxRequestBodySize()
- func (x *GrpcJsonReverseTranscoder) ClearMaxResponseBodySize()
- func (x *GrpcJsonReverseTranscoder) ClearRequestJsonPrintOptions()
- func (x *GrpcJsonReverseTranscoder) GetApiVersionHeader() string
- func (x *GrpcJsonReverseTranscoder) GetDescriptorBinary() []byte
- func (x *GrpcJsonReverseTranscoder) GetDescriptorPath() string
- func (x *GrpcJsonReverseTranscoder) GetMaxRequestBodySize() *wrapperspb.UInt32Value
- func (x *GrpcJsonReverseTranscoder) GetMaxResponseBodySize() *wrapperspb.UInt32Value
- func (x *GrpcJsonReverseTranscoder) GetRequestJsonPrintOptions() *GrpcJsonReverseTranscoder_PrintOptions
- func (x *GrpcJsonReverseTranscoder) HasMaxRequestBodySize() bool
- func (x *GrpcJsonReverseTranscoder) HasMaxResponseBodySize() bool
- func (x *GrpcJsonReverseTranscoder) HasRequestJsonPrintOptions() bool
- func (*GrpcJsonReverseTranscoder) ProtoMessage()
- func (x *GrpcJsonReverseTranscoder) ProtoReflect() protoreflect.Message
- func (x *GrpcJsonReverseTranscoder) Reset()
- func (x *GrpcJsonReverseTranscoder) SetApiVersionHeader(v string)
- func (x *GrpcJsonReverseTranscoder) SetDescriptorBinary(v []byte)
- func (x *GrpcJsonReverseTranscoder) SetDescriptorPath(v string)
- func (x *GrpcJsonReverseTranscoder) SetMaxRequestBodySize(v *wrapperspb.UInt32Value)
- func (x *GrpcJsonReverseTranscoder) SetMaxResponseBodySize(v *wrapperspb.UInt32Value)
- func (x *GrpcJsonReverseTranscoder) SetRequestJsonPrintOptions(v *GrpcJsonReverseTranscoder_PrintOptions)
- func (x *GrpcJsonReverseTranscoder) String() string
- type GrpcJsonReverseTranscoder_PrintOptions
- func (x *GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts() bool
- func (x *GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields() bool
- func (x *GrpcJsonReverseTranscoder_PrintOptions) GetUseCanonicalFieldNames() bool
- func (*GrpcJsonReverseTranscoder_PrintOptions) ProtoMessage()
- func (x *GrpcJsonReverseTranscoder_PrintOptions) ProtoReflect() protoreflect.Message
- func (x *GrpcJsonReverseTranscoder_PrintOptions) Reset()
- func (x *GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintEnumsAsInts(v bool)
- func (x *GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintPrimitiveFields(v bool)
- func (x *GrpcJsonReverseTranscoder_PrintOptions) SetUseCanonicalFieldNames(v bool)
- func (x *GrpcJsonReverseTranscoder_PrintOptions) String() string
- type GrpcJsonReverseTranscoder_PrintOptions_builder
- type GrpcJsonReverseTranscoder_builder
Constants ¶
This section is empty.
Variables ¶
View Source
var File_envoy_extensions_filters_http_grpc_json_reverse_transcoder_v3_transcoder_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GrpcJsonReverseTranscoder ¶
type GrpcJsonReverseTranscoder struct {
// Supplies the filename of
// :ref:`the proto descriptor set
// <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
// If set, takes precedence over the “descriptor_binary“ field.
DescriptorPath string `protobuf:"bytes,1,opt,name=descriptor_path,json=descriptorPath,proto3" json:"descriptor_path,omitempty"`
// Supplies the binary content of
// :ref:`the proto descriptor set
// <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
// If “descriptor_path“ is set, this field is not used.
DescriptorBinary []byte `protobuf:"bytes,2,opt,name=descriptor_binary,json=descriptorBinary,proto3" json:"descriptor_binary,omitempty"`
// The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will
// provoke a “gRPC status: ResourceExhausted“ response.
//
// Large values may cause envoy to use a lot of memory if there are many
// concurrent requests.
//
// If unset, the current stream buffer size is used.
MaxRequestBodySize *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_request_body_size,json=maxRequestBodySize,proto3" json:"max_request_body_size,omitempty"`
// The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will
// provoke a “gRPC status: Internal“ response.
//
// Large values may cause envoy to use a lot of memory if there are many
// concurrent requests.
//
// If unset, the current stream buffer size is used.
MaxResponseBodySize *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_response_body_size,json=maxResponseBodySize,proto3" json:"max_response_body_size,omitempty"`
// The name of the header field that has the API version of the request.
ApiVersionHeader string `protobuf:"bytes,5,opt,name=api_version_header,json=apiVersionHeader,proto3" json:"api_version_header,omitempty"`
// Control options for upstream request JSON. These options are passed directly to
// `JsonPrintOptions <https://developers.google.com/protocol-buffers/docs/reference/cpp/
// google.protobuf.util.json_util#JsonPrintOptions>`_.
RequestJsonPrintOptions *GrpcJsonReverseTranscoder_PrintOptions `` /* 134-byte string literal not displayed */
// contains filtered or unexported fields
}
[#next-free-field: 7] “GrpcJsonReverseTranscoder“ is the filter configuration for the gRPC JSON reverse transcoder. The reverse transcoder acts as a bridge between a gRPC client and an HTTP/JSON server, converting the gRPC request into HTTP/JSON for the HTTP backend and the HTTP/JSON response back to gRPC for the gRPC client. This effectively reverses the behavior of the :ref:`grpc_json_transcoder filter <config_http_filters_grpc_json_transcoder>`, allowing a gRPC client to communicate with an HTTP/JSON server.
func (*GrpcJsonReverseTranscoder) ClearMaxRequestBodySize ¶
func (x *GrpcJsonReverseTranscoder) ClearMaxRequestBodySize()
func (*GrpcJsonReverseTranscoder) ClearMaxResponseBodySize ¶
func (x *GrpcJsonReverseTranscoder) ClearMaxResponseBodySize()
func (*GrpcJsonReverseTranscoder) ClearRequestJsonPrintOptions ¶
func (x *GrpcJsonReverseTranscoder) ClearRequestJsonPrintOptions()
func (*GrpcJsonReverseTranscoder) GetApiVersionHeader ¶
func (x *GrpcJsonReverseTranscoder) GetApiVersionHeader() string
func (*GrpcJsonReverseTranscoder) GetDescriptorBinary ¶
func (x *GrpcJsonReverseTranscoder) GetDescriptorBinary() []byte
func (*GrpcJsonReverseTranscoder) GetDescriptorPath ¶
func (x *GrpcJsonReverseTranscoder) GetDescriptorPath() string
func (*GrpcJsonReverseTranscoder) GetMaxRequestBodySize ¶
func (x *GrpcJsonReverseTranscoder) GetMaxRequestBodySize() *wrapperspb.UInt32Value
func (*GrpcJsonReverseTranscoder) GetMaxResponseBodySize ¶
func (x *GrpcJsonReverseTranscoder) GetMaxResponseBodySize() *wrapperspb.UInt32Value
func (*GrpcJsonReverseTranscoder) GetRequestJsonPrintOptions ¶
func (x *GrpcJsonReverseTranscoder) GetRequestJsonPrintOptions() *GrpcJsonReverseTranscoder_PrintOptions
func (*GrpcJsonReverseTranscoder) HasMaxRequestBodySize ¶
func (x *GrpcJsonReverseTranscoder) HasMaxRequestBodySize() bool
func (*GrpcJsonReverseTranscoder) HasMaxResponseBodySize ¶
func (x *GrpcJsonReverseTranscoder) HasMaxResponseBodySize() bool
func (*GrpcJsonReverseTranscoder) HasRequestJsonPrintOptions ¶
func (x *GrpcJsonReverseTranscoder) HasRequestJsonPrintOptions() bool
func (*GrpcJsonReverseTranscoder) ProtoMessage ¶
func (*GrpcJsonReverseTranscoder) ProtoMessage()
func (*GrpcJsonReverseTranscoder) ProtoReflect ¶
func (x *GrpcJsonReverseTranscoder) ProtoReflect() protoreflect.Message
func (*GrpcJsonReverseTranscoder) Reset ¶
func (x *GrpcJsonReverseTranscoder) Reset()
func (*GrpcJsonReverseTranscoder) SetApiVersionHeader ¶
func (x *GrpcJsonReverseTranscoder) SetApiVersionHeader(v string)
func (*GrpcJsonReverseTranscoder) SetDescriptorBinary ¶
func (x *GrpcJsonReverseTranscoder) SetDescriptorBinary(v []byte)
func (*GrpcJsonReverseTranscoder) SetDescriptorPath ¶
func (x *GrpcJsonReverseTranscoder) SetDescriptorPath(v string)
func (*GrpcJsonReverseTranscoder) SetMaxRequestBodySize ¶
func (x *GrpcJsonReverseTranscoder) SetMaxRequestBodySize(v *wrapperspb.UInt32Value)
func (*GrpcJsonReverseTranscoder) SetMaxResponseBodySize ¶
func (x *GrpcJsonReverseTranscoder) SetMaxResponseBodySize(v *wrapperspb.UInt32Value)
func (*GrpcJsonReverseTranscoder) SetRequestJsonPrintOptions ¶
func (x *GrpcJsonReverseTranscoder) SetRequestJsonPrintOptions(v *GrpcJsonReverseTranscoder_PrintOptions)
func (*GrpcJsonReverseTranscoder) String ¶
func (x *GrpcJsonReverseTranscoder) String() string
type GrpcJsonReverseTranscoder_PrintOptions ¶
type GrpcJsonReverseTranscoder_PrintOptions struct {
// Whether to always print primitive fields. By default primitive
// fields with default values will be omitted in JSON output. For
// example, an int32 field set to 0 will be omitted. Setting this flag to
// true will override the default behavior and print primitive fields
// regardless of their values. Defaults to false.
AlwaysPrintPrimitiveFields bool `` /* 144-byte string literal not displayed */
// Whether to always print enums as ints. By default they are rendered
// as strings. Defaults to false.
AlwaysPrintEnumsAsInts bool `` /* 134-byte string literal not displayed */
// Whether to convert the proto field names to “json_name“ annotation value, or lower camel case,
// in absence of “json_name“. By default the field names will be preserved after conversion.
// Setting this flag will convert the field names to their canonical form. Defaults to false.
//
// Example:
//
// .. code-block:: proto
//
// message Author {
// int64 id = 1;
// enum Gender {
// UNKNOWN = 0;
// MALE = 1;
// FEMALE = 2;
// };
// Gender gender = 2;
// string first_name = 3;
// string last_name = 4 [json_name = "lname"];
// }
//
// The above proto message after being transcoded to JSON with
// “use_canonical_field_names“ set to “false“ will have the
// field names same as in the proto message, as follows:
//
// .. code-block:: json
//
// {
// "id": "12345",
// "gender": "MALE",
// "first_name": "John",
// "last_name": "Doe"
// }
//
// and with the “use_canonical_field_names“ set to “true“, the
// transcoded JSON will have “first_name“ converted to camelCase
// and “last_name“ converted to its “json_name“ annotation value,
// as follows:
//
// .. code-block:: json
//
// {
// "id": "12345",
// "gender": "MALE",
// "firstName": "John",
// "lname": "Doe"
// }
UseCanonicalFieldNames bool `` /* 132-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts() bool
func (*GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields() bool
func (*GrpcJsonReverseTranscoder_PrintOptions) GetUseCanonicalFieldNames ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) GetUseCanonicalFieldNames() bool
func (*GrpcJsonReverseTranscoder_PrintOptions) ProtoMessage ¶
func (*GrpcJsonReverseTranscoder_PrintOptions) ProtoMessage()
func (*GrpcJsonReverseTranscoder_PrintOptions) ProtoReflect ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) ProtoReflect() protoreflect.Message
func (*GrpcJsonReverseTranscoder_PrintOptions) Reset ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) Reset()
func (*GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintEnumsAsInts ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintEnumsAsInts(v bool)
func (*GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintPrimitiveFields ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) SetAlwaysPrintPrimitiveFields(v bool)
func (*GrpcJsonReverseTranscoder_PrintOptions) SetUseCanonicalFieldNames ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) SetUseCanonicalFieldNames(v bool)
func (*GrpcJsonReverseTranscoder_PrintOptions) String ¶
func (x *GrpcJsonReverseTranscoder_PrintOptions) String() string
type GrpcJsonReverseTranscoder_PrintOptions_builder ¶
type GrpcJsonReverseTranscoder_PrintOptions_builder struct {
// Whether to always print primitive fields. By default primitive
// fields with default values will be omitted in JSON output. For
// example, an int32 field set to 0 will be omitted. Setting this flag to
// true will override the default behavior and print primitive fields
// regardless of their values. Defaults to false.
AlwaysPrintPrimitiveFields bool
// Whether to always print enums as ints. By default they are rendered
// as strings. Defaults to false.
AlwaysPrintEnumsAsInts bool
// Whether to convert the proto field names to “json_name“ annotation value, or lower camel case,
// in absence of “json_name“. By default the field names will be preserved after conversion.
// Setting this flag will convert the field names to their canonical form. Defaults to false.
//
// Example:
//
// .. code-block:: proto
//
// message Author {
// int64 id = 1;
// enum Gender {
// UNKNOWN = 0;
// MALE = 1;
// FEMALE = 2;
// };
// Gender gender = 2;
// string first_name = 3;
// string last_name = 4 [json_name = "lname"];
// }
//
// The above proto message after being transcoded to JSON with
// “use_canonical_field_names“ set to “false“ will have the
// field names same as in the proto message, as follows:
//
// .. code-block:: json
//
// {
// "id": "12345",
// "gender": "MALE",
// "first_name": "John",
// "last_name": "Doe"
// }
//
// and with the “use_canonical_field_names“ set to “true“, the
// transcoded JSON will have “first_name“ converted to camelCase
// and “last_name“ converted to its “json_name“ annotation value,
// as follows:
//
// .. code-block:: json
//
// {
// "id": "12345",
// "gender": "MALE",
// "firstName": "John",
// "lname": "Doe"
// }
UseCanonicalFieldNames bool
// contains filtered or unexported fields
}
func (GrpcJsonReverseTranscoder_PrintOptions_builder) Build ¶
type GrpcJsonReverseTranscoder_builder ¶
type GrpcJsonReverseTranscoder_builder struct {
// Supplies the filename of
// :ref:`the proto descriptor set
// <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
// If set, takes precedence over the “descriptor_binary“ field.
DescriptorPath string
// Supplies the binary content of
// :ref:`the proto descriptor set
// <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
// If “descriptor_path“ is set, this field is not used.
DescriptorBinary []byte
// The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will
// provoke a “gRPC status: ResourceExhausted“ response.
//
// Large values may cause envoy to use a lot of memory if there are many
// concurrent requests.
//
// If unset, the current stream buffer size is used.
MaxRequestBodySize *wrapperspb.UInt32Value
// The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will
// provoke a “gRPC status: Internal“ response.
//
// Large values may cause envoy to use a lot of memory if there are many
// concurrent requests.
//
// If unset, the current stream buffer size is used.
MaxResponseBodySize *wrapperspb.UInt32Value
// The name of the header field that has the API version of the request.
ApiVersionHeader string
// Control options for upstream request JSON. These options are passed directly to
// `JsonPrintOptions <https://developers.google.com/protocol-buffers/docs/reference/cpp/
// google.protobuf.util.json_util#JsonPrintOptions>`_.
RequestJsonPrintOptions *GrpcJsonReverseTranscoder_PrintOptions
// contains filtered or unexported fields
}
func (GrpcJsonReverseTranscoder_builder) Build ¶
func (b0 GrpcJsonReverseTranscoder_builder) Build() *GrpcJsonReverseTranscoder
Source Files
¶
- transcoder.pb.go
Click to show internal directories.
Click to hide internal directories.