examplepb

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Overview

Package examplepb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_examples_internal_proto_examplepb_echo_service_proto protoreflect.FileDescriptor
View Source
var File_examples_internal_proto_examplepb_unannotated_echo_service_proto protoreflect.FileDescriptor

Functions

func DisableEchoService_Service

func DisableEchoService_Service()

func Disable_CUSTOM_EASE_GATEWAY_TEST__default__grpc_ServiceGroup

func Disable_CUSTOM_EASE_GATEWAY_TEST__default__grpc_ServiceGroup()

func EnableEchoService_Service

func EnableEchoService_Service(spec *skypb.ServiceSpec, conn *grpc.ClientConn)

func Enable_CUSTOM_EASE_GATEWAY_TEST__default__grpc_ServiceGroup

func Enable_CUSTOM_EASE_GATEWAY_TEST__default__grpc_ServiceGroup()

func RegisterEchoServiceHandler

func RegisterEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterEchoServiceHandler registers the http handlers for service EchoService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterEchoServiceHandlerClient

func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EchoServiceClient) error

RegisterEchoServiceHandlerClient registers the http handlers for service EchoService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EchoServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EchoServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EchoServiceClient" to call the correct interceptors.

func RegisterEchoServiceHandlerFromEndpoint

func RegisterEchoServiceHandlerFromEndpoint(mux *runtime.ServeMux) (err error)

RegisterEchoServiceHandlerFromEndpoint is same as RegisterEchoServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterEchoServiceHandlerServer

func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EchoServiceServer) error

RegisterEchoServiceHandlerServer registers the http handlers for service EchoService to "mux". UnaryRPC :call EchoServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEchoServiceHandlerFromEndpoint instead.

func RegisterEchoServiceServer

func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)

func RegisterUnannotatedEchoServiceServer

func RegisterUnannotatedEchoServiceServer(s *grpc.Server, srv UnannotatedEchoServiceServer)

func Validate__grpc_gateway_examples_internal_proto_examplepb_ValidationRuleTestRequest

func Validate__grpc_gateway_examples_internal_proto_examplepb_ValidationRuleTestRequest(v *ValidationRuleTestRequest) error

Types

type DynamicMessage

type DynamicMessage struct {
	StructField *structpb.Struct `protobuf:"bytes,1,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"`
	ValueField  *structpb.Value  `protobuf:"bytes,2,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"`
	// contains filtered or unexported fields
}

func (*DynamicMessage) Descriptor deprecated

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

Deprecated: Use DynamicMessage.ProtoReflect.Descriptor instead.

func (*DynamicMessage) GetStructField

func (x *DynamicMessage) GetStructField() *structpb.Struct

func (*DynamicMessage) GetValueField

func (x *DynamicMessage) GetValueField() *structpb.Value

func (*DynamicMessage) ProtoMessage

func (*DynamicMessage) ProtoMessage()

func (*DynamicMessage) ProtoReflect

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

func (*DynamicMessage) Reset

func (x *DynamicMessage) Reset()

func (*DynamicMessage) String

func (x *DynamicMessage) String() string

type DynamicMessageUpdate

type DynamicMessageUpdate struct {
	Body       *DynamicMessage        `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*DynamicMessageUpdate) Descriptor deprecated

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

Deprecated: Use DynamicMessageUpdate.ProtoReflect.Descriptor instead.

func (*DynamicMessageUpdate) GetBody

func (x *DynamicMessageUpdate) GetBody() *DynamicMessage

func (*DynamicMessageUpdate) GetUpdateMask

func (x *DynamicMessageUpdate) GetUpdateMask() *fieldmaskpb.FieldMask

func (*DynamicMessageUpdate) ProtoMessage

func (*DynamicMessageUpdate) ProtoMessage()

func (*DynamicMessageUpdate) ProtoReflect

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

func (*DynamicMessageUpdate) Reset

func (x *DynamicMessageUpdate) Reset()

func (*DynamicMessageUpdate) String

func (x *DynamicMessageUpdate) String() string

type EchoServiceClient

type EchoServiceClient interface {
	Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
	EchoBody(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
	EchoDelete(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
	EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...grpc.CallOption) (*DynamicMessageUpdate, error)
	EchoValidationRule(ctx context.Context, in *ValidationRuleTestRequest, opts ...grpc.CallOption) (*ValidationRuleTestResponse, error)
}

EchoServiceClient is the client API for EchoService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type EchoServiceServer

EchoServiceServer is the server API for EchoService service. All implementations should embed UnimplementedEchoServiceServer for forward compatibility

type Embedded

type Embedded struct {

	// Types that are assignable to Mark:
	//	*Embedded_Progress
	//	*Embedded_Note
	Mark isEmbedded_Mark `protobuf_oneof:"mark"`
	// contains filtered or unexported fields
}

func (*Embedded) Descriptor deprecated

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

Deprecated: Use Embedded.ProtoReflect.Descriptor instead.

func (*Embedded) GetMark

func (m *Embedded) GetMark() isEmbedded_Mark

func (*Embedded) GetNote

func (x *Embedded) GetNote() string

func (*Embedded) GetProgress

func (x *Embedded) GetProgress() int64

func (*Embedded) ProtoMessage

func (*Embedded) ProtoMessage()

func (*Embedded) ProtoReflect

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

func (*Embedded) Reset

func (x *Embedded) Reset()

func (*Embedded) String

func (x *Embedded) String() string

type Embedded_Note

type Embedded_Note struct {
	Note string `protobuf:"bytes,2,opt,name=note,proto3,oneof"`
}

type Embedded_Progress

type Embedded_Progress struct {
	Progress int64 `protobuf:"varint,1,opt,name=progress,proto3,oneof"`
}

type SimpleMessage

type SimpleMessage struct {
	Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Num int64  `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	// Types that are assignable to Code:
	//	*SimpleMessage_LineNum
	//	*SimpleMessage_Lang
	Code   isSimpleMessage_Code `protobuf_oneof:"code"`
	Status *Embedded            `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// Types that are assignable to Ext:
	//	*SimpleMessage_En
	//	*SimpleMessage_No
	Ext isSimpleMessage_Ext `protobuf_oneof:"ext"`
	// contains filtered or unexported fields
}

func (*SimpleMessage) Descriptor deprecated

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

Deprecated: Use SimpleMessage.ProtoReflect.Descriptor instead.

func (*SimpleMessage) GetCode

func (m *SimpleMessage) GetCode() isSimpleMessage_Code

func (*SimpleMessage) GetEn

func (x *SimpleMessage) GetEn() int64

func (*SimpleMessage) GetExt

func (m *SimpleMessage) GetExt() isSimpleMessage_Ext

func (*SimpleMessage) GetId

func (x *SimpleMessage) GetId() string

func (*SimpleMessage) GetLang

func (x *SimpleMessage) GetLang() string

func (*SimpleMessage) GetLineNum

func (x *SimpleMessage) GetLineNum() int64

func (*SimpleMessage) GetNo

func (x *SimpleMessage) GetNo() *Embedded

func (*SimpleMessage) GetNum

func (x *SimpleMessage) GetNum() int64

func (*SimpleMessage) GetStatus

func (x *SimpleMessage) GetStatus() *Embedded

func (*SimpleMessage) ProtoMessage

func (*SimpleMessage) ProtoMessage()

func (*SimpleMessage) ProtoReflect

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

func (*SimpleMessage) Reset

func (x *SimpleMessage) Reset()

func (*SimpleMessage) String

func (x *SimpleMessage) String() string

type SimpleMessage_En

type SimpleMessage_En struct {
	En int64 `protobuf:"varint,6,opt,name=en,proto3,oneof"`
}

type SimpleMessage_Lang

type SimpleMessage_Lang struct {
	Lang string `protobuf:"bytes,4,opt,name=lang,proto3,oneof"`
}

type SimpleMessage_LineNum

type SimpleMessage_LineNum struct {
	LineNum int64 `protobuf:"varint,3,opt,name=line_num,json=lineNum,proto3,oneof"`
}

type SimpleMessage_No

type SimpleMessage_No struct {
	No *Embedded `protobuf:"bytes,7,opt,name=no,proto3,oneof"`
}

type UnannotatedEchoServiceClient

type UnannotatedEchoServiceClient interface {
	Echo(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
	EchoBody(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
	EchoDelete(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
}

UnannotatedEchoServiceClient is the client API for UnannotatedEchoService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type UnannotatedEchoServiceServer

UnannotatedEchoServiceServer is the server API for UnannotatedEchoService service. All implementations should embed UnimplementedUnannotatedEchoServiceServer for forward compatibility

type UnannotatedEmbedded

type UnannotatedEmbedded struct {

	// Types that are assignable to Mark:
	//	*UnannotatedEmbedded_Progress
	//	*UnannotatedEmbedded_Note
	Mark isUnannotatedEmbedded_Mark `protobuf_oneof:"mark"`
	// contains filtered or unexported fields
}

func (*UnannotatedEmbedded) Descriptor deprecated

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

Deprecated: Use UnannotatedEmbedded.ProtoReflect.Descriptor instead.

func (*UnannotatedEmbedded) GetMark

func (m *UnannotatedEmbedded) GetMark() isUnannotatedEmbedded_Mark

func (*UnannotatedEmbedded) GetNote

func (x *UnannotatedEmbedded) GetNote() string

func (*UnannotatedEmbedded) GetProgress

func (x *UnannotatedEmbedded) GetProgress() int64

func (*UnannotatedEmbedded) ProtoMessage

func (*UnannotatedEmbedded) ProtoMessage()

func (*UnannotatedEmbedded) ProtoReflect

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

func (*UnannotatedEmbedded) Reset

func (x *UnannotatedEmbedded) Reset()

func (*UnannotatedEmbedded) String

func (x *UnannotatedEmbedded) String() string

type UnannotatedEmbedded_Note

type UnannotatedEmbedded_Note struct {
	Note string `protobuf:"bytes,2,opt,name=note,proto3,oneof"`
}

type UnannotatedEmbedded_Progress

type UnannotatedEmbedded_Progress struct {
	Progress int64 `protobuf:"varint,1,opt,name=progress,proto3,oneof"`
}

type UnannotatedSimpleMessage

type UnannotatedSimpleMessage struct {
	Id       string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Num      int64              `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	Duration *duration.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
	// Types that are assignable to Code:
	//	*UnannotatedSimpleMessage_LineNum
	//	*UnannotatedSimpleMessage_Lang
	Code   isUnannotatedSimpleMessage_Code `protobuf_oneof:"code"`
	Status *UnannotatedEmbedded            `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	// Types that are assignable to Ext:
	//	*UnannotatedSimpleMessage_En
	//	*UnannotatedSimpleMessage_No
	Ext isUnannotatedSimpleMessage_Ext `protobuf_oneof:"ext"`
	// contains filtered or unexported fields
}

func (*UnannotatedSimpleMessage) Descriptor deprecated

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

Deprecated: Use UnannotatedSimpleMessage.ProtoReflect.Descriptor instead.

func (*UnannotatedSimpleMessage) GetCode

func (m *UnannotatedSimpleMessage) GetCode() isUnannotatedSimpleMessage_Code

func (*UnannotatedSimpleMessage) GetDuration

func (x *UnannotatedSimpleMessage) GetDuration() *duration.Duration

func (*UnannotatedSimpleMessage) GetEn

func (x *UnannotatedSimpleMessage) GetEn() int64

func (*UnannotatedSimpleMessage) GetExt

func (m *UnannotatedSimpleMessage) GetExt() isUnannotatedSimpleMessage_Ext

func (*UnannotatedSimpleMessage) GetId

func (x *UnannotatedSimpleMessage) GetId() string

func (*UnannotatedSimpleMessage) GetLang

func (x *UnannotatedSimpleMessage) GetLang() string

func (*UnannotatedSimpleMessage) GetLineNum

func (x *UnannotatedSimpleMessage) GetLineNum() int64

func (*UnannotatedSimpleMessage) GetNo

func (*UnannotatedSimpleMessage) GetNum

func (x *UnannotatedSimpleMessage) GetNum() int64

func (*UnannotatedSimpleMessage) GetStatus

func (*UnannotatedSimpleMessage) ProtoMessage

func (*UnannotatedSimpleMessage) ProtoMessage()

func (*UnannotatedSimpleMessage) ProtoReflect

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

func (*UnannotatedSimpleMessage) Reset

func (x *UnannotatedSimpleMessage) Reset()

func (*UnannotatedSimpleMessage) String

func (x *UnannotatedSimpleMessage) String() string

type UnannotatedSimpleMessage_En

type UnannotatedSimpleMessage_En struct {
	En int64 `protobuf:"varint,7,opt,name=en,proto3,oneof"`
}

type UnannotatedSimpleMessage_Lang

type UnannotatedSimpleMessage_Lang struct {
	Lang string `protobuf:"bytes,5,opt,name=lang,proto3,oneof"`
}

type UnannotatedSimpleMessage_LineNum

type UnannotatedSimpleMessage_LineNum struct {
	LineNum int64 `protobuf:"varint,4,opt,name=line_num,json=lineNum,proto3,oneof"`
}

type UnannotatedSimpleMessage_No

type UnannotatedSimpleMessage_No struct {
	No *UnannotatedEmbedded `protobuf:"bytes,8,opt,name=no,proto3,oneof"`
}

type UnimplementedEchoServiceServer

type UnimplementedEchoServiceServer struct {
}

UnimplementedEchoServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedEchoServiceServer) Echo

func (UnimplementedEchoServiceServer) EchoBody

func (UnimplementedEchoServiceServer) EchoDelete

func (UnimplementedEchoServiceServer) EchoPatch

func (UnimplementedEchoServiceServer) EchoValidationRule

type UnimplementedUnannotatedEchoServiceServer

type UnimplementedUnannotatedEchoServiceServer struct {
}

UnimplementedUnannotatedEchoServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedUnannotatedEchoServiceServer) Echo

func (UnimplementedUnannotatedEchoServiceServer) EchoBody

func (UnimplementedUnannotatedEchoServiceServer) EchoDelete

type UnsafeEchoServiceServer added in v1.0.4

type UnsafeEchoServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.

type UnsafeUnannotatedEchoServiceServer added in v1.0.4

type UnsafeUnannotatedEchoServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeUnannotatedEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UnannotatedEchoServiceServer will result in compilation errors.

type ValidationRuleTestRequest

type ValidationRuleTestRequest struct {
	Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Num int64  `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidationRuleTestRequest) Descriptor deprecated

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

Deprecated: Use ValidationRuleTestRequest.ProtoReflect.Descriptor instead.

func (*ValidationRuleTestRequest) GetId

func (x *ValidationRuleTestRequest) GetId() string

func (*ValidationRuleTestRequest) GetNum

func (x *ValidationRuleTestRequest) GetNum() int64

func (*ValidationRuleTestRequest) ProtoMessage

func (*ValidationRuleTestRequest) ProtoMessage()

func (*ValidationRuleTestRequest) ProtoReflect

func (*ValidationRuleTestRequest) Reset

func (x *ValidationRuleTestRequest) Reset()

func (*ValidationRuleTestRequest) String

func (x *ValidationRuleTestRequest) String() string

type ValidationRuleTestResponse

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

func (*ValidationRuleTestResponse) Descriptor deprecated

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

Deprecated: Use ValidationRuleTestResponse.ProtoReflect.Descriptor instead.

func (*ValidationRuleTestResponse) ProtoMessage

func (*ValidationRuleTestResponse) ProtoMessage()

func (*ValidationRuleTestResponse) ProtoReflect

func (*ValidationRuleTestResponse) Reset

func (x *ValidationRuleTestResponse) Reset()

func (*ValidationRuleTestResponse) String

func (x *ValidationRuleTestResponse) String() string

Jump to

Keyboard shortcuts

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