v2

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTranscoder = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTranscoder   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type GrpcJsonTranscoder

type GrpcJsonTranscoder struct {
	// Types that are valid to be assigned to DescriptorSet:
	//	*GrpcJsonTranscoder_ProtoDescriptor
	//	*GrpcJsonTranscoder_ProtoDescriptorBin
	DescriptorSet isGrpcJsonTranscoder_DescriptorSet `protobuf_oneof:"descriptor_set"`
	// A list of strings that
	// supplies the fully qualified service names (i.e. "package_name.service_name") that
	// the transcoder will translate. If the service name doesn't exist in “proto_descriptor“,
	// Envoy will fail at startup. The “proto_descriptor“ may contain more services than
	// the service names specified here, but they won't be translated.
	Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"`
	// Control options for response JSON. These options are passed directly to
	// `JsonPrintOptions <https://developers.google.com/protocol-buffers/docs/reference/cpp/
	// google.protobuf.util.json_util#JsonPrintOptions>`_.
	PrintOptions *GrpcJsonTranscoder_PrintOptions `protobuf:"bytes,3,opt,name=print_options,json=printOptions,proto3" json:"print_options,omitempty"`
	// Whether to keep the incoming request route after the outgoing headers have been transformed to
	// the match the upstream gRPC service. Note: This means that routes for gRPC services that are
	// not transcoded cannot be used in combination with *match_incoming_request_route*.
	MatchIncomingRequestRoute bool `` /* 141-byte string literal not displayed */
	// A list of query parameters to be ignored for transcoding method mapping.
	// By default, the transcoder filter will not transcode a request if there are any
	// unknown/invalid query parameters.
	//
	// Example :
	//
	// .. code-block:: proto
	//
	//     service Bookstore {
	//       rpc GetShelf(GetShelfRequest) returns (Shelf) {
	//         option (google.api.http) = {
	//           get: "/shelves/{shelf}"
	//         };
	//       }
	//     }
	//
	//     message GetShelfRequest {
	//       int64 shelf = 1;
	//     }
	//
	//     message Shelf {}
	//
	// The request “/shelves/100?foo=bar“ will not be mapped to “GetShelf“` because variable
	// binding for “foo“ is not defined. Adding “foo“ to “ignored_query_parameters“ will allow
	// the same request to be mapped to “GetShelf“.
	IgnoredQueryParameters []string `` /* 129-byte string literal not displayed */
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

func (*GrpcJsonTranscoder) Descriptor

func (*GrpcJsonTranscoder) Descriptor() ([]byte, []int)

func (*GrpcJsonTranscoder) GetDescriptorSet

func (m *GrpcJsonTranscoder) GetDescriptorSet() isGrpcJsonTranscoder_DescriptorSet

func (*GrpcJsonTranscoder) GetIgnoredQueryParameters added in v0.6.6

func (m *GrpcJsonTranscoder) GetIgnoredQueryParameters() []string

func (*GrpcJsonTranscoder) GetMatchIncomingRequestRoute

func (m *GrpcJsonTranscoder) GetMatchIncomingRequestRoute() bool

func (*GrpcJsonTranscoder) GetPrintOptions

func (*GrpcJsonTranscoder) GetProtoDescriptor

func (m *GrpcJsonTranscoder) GetProtoDescriptor() string

func (*GrpcJsonTranscoder) GetProtoDescriptorBin

func (m *GrpcJsonTranscoder) GetProtoDescriptorBin() []byte

func (*GrpcJsonTranscoder) GetServices

func (m *GrpcJsonTranscoder) GetServices() []string

func (*GrpcJsonTranscoder) Marshal

func (m *GrpcJsonTranscoder) Marshal() (dAtA []byte, err error)

func (*GrpcJsonTranscoder) MarshalTo

func (m *GrpcJsonTranscoder) MarshalTo(dAtA []byte) (int, error)

func (*GrpcJsonTranscoder) ProtoMessage

func (*GrpcJsonTranscoder) ProtoMessage()

func (*GrpcJsonTranscoder) Reset

func (m *GrpcJsonTranscoder) Reset()

func (*GrpcJsonTranscoder) Size

func (m *GrpcJsonTranscoder) Size() (n int)

func (*GrpcJsonTranscoder) String

func (m *GrpcJsonTranscoder) String() string

func (*GrpcJsonTranscoder) Unmarshal

func (m *GrpcJsonTranscoder) Unmarshal(dAtA []byte) error

func (*GrpcJsonTranscoder) Validate

func (m *GrpcJsonTranscoder) Validate() error

Validate checks the field values on GrpcJsonTranscoder with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GrpcJsonTranscoder) XXX_DiscardUnknown

func (m *GrpcJsonTranscoder) XXX_DiscardUnknown()

func (*GrpcJsonTranscoder) XXX_Marshal

func (m *GrpcJsonTranscoder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrpcJsonTranscoder) XXX_Merge

func (m *GrpcJsonTranscoder) XXX_Merge(src proto.Message)

func (*GrpcJsonTranscoder) XXX_OneofFuncs

func (*GrpcJsonTranscoder) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*GrpcJsonTranscoder) XXX_Size

func (m *GrpcJsonTranscoder) XXX_Size() int

func (*GrpcJsonTranscoder) XXX_Unmarshal

func (m *GrpcJsonTranscoder) XXX_Unmarshal(b []byte) error

type GrpcJsonTranscoderValidationError

type GrpcJsonTranscoderValidationError struct {
	// contains filtered or unexported fields
}

GrpcJsonTranscoderValidationError is the validation error returned by GrpcJsonTranscoder.Validate if the designated constraints aren't met.

func (GrpcJsonTranscoderValidationError) Cause

Cause function returns cause value.

func (GrpcJsonTranscoderValidationError) Error

Error satisfies the builtin error interface

func (GrpcJsonTranscoderValidationError) ErrorName added in v0.7.0

ErrorName returns error name.

func (GrpcJsonTranscoderValidationError) Field

Field function returns field value.

func (GrpcJsonTranscoderValidationError) Key

Key function returns key value.

func (GrpcJsonTranscoderValidationError) Reason

Reason function returns reason value.

type GrpcJsonTranscoder_PrintOptions

type GrpcJsonTranscoder_PrintOptions struct {
	// Whether to add spaces, line breaks and indentation to make the JSON
	// output easy to read. Defaults to false.
	AddWhitespace bool `protobuf:"varint,1,opt,name=add_whitespace,json=addWhitespace,proto3" json:"add_whitespace,omitempty"`
	// 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 preserve proto field names. By default protobuf will
	// generate JSON field names using the “json_name“ option, or lower camel case,
	// in that order. Setting this flag will preserve the original field names. Defaults to false.
	PreserveProtoFieldNames bool     `` /* 135-byte string literal not displayed */
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

func (*GrpcJsonTranscoder_PrintOptions) Descriptor

func (*GrpcJsonTranscoder_PrintOptions) Descriptor() ([]byte, []int)

func (*GrpcJsonTranscoder_PrintOptions) GetAddWhitespace

func (m *GrpcJsonTranscoder_PrintOptions) GetAddWhitespace() bool

func (*GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts

func (m *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts() bool

func (*GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields

func (m *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields() bool

func (*GrpcJsonTranscoder_PrintOptions) GetPreserveProtoFieldNames

func (m *GrpcJsonTranscoder_PrintOptions) GetPreserveProtoFieldNames() bool

func (*GrpcJsonTranscoder_PrintOptions) Marshal

func (m *GrpcJsonTranscoder_PrintOptions) Marshal() (dAtA []byte, err error)

func (*GrpcJsonTranscoder_PrintOptions) MarshalTo

func (m *GrpcJsonTranscoder_PrintOptions) MarshalTo(dAtA []byte) (int, error)

func (*GrpcJsonTranscoder_PrintOptions) ProtoMessage

func (*GrpcJsonTranscoder_PrintOptions) ProtoMessage()

func (*GrpcJsonTranscoder_PrintOptions) Reset

func (*GrpcJsonTranscoder_PrintOptions) Size

func (m *GrpcJsonTranscoder_PrintOptions) Size() (n int)

func (*GrpcJsonTranscoder_PrintOptions) String

func (*GrpcJsonTranscoder_PrintOptions) Unmarshal

func (m *GrpcJsonTranscoder_PrintOptions) Unmarshal(dAtA []byte) error

func (*GrpcJsonTranscoder_PrintOptions) Validate

func (m *GrpcJsonTranscoder_PrintOptions) Validate() error

Validate checks the field values on GrpcJsonTranscoder_PrintOptions with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GrpcJsonTranscoder_PrintOptions) XXX_DiscardUnknown

func (m *GrpcJsonTranscoder_PrintOptions) XXX_DiscardUnknown()

func (*GrpcJsonTranscoder_PrintOptions) XXX_Marshal

func (m *GrpcJsonTranscoder_PrintOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrpcJsonTranscoder_PrintOptions) XXX_Merge

func (m *GrpcJsonTranscoder_PrintOptions) XXX_Merge(src proto.Message)

func (*GrpcJsonTranscoder_PrintOptions) XXX_Size

func (m *GrpcJsonTranscoder_PrintOptions) XXX_Size() int

func (*GrpcJsonTranscoder_PrintOptions) XXX_Unmarshal

func (m *GrpcJsonTranscoder_PrintOptions) XXX_Unmarshal(b []byte) error

type GrpcJsonTranscoder_PrintOptionsValidationError

type GrpcJsonTranscoder_PrintOptionsValidationError struct {
	// contains filtered or unexported fields
}

GrpcJsonTranscoder_PrintOptionsValidationError is the validation error returned by GrpcJsonTranscoder_PrintOptions.Validate if the designated constraints aren't met.

func (GrpcJsonTranscoder_PrintOptionsValidationError) Cause

Cause function returns cause value.

func (GrpcJsonTranscoder_PrintOptionsValidationError) Error

Error satisfies the builtin error interface

func (GrpcJsonTranscoder_PrintOptionsValidationError) ErrorName added in v0.7.0

ErrorName returns error name.

func (GrpcJsonTranscoder_PrintOptionsValidationError) Field

Field function returns field value.

func (GrpcJsonTranscoder_PrintOptionsValidationError) Key

Key function returns key value.

func (GrpcJsonTranscoder_PrintOptionsValidationError) Reason

Reason function returns reason value.

type GrpcJsonTranscoder_ProtoDescriptor

type GrpcJsonTranscoder_ProtoDescriptor struct {
	ProtoDescriptor string `protobuf:"bytes,1,opt,name=proto_descriptor,json=protoDescriptor,proto3,oneof"`
}

func (*GrpcJsonTranscoder_ProtoDescriptor) MarshalTo

func (m *GrpcJsonTranscoder_ProtoDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*GrpcJsonTranscoder_ProtoDescriptor) Size

type GrpcJsonTranscoder_ProtoDescriptorBin

type GrpcJsonTranscoder_ProtoDescriptorBin struct {
	ProtoDescriptorBin []byte `protobuf:"bytes,4,opt,name=proto_descriptor_bin,json=protoDescriptorBin,proto3,oneof"`
}

func (*GrpcJsonTranscoder_ProtoDescriptorBin) MarshalTo

func (m *GrpcJsonTranscoder_ProtoDescriptorBin) MarshalTo(dAtA []byte) (int, error)

func (*GrpcJsonTranscoder_ProtoDescriptorBin) Size

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL