protocols

package
v0.0.0-...-c8cb302 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PayloadType_name = map[int32]string{
		0: "COMPRESSIBLE",
		1: "UNCOMPRESSABLE",
		2: "RANDOM",
	}
	PayloadType_value = map[string]int32{
		"COMPRESSIBLE":   0,
		"UNCOMPRESSABLE": 1,
		"RANDOM":         2,
	}
)

Enum value maps for PayloadType.

View Source
var NewTestHTTPClientProxy = func(opts ...client.Option) TestHTTPClientProxy {
	return &TestHTTPClientProxyImpl{client: client.DefaultClient, streamClient: stream.DefaultStreamClient, opts: opts}
}
View Source
var NewTestRESTfulClientProxy = func(opts ...client.Option) TestRESTfulClientProxy {
	return &TestRESTfulClientProxyImpl{client: client.DefaultClient, streamClient: stream.DefaultStreamClient, opts: opts}
}
View Source
var NewTestStreamingClientProxy = func(opts ...client.Option) TestStreamingClientProxy {
	return &TestStreamingClientProxyImpl{client: client.DefaultClient, streamClient: stream.DefaultStreamClient, opts: opts}
}
View Source
var NewTestTRPCClientProxy = func(opts ...client.Option) TestTRPCClientProxy {
	return &TestTRPCClientProxyImpl{client: client.DefaultClient, streamClient: stream.DefaultStreamClient, opts: opts}
}
View Source
var TestHTTPServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "trpc.testing.end2end.TestHTTP",
	HandlerType: ((*TestHTTPService)(nil)),
	Methods: []server.Method{
		{
			Name: "/UnaryCall",
			Func: TestHTTPService_UnaryCall_Handler,
		},
		{
			Name: "/trpc.testing.end2end.TestHTTP/UnaryCall",
			Func: TestHTTPService_UnaryCall_Handler,
		},
	},
}

TestHTTPServer_ServiceDesc descriptor for server.RegisterService

View Source
var TestRESTfulServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "trpc.testing.end2end.TestRESTful",
	HandlerType: ((*TestRESTfulService)(nil)),
	Methods: []server.Method{
		{
			Name: "/trpc.testing.end2end.TestRESTful/UnaryCall",
			Func: TestRESTfulService_UnaryCall_Handler,
			Bindings: []*restful.Binding{{
				Name:  "/trpc.testing.end2end.TestRESTful/UnaryCall",
				Input: func() restful.ProtoMessage { return new(SimpleRequest) },
				Filter: func(svc interface{}, ctx context.Context, reqBody interface{}) (interface{}, error) {
					return svc.(TestRESTfulService).UnaryCall(ctx, reqBody.(*SimpleRequest))
				},
				HTTPMethod:   "POST",
				Pattern:      restful.Enforce("/UnaryCall"),
				Body:         requestBodyTestRESTfulServiceUnaryCallRESTfulPath0{},
				ResponseBody: nil,
			}, {
				Name:  "/trpc.testing.end2end.TestRESTful/UnaryCall",
				Input: func() restful.ProtoMessage { return new(SimpleRequest) },
				Filter: func(svc interface{}, ctx context.Context, reqBody interface{}) (interface{}, error) {
					return svc.(TestRESTfulService).UnaryCall(ctx, reqBody.(*SimpleRequest))
				},
				HTTPMethod:   "GET",
				Pattern:      restful.Enforce("/UnaryCall/{username}"),
				Body:         nil,
				ResponseBody: nil,
			}},
		},
	},
}

TestRESTfulServer_ServiceDesc descriptor for server.RegisterService

View Source
var TestStreamingServer_ServiceDesc = server.ServiceDesc{
	ServiceName:  "trpc.testing.end2end.TestStreaming",
	HandlerType:  ((*TestStreamingService)(nil)),
	StreamHandle: stream.NewStreamDispatcher(),
	Methods:      []server.Method{},
	Streams: []server.StreamDesc{
		{
			StreamName:    "/trpc.testing.end2end.TestStreaming/StreamingOutputCall",
			Handler:       TestStreamingService_StreamingOutputCall_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "/trpc.testing.end2end.TestStreaming/StreamingInputCall",
			Handler:       TestStreamingService_StreamingInputCall_Handler,
			ServerStreams: false,
		},
		{
			StreamName:    "/trpc.testing.end2end.TestStreaming/FullDuplexCall",
			Handler:       TestStreamingService_FullDuplexCall_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "/trpc.testing.end2end.TestStreaming/HalfDuplexCall",
			Handler:       TestStreamingService_HalfDuplexCall_Handler,
			ServerStreams: true,
		},
	},
}

TestStreamingServer_ServiceDesc descriptor for server.RegisterService

View Source
var TestTRPCServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "trpc.testing.end2end.TestTRPC",
	HandlerType: ((*TestTRPCService)(nil)),
	Methods: []server.Method{
		{
			Name: "/trpc.testing.end2end.TestTRPC/EmptyCall",
			Func: TestTRPCService_EmptyCall_Handler,
		},
		{
			Name: "/trpc.testing.end2end.TestTRPC/UnaryCall",
			Func: TestTRPCService_UnaryCall_Handler,
		},
	},
}

TestTRPCServer_ServiceDesc descriptor for server.RegisterService

Functions

func RegisterTestHTTPService

func RegisterTestHTTPService(s server.Service, svr TestHTTPService)

RegisterTestHTTPService register service

func RegisterTestRESTfulService

func RegisterTestRESTfulService(s server.Service, svr TestRESTfulService)

RegisterTestRESTfulService register service

func RegisterTestStreamingService

func RegisterTestStreamingService(s server.Service, svr TestStreamingService)

RegisterTestStreamingService register service

func RegisterTestTRPCService

func RegisterTestTRPCService(s server.Service, svr TestTRPCService)

RegisterTestTRPCService register service

func TestHTTPService_UnaryCall_Handler

func TestHTTPService_UnaryCall_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func TestRESTfulService_UnaryCall_Handler

func TestRESTfulService_UnaryCall_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func TestStreamingService_FullDuplexCall_Handler

func TestStreamingService_FullDuplexCall_Handler(srv interface{}, stream server.Stream) error

func TestStreamingService_HalfDuplexCall_Handler

func TestStreamingService_HalfDuplexCall_Handler(srv interface{}, stream server.Stream) error

func TestStreamingService_StreamingInputCall_Handler

func TestStreamingService_StreamingInputCall_Handler(srv interface{}, stream server.Stream) error

func TestStreamingService_StreamingOutputCall_Handler

func TestStreamingService_StreamingOutputCall_Handler(srv interface{}, stream server.Stream) error

func TestTRPCService_EmptyCall_Handler

func TestTRPCService_EmptyCall_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func TestTRPCService_UnaryCall_Handler

func TestTRPCService_UnaryCall_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

func (*Empty) Validate

func (m *Empty) Validate() error

Validate checks the field values on Empty with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Empty) ValidateAll

func (m *Empty) ValidateAll() error

ValidateAll checks the field values on Empty with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EmptyMultiError, or nil if none found.

type EmptyMultiError

type EmptyMultiError []error

EmptyMultiError is an error wrapping multiple validation errors returned by Empty.ValidateAll() if the designated constraints aren't met.

func (EmptyMultiError) AllErrors

func (m EmptyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EmptyMultiError) Error

func (m EmptyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type EmptyValidationError

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

EmptyValidationError is the validation error returned by Empty.Validate if the designated constraints aren't met.

func (EmptyValidationError) Cause

func (e EmptyValidationError) Cause() error

Cause function returns cause value.

func (EmptyValidationError) Error

func (e EmptyValidationError) Error() string

Error satisfies the builtin error interface

func (EmptyValidationError) ErrorName

func (e EmptyValidationError) ErrorName() string

ErrorName returns error name.

func (EmptyValidationError) Field

func (e EmptyValidationError) Field() string

Field function returns field value.

func (EmptyValidationError) Key

func (e EmptyValidationError) Key() bool

Key function returns key value.

func (EmptyValidationError) Reason

func (e EmptyValidationError) Reason() string

Reason function returns reason value.

type Payload

type Payload struct {

	// The type of data in body.
	Type PayloadType `protobuf:"varint,1,opt,name=type,proto3,enum=trpc.testing.end2end.PayloadType" json:"type,omitempty"`
	// Primary contents of payload.
	Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

A block of data, to simply increase gRPC message size.

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetBody

func (x *Payload) GetBody() []byte

func (*Payload) GetType

func (x *Payload) GetType() PayloadType

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

func (*Payload) Validate

func (m *Payload) Validate() error

Validate checks the field values on Payload with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Payload) ValidateAll

func (m *Payload) ValidateAll() error

ValidateAll checks the field values on Payload with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PayloadMultiError, or nil if none found.

type PayloadMultiError

type PayloadMultiError []error

PayloadMultiError is an error wrapping multiple validation errors returned by Payload.ValidateAll() if the designated constraints aren't met.

func (PayloadMultiError) AllErrors

func (m PayloadMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PayloadMultiError) Error

func (m PayloadMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PayloadType

type PayloadType int32

The type of payload that should be returned.

const (
	// Compressible text format.
	PayloadType_COMPRESSIBLE PayloadType = 0
	// Uncompressable binary format.
	PayloadType_UNCOMPRESSABLE PayloadType = 1
	// Randomly chosen from all other formats defined in this enum.
	PayloadType_RANDOM PayloadType = 2
)

func (PayloadType) Descriptor

func (PayloadType) Enum

func (x PayloadType) Enum() *PayloadType

func (PayloadType) EnumDescriptor deprecated

func (PayloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PayloadType.Descriptor instead.

func (PayloadType) Number

func (x PayloadType) Number() protoreflect.EnumNumber

func (PayloadType) String

func (x PayloadType) String() string

func (PayloadType) Type

type PayloadValidationError

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

PayloadValidationError is the validation error returned by Payload.Validate if the designated constraints aren't met.

func (PayloadValidationError) Cause

func (e PayloadValidationError) Cause() error

Cause function returns cause value.

func (PayloadValidationError) Error

func (e PayloadValidationError) Error() string

Error satisfies the builtin error interface

func (PayloadValidationError) ErrorName

func (e PayloadValidationError) ErrorName() string

ErrorName returns error name.

func (PayloadValidationError) Field

func (e PayloadValidationError) Field() string

Field function returns field value.

func (PayloadValidationError) Key

func (e PayloadValidationError) Key() bool

Key function returns key value.

func (PayloadValidationError) Reason

func (e PayloadValidationError) Reason() string

Reason function returns reason value.

type ResponseParameters

type ResponseParameters struct {

	// Desired payload sizes in responses from the server.
	// If response_type is COMPRESSIBLE, this denotes the size before compression.
	Size int32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// Desired interval between consecutive responses in the response stream.
	Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"`
	// contains filtered or unexported fields
}

Configuration for a particular response.

func (*ResponseParameters) Descriptor deprecated

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

Deprecated: Use ResponseParameters.ProtoReflect.Descriptor instead.

func (*ResponseParameters) GetInterval

func (x *ResponseParameters) GetInterval() *durationpb.Duration

func (*ResponseParameters) GetSize

func (x *ResponseParameters) GetSize() int32

func (*ResponseParameters) ProtoMessage

func (*ResponseParameters) ProtoMessage()

func (*ResponseParameters) ProtoReflect

func (x *ResponseParameters) ProtoReflect() protoreflect.Message

func (*ResponseParameters) Reset

func (x *ResponseParameters) Reset()

func (*ResponseParameters) String

func (x *ResponseParameters) String() string

func (*ResponseParameters) Validate

func (m *ResponseParameters) Validate() error

Validate checks the field values on ResponseParameters with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ResponseParameters) ValidateAll

func (m *ResponseParameters) ValidateAll() error

ValidateAll checks the field values on ResponseParameters with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ResponseParametersMultiError, or nil if none found.

type ResponseParametersMultiError

type ResponseParametersMultiError []error

ResponseParametersMultiError is an error wrapping multiple validation errors returned by ResponseParameters.ValidateAll() if the designated constraints aren't met.

func (ResponseParametersMultiError) AllErrors

func (m ResponseParametersMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResponseParametersMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ResponseParametersValidationError

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

ResponseParametersValidationError is the validation error returned by ResponseParameters.Validate if the designated constraints aren't met.

func (ResponseParametersValidationError) Cause

Cause function returns cause value.

func (ResponseParametersValidationError) Error

Error satisfies the builtin error interface

func (ResponseParametersValidationError) ErrorName

ErrorName returns error name.

func (ResponseParametersValidationError) Field

Field function returns field value.

func (ResponseParametersValidationError) Key

Key function returns key value.

func (ResponseParametersValidationError) Reason

Reason function returns reason value.

type SimpleRequest

type SimpleRequest struct {

	// Desired payload type in the response from the server.
	// If response_type is RANDOM, server randomly chooses one from other formats.
	ResponseType PayloadType `` /* 136-byte string literal not displayed */
	// Desired payload size in the response from the server.
	// If response_type is COMPRESSIBLE, this denotes the size before compression.
	ResponseSize int32 `protobuf:"varint,2,opt,name=response_size,json=responseSize,proto3" json:"response_size,omitempty"`
	// Optional input payload sent along with the request.
	Payload  *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Username string   `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	// Whether SimpleResponse should include username.
	FillUsername bool `protobuf:"varint,5,opt,name=fill_username,json=fillUsername,proto3" json:"fill_username,omitempty"`
	// Whether SimpleResponse should include OAuth scope.
	FillOauthScope bool `protobuf:"varint,6,opt,name=fill_oauth_scope,json=fillOauthScope,proto3" json:"fill_oauth_scope,omitempty"`
	// contains filtered or unexported fields
}

Unary request.

func (*SimpleRequest) Descriptor deprecated

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

Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead.

func (*SimpleRequest) GetFillOauthScope

func (x *SimpleRequest) GetFillOauthScope() bool

func (*SimpleRequest) GetFillUsername

func (x *SimpleRequest) GetFillUsername() bool

func (*SimpleRequest) GetPayload

func (x *SimpleRequest) GetPayload() *Payload

func (*SimpleRequest) GetResponseSize

func (x *SimpleRequest) GetResponseSize() int32

func (*SimpleRequest) GetResponseType

func (x *SimpleRequest) GetResponseType() PayloadType

func (*SimpleRequest) GetUsername

func (x *SimpleRequest) GetUsername() string

func (*SimpleRequest) ProtoMessage

func (*SimpleRequest) ProtoMessage()

func (*SimpleRequest) ProtoReflect

func (x *SimpleRequest) ProtoReflect() protoreflect.Message

func (*SimpleRequest) Reset

func (x *SimpleRequest) Reset()

func (*SimpleRequest) String

func (x *SimpleRequest) String() string

func (*SimpleRequest) Validate

func (m *SimpleRequest) Validate() error

Validate checks the field values on SimpleRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SimpleRequest) ValidateAll

func (m *SimpleRequest) ValidateAll() error

ValidateAll checks the field values on SimpleRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SimpleRequestMultiError, or nil if none found.

type SimpleRequestMultiError

type SimpleRequestMultiError []error

SimpleRequestMultiError is an error wrapping multiple validation errors returned by SimpleRequest.ValidateAll() if the designated constraints aren't met.

func (SimpleRequestMultiError) AllErrors

func (m SimpleRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SimpleRequestMultiError) Error

func (m SimpleRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SimpleRequestValidationError

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

SimpleRequestValidationError is the validation error returned by SimpleRequest.Validate if the designated constraints aren't met.

func (SimpleRequestValidationError) Cause

Cause function returns cause value.

func (SimpleRequestValidationError) Error

Error satisfies the builtin error interface

func (SimpleRequestValidationError) ErrorName

func (e SimpleRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SimpleRequestValidationError) Field

Field function returns field value.

func (SimpleRequestValidationError) Key

Key function returns key value.

func (SimpleRequestValidationError) Reason

Reason function returns reason value.

type SimpleResponse

type SimpleResponse struct {

	// Payload to increase message size.
	Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// The user the request came from, for verifying authentication was
	// successful when the client expected it.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// OAuth scope.
	OauthScope string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope,proto3" json:"oauth_scope,omitempty"`
	// contains filtered or unexported fields
}

Unary response, as configured by the request.

func (*SimpleResponse) Descriptor deprecated

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

Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead.

func (*SimpleResponse) GetOauthScope

func (x *SimpleResponse) GetOauthScope() string

func (*SimpleResponse) GetPayload

func (x *SimpleResponse) GetPayload() *Payload

func (*SimpleResponse) GetUsername

func (x *SimpleResponse) GetUsername() string

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) ProtoReflect

func (x *SimpleResponse) ProtoReflect() protoreflect.Message

func (*SimpleResponse) Reset

func (x *SimpleResponse) Reset()

func (*SimpleResponse) String

func (x *SimpleResponse) String() string

func (*SimpleResponse) Validate

func (m *SimpleResponse) Validate() error

Validate checks the field values on SimpleResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SimpleResponse) ValidateAll

func (m *SimpleResponse) ValidateAll() error

ValidateAll checks the field values on SimpleResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SimpleResponseMultiError, or nil if none found.

type SimpleResponseMultiError

type SimpleResponseMultiError []error

SimpleResponseMultiError is an error wrapping multiple validation errors returned by SimpleResponse.ValidateAll() if the designated constraints aren't met.

func (SimpleResponseMultiError) AllErrors

func (m SimpleResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SimpleResponseMultiError) Error

func (m SimpleResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SimpleResponseValidationError

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

SimpleResponseValidationError is the validation error returned by SimpleResponse.Validate if the designated constraints aren't met.

func (SimpleResponseValidationError) Cause

Cause function returns cause value.

func (SimpleResponseValidationError) Error

Error satisfies the builtin error interface

func (SimpleResponseValidationError) ErrorName

func (e SimpleResponseValidationError) ErrorName() string

ErrorName returns error name.

func (SimpleResponseValidationError) Field

Field function returns field value.

func (SimpleResponseValidationError) Key

Key function returns key value.

func (SimpleResponseValidationError) Reason

Reason function returns reason value.

type StreamingInputCallRequest

type StreamingInputCallRequest struct {

	// Optional input payload sent along with the request.
	Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Client-streaming request.

func (*StreamingInputCallRequest) Descriptor deprecated

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

Deprecated: Use StreamingInputCallRequest.ProtoReflect.Descriptor instead.

func (*StreamingInputCallRequest) GetPayload

func (x *StreamingInputCallRequest) GetPayload() *Payload

func (*StreamingInputCallRequest) ProtoMessage

func (*StreamingInputCallRequest) ProtoMessage()

func (*StreamingInputCallRequest) ProtoReflect

func (*StreamingInputCallRequest) Reset

func (x *StreamingInputCallRequest) Reset()

func (*StreamingInputCallRequest) String

func (x *StreamingInputCallRequest) String() string

func (*StreamingInputCallRequest) Validate

func (m *StreamingInputCallRequest) Validate() error

Validate checks the field values on StreamingInputCallRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamingInputCallRequest) ValidateAll

func (m *StreamingInputCallRequest) ValidateAll() error

ValidateAll checks the field values on StreamingInputCallRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamingInputCallRequestMultiError, or nil if none found.

type StreamingInputCallRequestMultiError

type StreamingInputCallRequestMultiError []error

StreamingInputCallRequestMultiError is an error wrapping multiple validation errors returned by StreamingInputCallRequest.ValidateAll() if the designated constraints aren't met.

func (StreamingInputCallRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (StreamingInputCallRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type StreamingInputCallRequestValidationError

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

StreamingInputCallRequestValidationError is the validation error returned by StreamingInputCallRequest.Validate if the designated constraints aren't met.

func (StreamingInputCallRequestValidationError) Cause

Cause function returns cause value.

func (StreamingInputCallRequestValidationError) Error

Error satisfies the builtin error interface

func (StreamingInputCallRequestValidationError) ErrorName

ErrorName returns error name.

func (StreamingInputCallRequestValidationError) Field

Field function returns field value.

func (StreamingInputCallRequestValidationError) Key

Key function returns key value.

func (StreamingInputCallRequestValidationError) Reason

Reason function returns reason value.

type StreamingInputCallResponse

type StreamingInputCallResponse struct {

	// Aggregated size of payloads received from the client.
	AggregatedPayloadSize int32 `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

Client-streaming response.

func (*StreamingInputCallResponse) Descriptor deprecated

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

Deprecated: Use StreamingInputCallResponse.ProtoReflect.Descriptor instead.

func (*StreamingInputCallResponse) GetAggregatedPayloadSize

func (x *StreamingInputCallResponse) GetAggregatedPayloadSize() int32

func (*StreamingInputCallResponse) ProtoMessage

func (*StreamingInputCallResponse) ProtoMessage()

func (*StreamingInputCallResponse) ProtoReflect

func (*StreamingInputCallResponse) Reset

func (x *StreamingInputCallResponse) Reset()

func (*StreamingInputCallResponse) String

func (x *StreamingInputCallResponse) String() string

func (*StreamingInputCallResponse) Validate

func (m *StreamingInputCallResponse) Validate() error

Validate checks the field values on StreamingInputCallResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamingInputCallResponse) ValidateAll

func (m *StreamingInputCallResponse) ValidateAll() error

ValidateAll checks the field values on StreamingInputCallResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamingInputCallResponseMultiError, or nil if none found.

type StreamingInputCallResponseMultiError

type StreamingInputCallResponseMultiError []error

StreamingInputCallResponseMultiError is an error wrapping multiple validation errors returned by StreamingInputCallResponse.ValidateAll() if the designated constraints aren't met.

func (StreamingInputCallResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (StreamingInputCallResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type StreamingInputCallResponseValidationError

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

StreamingInputCallResponseValidationError is the validation error returned by StreamingInputCallResponse.Validate if the designated constraints aren't met.

func (StreamingInputCallResponseValidationError) Cause

Cause function returns cause value.

func (StreamingInputCallResponseValidationError) Error

Error satisfies the builtin error interface

func (StreamingInputCallResponseValidationError) ErrorName

ErrorName returns error name.

func (StreamingInputCallResponseValidationError) Field

Field function returns field value.

func (StreamingInputCallResponseValidationError) Key

Key function returns key value.

func (StreamingInputCallResponseValidationError) Reason

Reason function returns reason value.

type StreamingOutputCallRequest

type StreamingOutputCallRequest struct {

	// Desired payload type in the response from the server.
	// If response_type is RANDOM, the payload from each response in the stream
	// might be of different types. This is to simulate a mixed type of payload
	// stream.
	ResponseType PayloadType `` /* 136-byte string literal not displayed */
	// Configuration for each expected response message.
	ResponseParameters []*ResponseParameters `protobuf:"bytes,2,rep,name=response_parameters,json=responseParameters,proto3" json:"response_parameters,omitempty"`
	// Optional input payload sent along with the request.
	Payload *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Server-streaming request.

func (*StreamingOutputCallRequest) Descriptor deprecated

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

Deprecated: Use StreamingOutputCallRequest.ProtoReflect.Descriptor instead.

func (*StreamingOutputCallRequest) GetPayload

func (x *StreamingOutputCallRequest) GetPayload() *Payload

func (*StreamingOutputCallRequest) GetResponseParameters

func (x *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters

func (*StreamingOutputCallRequest) GetResponseType

func (x *StreamingOutputCallRequest) GetResponseType() PayloadType

func (*StreamingOutputCallRequest) ProtoMessage

func (*StreamingOutputCallRequest) ProtoMessage()

func (*StreamingOutputCallRequest) ProtoReflect

func (*StreamingOutputCallRequest) Reset

func (x *StreamingOutputCallRequest) Reset()

func (*StreamingOutputCallRequest) String

func (x *StreamingOutputCallRequest) String() string

func (*StreamingOutputCallRequest) Validate

func (m *StreamingOutputCallRequest) Validate() error

Validate checks the field values on StreamingOutputCallRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamingOutputCallRequest) ValidateAll

func (m *StreamingOutputCallRequest) ValidateAll() error

ValidateAll checks the field values on StreamingOutputCallRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamingOutputCallRequestMultiError, or nil if none found.

type StreamingOutputCallRequestMultiError

type StreamingOutputCallRequestMultiError []error

StreamingOutputCallRequestMultiError is an error wrapping multiple validation errors returned by StreamingOutputCallRequest.ValidateAll() if the designated constraints aren't met.

func (StreamingOutputCallRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (StreamingOutputCallRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type StreamingOutputCallRequestValidationError

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

StreamingOutputCallRequestValidationError is the validation error returned by StreamingOutputCallRequest.Validate if the designated constraints aren't met.

func (StreamingOutputCallRequestValidationError) Cause

Cause function returns cause value.

func (StreamingOutputCallRequestValidationError) Error

Error satisfies the builtin error interface

func (StreamingOutputCallRequestValidationError) ErrorName

ErrorName returns error name.

func (StreamingOutputCallRequestValidationError) Field

Field function returns field value.

func (StreamingOutputCallRequestValidationError) Key

Key function returns key value.

func (StreamingOutputCallRequestValidationError) Reason

Reason function returns reason value.

type StreamingOutputCallResponse

type StreamingOutputCallResponse struct {

	// Payload to increase response size.
	Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Server-streaming response, as configured by the request and parameters.

func (*StreamingOutputCallResponse) Descriptor deprecated

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

Deprecated: Use StreamingOutputCallResponse.ProtoReflect.Descriptor instead.

func (*StreamingOutputCallResponse) GetPayload

func (x *StreamingOutputCallResponse) GetPayload() *Payload

func (*StreamingOutputCallResponse) ProtoMessage

func (*StreamingOutputCallResponse) ProtoMessage()

func (*StreamingOutputCallResponse) ProtoReflect

func (*StreamingOutputCallResponse) Reset

func (x *StreamingOutputCallResponse) Reset()

func (*StreamingOutputCallResponse) String

func (x *StreamingOutputCallResponse) String() string

func (*StreamingOutputCallResponse) Validate

func (m *StreamingOutputCallResponse) Validate() error

Validate checks the field values on StreamingOutputCallResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamingOutputCallResponse) ValidateAll

func (m *StreamingOutputCallResponse) ValidateAll() error

ValidateAll checks the field values on StreamingOutputCallResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamingOutputCallResponseMultiError, or nil if none found.

type StreamingOutputCallResponseMultiError

type StreamingOutputCallResponseMultiError []error

StreamingOutputCallResponseMultiError is an error wrapping multiple validation errors returned by StreamingOutputCallResponse.ValidateAll() if the designated constraints aren't met.

func (StreamingOutputCallResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (StreamingOutputCallResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type StreamingOutputCallResponseValidationError

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

StreamingOutputCallResponseValidationError is the validation error returned by StreamingOutputCallResponse.Validate if the designated constraints aren't met.

func (StreamingOutputCallResponseValidationError) Cause

Cause function returns cause value.

func (StreamingOutputCallResponseValidationError) Error

Error satisfies the builtin error interface

func (StreamingOutputCallResponseValidationError) ErrorName

ErrorName returns error name.

func (StreamingOutputCallResponseValidationError) Field

Field function returns field value.

func (StreamingOutputCallResponseValidationError) Key

Key function returns key value.

func (StreamingOutputCallResponseValidationError) Reason

Reason function returns reason value.

type TestHTTPClientProxy

type TestHTTPClientProxy interface {
	UnaryCall(ctx context.Context, req *SimpleRequest, opts ...client.Option) (rsp *SimpleResponse, err error)
}

TestHTTPClientProxy defines service client proxy

type TestHTTPClientProxyImpl

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

func (*TestHTTPClientProxyImpl) UnaryCall

type TestHTTPService

type TestHTTPService interface {
	UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error)
}

TestHTTPService defines service

type TestRESTfulClientProxy

type TestRESTfulClientProxy interface {
	UnaryCall(ctx context.Context, req *SimpleRequest, opts ...client.Option) (rsp *SimpleResponse, err error)
}

TestRESTfulClientProxy defines service client proxy

type TestRESTfulClientProxyImpl

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

func (*TestRESTfulClientProxyImpl) UnaryCall

type TestRESTfulService

type TestRESTfulService interface {
	UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error)
}

TestRESTfulService defines service

type TestStreamingClientProxy

type TestStreamingClientProxy interface {
	// StreamingOutputCall One request followed by a sequence of responses (streamed download).
	//  The server returns the payload with client desired type and sizes.
	StreamingOutputCall(ctx context.Context, req *StreamingOutputCallRequest, opts ...client.Option) (TestStreaming_StreamingOutputCallClient, error)

	// StreamingInputCall A sequence of requests followed by one response (streamed upload).
	//  The server returns the aggregated size of client payload as the result.
	StreamingInputCall(ctx context.Context, opts ...client.Option) (TestStreaming_StreamingInputCallClient, error)

	// FullDuplexCall A sequence of requests with each request served by the server immediately.
	//  As one request could lead to multiple responses, this interface
	//  demonstrates the idea of full duplexing.
	FullDuplexCall(ctx context.Context, opts ...client.Option) (TestStreaming_FullDuplexCallClient, error)

	// HalfDuplexCall A sequence of requests followed by a sequence of responses.
	//  The server buffers all the client requests and then serves them in order. A
	//  stream of responses are returned to the client when the server starts with
	//  first request.
	HalfDuplexCall(ctx context.Context, opts ...client.Option) (TestStreaming_HalfDuplexCallClient, error)
}

TestStreamingClientProxy defines service client proxy

type TestStreamingClientProxyImpl

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

func (*TestStreamingClientProxyImpl) FullDuplexCall

func (*TestStreamingClientProxyImpl) HalfDuplexCall

func (*TestStreamingClientProxyImpl) StreamingInputCall

func (*TestStreamingClientProxyImpl) StreamingOutputCall

type TestStreamingService

type TestStreamingService interface {

	// StreamingOutputCall One request followed by a sequence of responses (streamed download).
	//  The server returns the payload with client desired type and sizes.
	StreamingOutputCall(*StreamingOutputCallRequest, TestStreaming_StreamingOutputCallServer) error

	// StreamingInputCall A sequence of requests followed by one response (streamed upload).
	//  The server returns the aggregated size of client payload as the result.
	StreamingInputCall(TestStreaming_StreamingInputCallServer) error

	// FullDuplexCall A sequence of requests with each request served by the server immediately.
	//  As one request could lead to multiple responses, this interface
	//  demonstrates the idea of full duplexing.
	FullDuplexCall(TestStreaming_FullDuplexCallServer) error

	// HalfDuplexCall A sequence of requests followed by a sequence of responses.
	//  The server buffers all the client requests and then serves them in order. A
	//  stream of responses are returned to the client when the server starts with
	//  first request.
	HalfDuplexCall(TestStreaming_HalfDuplexCallServer) error
}

TestStreamingService defines service

type TestStreaming_FullDuplexCallClient

type TestStreaming_FullDuplexCallClient interface {
	Send(*StreamingOutputCallRequest) error
	Recv() (*StreamingOutputCallResponse, error)
	client.ClientStream
}

type TestStreaming_FullDuplexCallServer

type TestStreaming_FullDuplexCallServer interface {
	Send(*StreamingOutputCallResponse) error
	Recv() (*StreamingOutputCallRequest, error)
	server.Stream
}

type TestStreaming_HalfDuplexCallClient

type TestStreaming_HalfDuplexCallClient interface {
	Send(*StreamingOutputCallRequest) error
	Recv() (*StreamingOutputCallResponse, error)
	client.ClientStream
}

type TestStreaming_HalfDuplexCallServer

type TestStreaming_HalfDuplexCallServer interface {
	Send(*StreamingOutputCallResponse) error
	Recv() (*StreamingOutputCallRequest, error)
	server.Stream
}

type TestStreaming_StreamingInputCallClient

type TestStreaming_StreamingInputCallClient interface {
	Send(*StreamingInputCallRequest) error
	CloseAndRecv() (*StreamingInputCallResponse, error)
	client.ClientStream
}

type TestStreaming_StreamingInputCallServer

type TestStreaming_StreamingInputCallServer interface {
	SendAndClose(*StreamingInputCallResponse) error
	Recv() (*StreamingInputCallRequest, error)
	server.Stream
}

type TestStreaming_StreamingOutputCallClient

type TestStreaming_StreamingOutputCallClient interface {
	Recv() (*StreamingOutputCallResponse, error)
	client.ClientStream
}

type TestStreaming_StreamingOutputCallServer

type TestStreaming_StreamingOutputCallServer interface {
	Send(*StreamingOutputCallResponse) error
	server.Stream
}

type TestTRPCClientProxy

type TestTRPCClientProxy interface {
	// EmptyCall One empty request followed by one empty response.
	EmptyCall(ctx context.Context, req *Empty, opts ...client.Option) (rsp *Empty, err error)

	// UnaryCall One request followed by one response.
	//  The server returns the client payload as-is.
	UnaryCall(ctx context.Context, req *SimpleRequest, opts ...client.Option) (rsp *SimpleResponse, err error)
}

TestTRPCClientProxy defines service client proxy

type TestTRPCClientProxyImpl

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

func (*TestTRPCClientProxyImpl) EmptyCall

func (c *TestTRPCClientProxyImpl) EmptyCall(ctx context.Context, req *Empty, opts ...client.Option) (*Empty, error)

func (*TestTRPCClientProxyImpl) UnaryCall

type TestTRPCService

type TestTRPCService interface {

	// EmptyCall One empty request followed by one empty response.
	EmptyCall(ctx context.Context, req *Empty) (*Empty, error)

	// UnaryCall One request followed by one response.
	//  The server returns the client payload as-is.
	UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error)
}

TestTRPCService defines service

Jump to

Keyboard shortcuts

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