Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
- type CanonicalRecord
- func (*CanonicalRecord) Descriptor() ([]byte, []int)deprecated
- func (x *CanonicalRecord) GetAttributes() *structpb.Struct
- func (x *CanonicalRecord) GetBoolValue() bool
- func (x *CanonicalRecord) GetBytesValue() []byte
- func (x *CanonicalRecord) GetChildren() []*NestedRecord
- func (x *CanonicalRecord) GetChoice() isCanonicalRecord_Choice
- func (x *CanonicalRecord) GetChoiceCount() int32
- func (x *CanonicalRecord) GetChoiceName() string
- func (x *CanonicalRecord) GetCounters() map[string]uint64
- func (x *CanonicalRecord) GetCreatedAt() *timestamppb.Timestamp
- func (x *CanonicalRecord) GetDoubleValue() float64
- func (x *CanonicalRecord) GetElapsed() *durationpb.Duration
- func (x *CanonicalRecord) GetFixed32Value() uint32
- func (x *CanonicalRecord) GetFixed64Value() uint64
- func (x *CanonicalRecord) GetFloatValue() float32
- func (x *CanonicalRecord) GetInt32Value() int32
- func (x *CanonicalRecord) GetInt64Value() int64
- func (x *CanonicalRecord) GetLabels() []string
- func (x *CanonicalRecord) GetNested() *NestedRecord
- func (x *CanonicalRecord) GetOpaque() *anypb.Any
- func (x *CanonicalRecord) GetOptionalNote() string
- func (x *CanonicalRecord) GetSfixed32Value() int32
- func (x *CanonicalRecord) GetSfixed64Value() int64
- func (x *CanonicalRecord) GetSint32Value() int32
- func (x *CanonicalRecord) GetSint64Value() int64
- func (x *CanonicalRecord) GetState() DataState
- func (x *CanonicalRecord) GetStringValue() string
- func (x *CanonicalRecord) GetUint32Value() uint32
- func (x *CanonicalRecord) GetUint64Value() uint64
- func (x *CanonicalRecord) GetWrappedCount() *wrapperspb.Int32Value
- func (*CanonicalRecord) ProtoMessage()
- func (x *CanonicalRecord) ProtoReflect() protoreflect.Message
- func (x *CanonicalRecord) Reset()
- func (x *CanonicalRecord) String() string
- type CanonicalRecord_ChoiceCount
- type CanonicalRecord_ChoiceName
- type DataState
- type GreetGroupRequest
- type GreetGroupResponse
- func (*GreetGroupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GreetGroupResponse) GetCount() int32
- func (x *GreetGroupResponse) GetMessages() []string
- func (*GreetGroupResponse) ProtoMessage()
- func (x *GreetGroupResponse) ProtoReflect() protoreflect.Message
- func (x *GreetGroupResponse) Reset()
- func (x *GreetGroupResponse) String() string
- type GreetRequest
- func (*GreetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GreetRequest) GetAccountSequence() int64
- func (x *GreetRequest) GetMood() Mood
- func (x *GreetRequest) GetName() string
- func (x *GreetRequest) GetTags() map[string]string
- func (*GreetRequest) ProtoMessage()
- func (x *GreetRequest) ProtoReflect() protoreflect.Message
- func (x *GreetRequest) Reset()
- func (x *GreetRequest) String() string
- type GreetResponse
- func (*GreetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GreetResponse) GetMessage() string
- func (x *GreetResponse) GetMood() Mood
- func (x *GreetResponse) GetResponseCount() int64
- func (x *GreetResponse) GetResponseLabel() string
- func (x *GreetResponse) GetTags() map[string]string
- func (*GreetResponse) ProtoMessage()
- func (x *GreetResponse) ProtoReflect() protoreflect.Message
- func (x *GreetResponse) Reset()
- func (x *GreetResponse) String() string
- type GreetServiceClient
- type GreetServiceServer
- type GreetService_StreamGreetClient
- type GreetService_StreamGreetServer
- type Mood
- type NestedRecord
- func (*NestedRecord) Descriptor() ([]byte, []int)deprecated
- func (x *NestedRecord) GetId() int64
- func (x *NestedRecord) GetLabel() string
- func (*NestedRecord) ProtoMessage()
- func (x *NestedRecord) ProtoReflect() protoreflect.Message
- func (x *NestedRecord) Reset()
- func (x *NestedRecord) String() string
- type Person
- type Proto2Record
- func (*Proto2Record) Descriptor() ([]byte, []int)deprecated
- func (x *Proto2Record) GetId() int64
- func (x *Proto2Record) GetLabel() string
- func (*Proto2Record) ProtoMessage()
- func (x *Proto2Record) ProtoReflect() protoreflect.Message
- func (x *Proto2Record) Reset()
- func (x *Proto2Record) String() string
- type RecursiveRecord
- type StreamGreetRequest
- func (*StreamGreetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamGreetRequest) GetCount() int32
- func (x *StreamGreetRequest) GetName() string
- func (*StreamGreetRequest) ProtoMessage()
- func (x *StreamGreetRequest) ProtoReflect() protoreflect.Message
- func (x *StreamGreetRequest) Reset()
- func (x *StreamGreetRequest) String() string
- type UnimplementedGreetServiceServer
- func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
- func (UnimplementedGreetServiceServer) GreetGroup(context.Context, *GreetGroupRequest) (*GreetGroupResponse, error)
- func (UnimplementedGreetServiceServer) StreamGreet(*StreamGreetRequest, grpc.ServerStreamingServer[GreetResponse]) error
- type UnsafeGreetServiceServer
Constants ¶
const ( GreetService_Greet_FullMethodName = "/greet.v1.GreetService/Greet" GreetService_GreetGroup_FullMethodName = "/greet.v1.GreetService/GreetGroup" GreetService_StreamGreet_FullMethodName = "/greet.v1.GreetService/StreamGreet" )
const (
Default_Proto2Record_Label = string("unknown")
)
Default values for Proto2Record fields.
Variables ¶
var ( DataState_name = map[int32]string{ 0: "DATA_STATE_UNSPECIFIED", 1: "DATA_STATE_READY", } DataState_value = map[string]int32{ "DATA_STATE_UNSPECIFIED": 0, "DATA_STATE_READY": 1, "DATA_STATE_ACTIVE": 1, } )
Enum value maps for DataState.
var ( Mood_name = map[int32]string{ 0: "MOOD_UNSPECIFIED", 1: "MOOD_HAPPY", 2: "MOOD_SAD", } Mood_value = map[string]int32{ "MOOD_UNSPECIFIED": 0, "MOOD_HAPPY": 1, "MOOD_SAD": 2, } )
Enum value maps for Mood.
var File_data_proto protoreflect.FileDescriptor
var File_data_proto2_proto protoreflect.FileDescriptor
var File_greet_proto protoreflect.FileDescriptor
var GreetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greet.v1.GreetService", HandlerType: (*GreetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _GreetService_Greet_Handler, }, { MethodName: "GreetGroup", Handler: _GreetService_GreetGroup_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamGreet", Handler: _GreetService_StreamGreet_Handler, ServerStreams: true, }, }, Metadata: "greet.proto", }
GreetService_ServiceDesc is the grpc.ServiceDesc for GreetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServiceServer ¶
func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
Types ¶
type CanonicalRecord ¶ added in v0.7.0
type CanonicalRecord struct {
// A double-precision value.
DoubleValue float64 `protobuf:"fixed64,1,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
// A single-precision value.
FloatValue float32 `protobuf:"fixed32,2,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
// A variable-width signed 64-bit value.
Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
// A variable-width unsigned 64-bit value.
Uint64Value uint64 `protobuf:"varint,4,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
// A variable-width signed 32-bit value.
Int32Value int32 `protobuf:"varint,5,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"`
// A fixed-width unsigned 64-bit value.
Fixed64Value uint64 `protobuf:"fixed64,6,opt,name=fixed64_value,json=fixed64Value,proto3" json:"fixed64_value,omitempty"`
// A fixed-width unsigned 32-bit value.
Fixed32Value uint32 `protobuf:"fixed32,7,opt,name=fixed32_value,json=fixed32Value,proto3" json:"fixed32_value,omitempty"`
// A boolean value.
BoolValue bool `protobuf:"varint,8,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
// A UTF-8 value.
StringValue string `protobuf:"bytes,9,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
// An opaque binary value.
BytesValue []byte `protobuf:"bytes,10,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
// A variable-width unsigned 32-bit value.
Uint32Value uint32 `protobuf:"varint,11,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
// A fixed-width signed 32-bit value.
Sfixed32Value int32 `protobuf:"fixed32,12,opt,name=sfixed32_value,json=sfixed32Value,proto3" json:"sfixed32_value,omitempty"`
// A fixed-width signed 64-bit value.
Sfixed64Value int64 `protobuf:"fixed64,13,opt,name=sfixed64_value,json=sfixed64Value,proto3" json:"sfixed64_value,omitempty"`
// A zig-zag encoded signed 32-bit value.
Sint32Value int32 `protobuf:"zigzag32,14,opt,name=sint32_value,json=sint32Value,proto3" json:"sint32_value,omitempty"`
// A zig-zag encoded signed 64-bit value.
Sint64Value int64 `protobuf:"zigzag64,15,opt,name=sint64_value,json=sint64Value,proto3" json:"sint64_value,omitempty"`
// An open numeric enum.
State DataState `protobuf:"varint,16,opt,name=state,proto3,enum=data.v1.DataState" json:"state,omitempty"`
// A field with explicit scalar presence.
OptionalNote *string `protobuf:"bytes,17,opt,name=optional_note,json=optionalNote,proto3,oneof" json:"optional_note,omitempty"`
// A nested message with explicit presence.
Nested *NestedRecord `protobuf:"bytes,18,opt,name=nested,proto3" json:"nested,omitempty"`
// A scalar list.
Labels []string `protobuf:"bytes,19,rep,name=labels,proto3" json:"labels,omitempty"`
// A nested-message list.
Children []*NestedRecord `protobuf:"bytes,20,rep,name=children,proto3" json:"children,omitempty"`
// A typed protobuf map.
Counters map[string]uint64 `` /* 145-byte string literal not displayed */
// Mutually exclusive values whose selected default remains observable.
//
// Types that are valid to be assigned to Choice:
//
// *CanonicalRecord_ChoiceCount
// *CanonicalRecord_ChoiceName
Choice isCanonicalRecord_Choice `protobuf_oneof:"choice"`
// A UTC instant with nanosecond precision.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,24,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// A signed duration with nanosecond precision.
Elapsed *durationpb.Duration `protobuf:"bytes,25,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
// A nullable wrapped scalar.
WrappedCount *wrapperspb.Int32Value `protobuf:"bytes,26,opt,name=wrapped_count,json=wrappedCount,proto3" json:"wrapped_count,omitempty"`
// A dynamic JSON object.
Attributes *structpb.Struct `protobuf:"bytes,27,opt,name=attributes,proto3" json:"attributes,omitempty"`
// A dynamically typed protobuf value.
Opaque *anypb.Any `protobuf:"bytes,28,opt,name=opaque,proto3" json:"opaque,omitempty"`
// contains filtered or unexported fields
}
CanonicalRecord exercises every protobuf shape supported by data projection.
func (*CanonicalRecord) Descriptor
deprecated
added in
v0.7.0
func (*CanonicalRecord) Descriptor() ([]byte, []int)
Deprecated: Use CanonicalRecord.ProtoReflect.Descriptor instead.
func (*CanonicalRecord) GetAttributes ¶ added in v0.7.0
func (x *CanonicalRecord) GetAttributes() *structpb.Struct
func (*CanonicalRecord) GetBoolValue ¶ added in v0.7.0
func (x *CanonicalRecord) GetBoolValue() bool
func (*CanonicalRecord) GetBytesValue ¶ added in v0.7.0
func (x *CanonicalRecord) GetBytesValue() []byte
func (*CanonicalRecord) GetChildren ¶ added in v0.7.0
func (x *CanonicalRecord) GetChildren() []*NestedRecord
func (*CanonicalRecord) GetChoice ¶ added in v0.7.0
func (x *CanonicalRecord) GetChoice() isCanonicalRecord_Choice
func (*CanonicalRecord) GetChoiceCount ¶ added in v0.7.0
func (x *CanonicalRecord) GetChoiceCount() int32
func (*CanonicalRecord) GetChoiceName ¶ added in v0.7.0
func (x *CanonicalRecord) GetChoiceName() string
func (*CanonicalRecord) GetCounters ¶ added in v0.7.0
func (x *CanonicalRecord) GetCounters() map[string]uint64
func (*CanonicalRecord) GetCreatedAt ¶ added in v0.7.0
func (x *CanonicalRecord) GetCreatedAt() *timestamppb.Timestamp
func (*CanonicalRecord) GetDoubleValue ¶ added in v0.7.0
func (x *CanonicalRecord) GetDoubleValue() float64
func (*CanonicalRecord) GetElapsed ¶ added in v0.7.0
func (x *CanonicalRecord) GetElapsed() *durationpb.Duration
func (*CanonicalRecord) GetFixed32Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetFixed32Value() uint32
func (*CanonicalRecord) GetFixed64Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetFixed64Value() uint64
func (*CanonicalRecord) GetFloatValue ¶ added in v0.7.0
func (x *CanonicalRecord) GetFloatValue() float32
func (*CanonicalRecord) GetInt32Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetInt32Value() int32
func (*CanonicalRecord) GetInt64Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetInt64Value() int64
func (*CanonicalRecord) GetLabels ¶ added in v0.7.0
func (x *CanonicalRecord) GetLabels() []string
func (*CanonicalRecord) GetNested ¶ added in v0.7.0
func (x *CanonicalRecord) GetNested() *NestedRecord
func (*CanonicalRecord) GetOpaque ¶ added in v0.7.0
func (x *CanonicalRecord) GetOpaque() *anypb.Any
func (*CanonicalRecord) GetOptionalNote ¶ added in v0.7.0
func (x *CanonicalRecord) GetOptionalNote() string
func (*CanonicalRecord) GetSfixed32Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetSfixed32Value() int32
func (*CanonicalRecord) GetSfixed64Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetSfixed64Value() int64
func (*CanonicalRecord) GetSint32Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetSint32Value() int32
func (*CanonicalRecord) GetSint64Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetSint64Value() int64
func (*CanonicalRecord) GetState ¶ added in v0.7.0
func (x *CanonicalRecord) GetState() DataState
func (*CanonicalRecord) GetStringValue ¶ added in v0.7.0
func (x *CanonicalRecord) GetStringValue() string
func (*CanonicalRecord) GetUint32Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetUint32Value() uint32
func (*CanonicalRecord) GetUint64Value ¶ added in v0.7.0
func (x *CanonicalRecord) GetUint64Value() uint64
func (*CanonicalRecord) GetWrappedCount ¶ added in v0.7.0
func (x *CanonicalRecord) GetWrappedCount() *wrapperspb.Int32Value
func (*CanonicalRecord) ProtoMessage ¶ added in v0.7.0
func (*CanonicalRecord) ProtoMessage()
func (*CanonicalRecord) ProtoReflect ¶ added in v0.7.0
func (x *CanonicalRecord) ProtoReflect() protoreflect.Message
func (*CanonicalRecord) Reset ¶ added in v0.7.0
func (x *CanonicalRecord) Reset()
func (*CanonicalRecord) String ¶ added in v0.7.0
func (x *CanonicalRecord) String() string
type CanonicalRecord_ChoiceCount ¶ added in v0.7.0
type CanonicalRecord_ChoiceCount struct {
// A numeric choice.
ChoiceCount int32 `protobuf:"varint,22,opt,name=choice_count,json=choiceCount,proto3,oneof"`
}
type CanonicalRecord_ChoiceName ¶ added in v0.7.0
type CanonicalRecord_ChoiceName struct {
// A textual choice.
ChoiceName string `protobuf:"bytes,23,opt,name=choice_name,json=choiceName,proto3,oneof"`
}
type DataState ¶ added in v0.7.0
type DataState int32
DataState demonstrates aliases while retaining the numeric enum domain.
func (DataState) Descriptor ¶ added in v0.7.0
func (DataState) Descriptor() protoreflect.EnumDescriptor
func (DataState) EnumDescriptor
deprecated
added in
v0.7.0
func (DataState) Number ¶ added in v0.7.0
func (x DataState) Number() protoreflect.EnumNumber
func (DataState) Type ¶ added in v0.7.0
func (DataState) Type() protoreflect.EnumType
type GreetGroupRequest ¶
type GreetGroupRequest struct {
// People to greet.
People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
// contains filtered or unexported fields
}
Request to greet a group of people.
func (*GreetGroupRequest) Descriptor
deprecated
func (*GreetGroupRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetGroupRequest.ProtoReflect.Descriptor instead.
func (*GreetGroupRequest) GetPeople ¶
func (x *GreetGroupRequest) GetPeople() []*Person
func (*GreetGroupRequest) ProtoMessage ¶
func (*GreetGroupRequest) ProtoMessage()
func (*GreetGroupRequest) ProtoReflect ¶
func (x *GreetGroupRequest) ProtoReflect() protoreflect.Message
func (*GreetGroupRequest) Reset ¶
func (x *GreetGroupRequest) Reset()
func (*GreetGroupRequest) String ¶
func (x *GreetGroupRequest) String() string
type GreetGroupResponse ¶
type GreetGroupResponse struct {
// Individual greetings.
Messages []string `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
// Number of people greeted.
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// contains filtered or unexported fields
}
Response with greetings for the group.
func (*GreetGroupResponse) Descriptor
deprecated
func (*GreetGroupResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetGroupResponse.ProtoReflect.Descriptor instead.
func (*GreetGroupResponse) GetCount ¶
func (x *GreetGroupResponse) GetCount() int32
func (*GreetGroupResponse) GetMessages ¶
func (x *GreetGroupResponse) GetMessages() []string
func (*GreetGroupResponse) ProtoMessage ¶
func (*GreetGroupResponse) ProtoMessage()
func (*GreetGroupResponse) ProtoReflect ¶
func (x *GreetGroupResponse) ProtoReflect() protoreflect.Message
func (*GreetGroupResponse) Reset ¶
func (x *GreetGroupResponse) Reset()
func (*GreetGroupResponse) String ¶
func (x *GreetGroupResponse) String() string
type GreetRequest ¶
type GreetRequest struct {
// Name of the person to greet.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional mood for the greeting.
Mood *Mood `protobuf:"varint,2,opt,name=mood,proto3,enum=greet.v1.Mood,oneof" json:"mood,omitempty"`
// Optional metadata tags.
Tags map[string]string `` /* 135-byte string literal not displayed */
// Optional 64-bit sequence with an explicit ProtoJSON field name.
AccountSequence *int64 `protobuf:"varint,4,opt,name=account_sequence,json=wireSequenceId,proto3,oneof" json:"account_sequence,omitempty"`
// contains filtered or unexported fields
}
Request for the Greet RPC.
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetAccountSequence ¶ added in v0.10.0
func (x *GreetRequest) GetAccountSequence() int64
func (*GreetRequest) GetMood ¶
func (x *GreetRequest) GetMood() Mood
func (*GreetRequest) GetName ¶
func (x *GreetRequest) GetName() string
func (*GreetRequest) GetTags ¶
func (x *GreetRequest) GetTags() map[string]string
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) Reset ¶
func (x *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (x *GreetRequest) String() string
type GreetResponse ¶
type GreetResponse struct {
// The greeting message.
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// Mood used in the greeting.
Mood Mood `protobuf:"varint,2,opt,name=mood,proto3,enum=greet.v1.Mood" json:"mood,omitempty"`
// Tags echoed back.
Tags map[string]string `` /* 135-byte string literal not displayed */
// A label with an explicit ProtoJSON field name.
ResponseLabel string `protobuf:"bytes,4,opt,name=response_label,json=wireDisplayLabel,proto3" json:"response_label,omitempty"`
// A 64-bit count emitted as a ProtoJSON string.
ResponseCount int64 `protobuf:"varint,5,opt,name=response_count,json=wireResponseCount,proto3" json:"response_count,omitempty"`
// contains filtered or unexported fields
}
Response from the Greet RPC.
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetMessage ¶
func (x *GreetResponse) GetMessage() string
func (*GreetResponse) GetMood ¶
func (x *GreetResponse) GetMood() Mood
func (*GreetResponse) GetResponseCount ¶ added in v0.10.0
func (x *GreetResponse) GetResponseCount() int64
func (*GreetResponse) GetResponseLabel ¶ added in v0.10.0
func (x *GreetResponse) GetResponseLabel() string
func (*GreetResponse) GetTags ¶
func (x *GreetResponse) GetTags() map[string]string
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) ProtoReflect ¶
func (x *GreetResponse) ProtoReflect() protoreflect.Message
func (*GreetResponse) Reset ¶
func (x *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (x *GreetResponse) String() string
type GreetServiceClient ¶
type GreetServiceClient interface {
// Greet a person by name.
Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error)
// Greet multiple people at once.
GreetGroup(ctx context.Context, in *GreetGroupRequest, opts ...grpc.CallOption) (*GreetGroupResponse, error)
// Stream greetings — one response message per chunk.
StreamGreet(ctx context.Context, in *StreamGreetRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GreetResponse], error)
}
GreetServiceClient is the client API for GreetService 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.
A simple greeting service.
func NewGreetServiceClient ¶
func NewGreetServiceClient(cc grpc.ClientConnInterface) GreetServiceClient
type GreetServiceServer ¶
type GreetServiceServer interface {
// Greet a person by name.
Greet(context.Context, *GreetRequest) (*GreetResponse, error)
// Greet multiple people at once.
GreetGroup(context.Context, *GreetGroupRequest) (*GreetGroupResponse, error)
// Stream greetings — one response message per chunk.
StreamGreet(*StreamGreetRequest, grpc.ServerStreamingServer[GreetResponse]) error
// contains filtered or unexported methods
}
GreetServiceServer is the server API for GreetService service. All implementations must embed UnimplementedGreetServiceServer for forward compatibility.
A simple greeting service.
type GreetService_StreamGreetClient ¶
type GreetService_StreamGreetClient = grpc.ServerStreamingClient[GreetResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_StreamGreetServer ¶
type GreetService_StreamGreetServer = grpc.ServerStreamingServer[GreetResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Mood ¶
type Mood int32
Mood of a greeting.
func (Mood) Descriptor ¶
func (Mood) Descriptor() protoreflect.EnumDescriptor
func (Mood) EnumDescriptor
deprecated
func (Mood) Number ¶
func (x Mood) Number() protoreflect.EnumNumber
func (Mood) Type ¶
func (Mood) Type() protoreflect.EnumType
type NestedRecord ¶ added in v0.7.0
type NestedRecord struct {
// Nested numeric identity.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// Nested optional label.
Label *string `protobuf:"bytes,2,opt,name=label,proto3,oneof" json:"label,omitempty"`
// contains filtered or unexported fields
}
NestedRecord is embedded in singular and repeated fields.
func (*NestedRecord) Descriptor
deprecated
added in
v0.7.0
func (*NestedRecord) Descriptor() ([]byte, []int)
Deprecated: Use NestedRecord.ProtoReflect.Descriptor instead.
func (*NestedRecord) GetId ¶ added in v0.7.0
func (x *NestedRecord) GetId() int64
func (*NestedRecord) GetLabel ¶ added in v0.7.0
func (x *NestedRecord) GetLabel() string
func (*NestedRecord) ProtoMessage ¶ added in v0.7.0
func (*NestedRecord) ProtoMessage()
func (*NestedRecord) ProtoReflect ¶ added in v0.7.0
func (x *NestedRecord) ProtoReflect() protoreflect.Message
func (*NestedRecord) Reset ¶ added in v0.7.0
func (x *NestedRecord) Reset()
func (*NestedRecord) String ¶ added in v0.7.0
func (x *NestedRecord) String() string
type Person ¶
type Person struct {
// Name of the person.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Their mood.
Mood Mood `protobuf:"varint,2,opt,name=mood,proto3,enum=greet.v1.Mood" json:"mood,omitempty"`
// contains filtered or unexported fields
}
A person in a group.
func (*Person) Descriptor
deprecated
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type Proto2Record ¶ added in v0.7.0
type Proto2Record struct {
// A required identifier.
Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
// An optional label with a declared protobuf default.
Label *string `protobuf:"bytes,2,opt,name=label,def=unknown" json:"label,omitempty"`
// contains filtered or unexported fields
}
Proto2Record exercises explicit optional, required, and declared defaults.
func (*Proto2Record) Descriptor
deprecated
added in
v0.7.0
func (*Proto2Record) Descriptor() ([]byte, []int)
Deprecated: Use Proto2Record.ProtoReflect.Descriptor instead.
func (*Proto2Record) GetId ¶ added in v0.7.0
func (x *Proto2Record) GetId() int64
func (*Proto2Record) GetLabel ¶ added in v0.7.0
func (x *Proto2Record) GetLabel() string
func (*Proto2Record) ProtoMessage ¶ added in v0.7.0
func (*Proto2Record) ProtoMessage()
func (*Proto2Record) ProtoReflect ¶ added in v0.7.0
func (x *Proto2Record) ProtoReflect() protoreflect.Message
func (*Proto2Record) Reset ¶ added in v0.7.0
func (x *Proto2Record) Reset()
func (*Proto2Record) String ¶ added in v0.7.0
func (x *Proto2Record) String() string
type RecursiveRecord ¶ added in v0.7.0
type RecursiveRecord struct {
// Recursive parent link.
Parent *RecursiveRecord `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// contains filtered or unexported fields
}
RecursiveRecord proves recursive row schemas fail instead of recursing or silently becoming untyped JSON.
func (*RecursiveRecord) Descriptor
deprecated
added in
v0.7.0
func (*RecursiveRecord) Descriptor() ([]byte, []int)
Deprecated: Use RecursiveRecord.ProtoReflect.Descriptor instead.
func (*RecursiveRecord) GetParent ¶ added in v0.7.0
func (x *RecursiveRecord) GetParent() *RecursiveRecord
func (*RecursiveRecord) ProtoMessage ¶ added in v0.7.0
func (*RecursiveRecord) ProtoMessage()
func (*RecursiveRecord) ProtoReflect ¶ added in v0.7.0
func (x *RecursiveRecord) ProtoReflect() protoreflect.Message
func (*RecursiveRecord) Reset ¶ added in v0.7.0
func (x *RecursiveRecord) Reset()
func (*RecursiveRecord) String ¶ added in v0.7.0
func (x *RecursiveRecord) String() string
type StreamGreetRequest ¶
type StreamGreetRequest struct {
// Name of the person to greet.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Number of greetings to emit (default 1).
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// contains filtered or unexported fields
}
Request for the StreamGreet RPC.
func (*StreamGreetRequest) Descriptor
deprecated
func (*StreamGreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamGreetRequest.ProtoReflect.Descriptor instead.
func (*StreamGreetRequest) GetCount ¶
func (x *StreamGreetRequest) GetCount() int32
func (*StreamGreetRequest) GetName ¶
func (x *StreamGreetRequest) GetName() string
func (*StreamGreetRequest) ProtoMessage ¶
func (*StreamGreetRequest) ProtoMessage()
func (*StreamGreetRequest) ProtoReflect ¶
func (x *StreamGreetRequest) ProtoReflect() protoreflect.Message
func (*StreamGreetRequest) Reset ¶
func (x *StreamGreetRequest) Reset()
func (*StreamGreetRequest) String ¶
func (x *StreamGreetRequest) String() string
type UnimplementedGreetServiceServer ¶
type UnimplementedGreetServiceServer struct{}
UnimplementedGreetServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedGreetServiceServer) Greet ¶
func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
func (UnimplementedGreetServiceServer) GreetGroup ¶
func (UnimplementedGreetServiceServer) GreetGroup(context.Context, *GreetGroupRequest) (*GreetGroupResponse, error)
func (UnimplementedGreetServiceServer) StreamGreet ¶
func (UnimplementedGreetServiceServer) StreamGreet(*StreamGreetRequest, grpc.ServerStreamingServer[GreetResponse]) error
type UnsafeGreetServiceServer ¶
type UnsafeGreetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServiceServer will result in compilation errors.