Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFooServiceServer(s grpc.ServiceRegistrar, srv FooServiceServer)
- func RegisterFooTopicServer(s grpc.ServiceRegistrar, srv FooTopicServer)
- type Bar
- type Enum
- type FooMessage
- func (*FooMessage) Descriptor() ([]byte, []int)deprecated
- func (x *FooMessage) GetField() string
- func (x *FooMessage) GetId() string
- func (x *FooMessage) GetName() string
- func (*FooMessage) ProtoMessage()
- func (x *FooMessage) ProtoReflect() protoreflect.Message
- func (x *FooMessage) Reset()
- func (x *FooMessage) String() string
- type FooServiceClient
- type FooServiceServer
- type FooTopicClient
- type FooTopicServer
- type GetFooRequest
- func (*GetFooRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetFooRequest) GetId() string
- func (x *GetFooRequest) GetNumber() int64
- func (x *GetFooRequest) GetNumbers() []float32
- func (*GetFooRequest) ProtoMessage()
- func (x *GetFooRequest) ProtoReflect() protoreflect.Message
- func (x *GetFooRequest) Reset()
- func (x *GetFooRequest) String() string
- type GetFooResponse
- func (*GetFooResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetFooResponse) GetField() string
- func (x *GetFooResponse) GetId() string
- func (x *GetFooResponse) GetName() string
- func (*GetFooResponse) ProtoMessage()
- func (x *GetFooResponse) ProtoReflect() protoreflect.Message
- func (x *GetFooResponse) Reset()
- func (x *GetFooResponse) String() string
- type PostFooRequest
- func (*PostFooRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PostFooRequest) GetEnum() Enum
- func (m *PostFooRequest) GetNakedOneof() isPostFooRequest_NakedOneof
- func (x *PostFooRequest) GetOFloat() float32
- func (x *PostFooRequest) GetOString() string
- func (x *PostFooRequest) GetOneBar() *Bar
- func (x *PostFooRequest) GetOneofEnum() Enum
- func (x *PostFooRequest) GetOneofFloat() float32
- func (x *PostFooRequest) GetOneofString() string
- func (x *PostFooRequest) GetRBars() []*Bar
- func (x *PostFooRequest) GetREnum() []Enum
- func (x *PostFooRequest) GetRFloat() []float32
- func (x *PostFooRequest) GetRString() []string
- func (x *PostFooRequest) GetRTs() []*timestamppb.Timestamp
- func (x *PostFooRequest) GetSBar() *Bar
- func (x *PostFooRequest) GetSFloat() float32
- func (x *PostFooRequest) GetSString() string
- func (x *PostFooRequest) GetTs() *timestamppb.Timestamp
- func (*PostFooRequest) ProtoMessage()
- func (x *PostFooRequest) ProtoReflect() protoreflect.Message
- func (x *PostFooRequest) Reset()
- func (x *PostFooRequest) String() string
- type PostFooRequest_OneBar
- type PostFooRequest_OneofEnum
- type PostFooRequest_OneofFloat
- type PostFooRequest_OneofString
- type PostFooResponse
- func (*PostFooResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PostFooResponse) GetField() string
- func (x *PostFooResponse) GetId() string
- func (x *PostFooResponse) GetName() string
- func (*PostFooResponse) ProtoMessage()
- func (x *PostFooResponse) ProtoReflect() protoreflect.Message
- func (x *PostFooResponse) Reset()
- func (x *PostFooResponse) String() string
- type UnimplementedFooServiceServer
- type UnimplementedFooTopicServer
- type UnsafeFooServiceServer
- type UnsafeFooTopicServer
Constants ¶
const ( FooService_GetFoo_FullMethodName = "/test.v1.FooService/GetFoo" FooService_PostFoo_FullMethodName = "/test.v1.FooService/PostFoo" )
const (
FooTopic_Foo_FullMethodName = "/test.v1.FooTopic/Foo"
)
Variables ¶
var ( Enum_name = map[int32]string{ 0: "ENUM_UNSPECIFIED", 1: "ENUM_VALUE1", 2: "ENUM_VALUE2", } Enum_value = map[string]int32{ "ENUM_UNSPECIFIED": 0, "ENUM_VALUE1": 1, "ENUM_VALUE2": 2, } )
Enum value maps for Enum.
var File_test_v1_test_proto protoreflect.FileDescriptor
var FooService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.v1.FooService", HandlerType: (*FooServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFoo", Handler: _FooService_GetFoo_Handler, }, { MethodName: "PostFoo", Handler: _FooService_PostFoo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test/v1/test.proto", }
FooService_ServiceDesc is the grpc.ServiceDesc for FooService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var FooTopic_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.v1.FooTopic", HandlerType: (*FooTopicServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Foo", Handler: _FooTopic_Foo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test/v1/test.proto", }
FooTopic_ServiceDesc is the grpc.ServiceDesc for FooTopic service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFooServiceServer ¶
func RegisterFooServiceServer(s grpc.ServiceRegistrar, srv FooServiceServer)
func RegisterFooTopicServer ¶
func RegisterFooTopicServer(s grpc.ServiceRegistrar, srv FooTopicServer)
Types ¶
type Bar ¶
type Bar struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*Bar) Descriptor
deprecated
func (*Bar) ProtoMessage ¶
func (*Bar) ProtoMessage()
func (*Bar) ProtoReflect ¶
func (x *Bar) ProtoReflect() protoreflect.Message
type Enum ¶
type Enum int32
func (Enum) Descriptor ¶
func (Enum) Descriptor() protoreflect.EnumDescriptor
func (Enum) EnumDescriptor
deprecated
func (Enum) Number ¶
func (x Enum) Number() protoreflect.EnumNumber
func (Enum) Type ¶
func (Enum) Type() protoreflect.EnumType
type FooMessage ¶
type FooMessage struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*FooMessage) Descriptor
deprecated
func (*FooMessage) Descriptor() ([]byte, []int)
Deprecated: Use FooMessage.ProtoReflect.Descriptor instead.
func (*FooMessage) GetField ¶
func (x *FooMessage) GetField() string
func (*FooMessage) GetId ¶
func (x *FooMessage) GetId() string
func (*FooMessage) GetName ¶
func (x *FooMessage) GetName() string
func (*FooMessage) ProtoMessage ¶
func (*FooMessage) ProtoMessage()
func (*FooMessage) ProtoReflect ¶
func (x *FooMessage) ProtoReflect() protoreflect.Message
func (*FooMessage) Reset ¶
func (x *FooMessage) Reset()
func (*FooMessage) String ¶
func (x *FooMessage) String() string
type FooServiceClient ¶
type FooServiceClient interface { GetFoo(ctx context.Context, in *GetFooRequest, opts ...grpc.CallOption) (*GetFooResponse, error) PostFoo(ctx context.Context, in *PostFooRequest, opts ...grpc.CallOption) (*PostFooResponse, error) }
FooServiceClient is the client API for FooService 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.
func NewFooServiceClient ¶
func NewFooServiceClient(cc grpc.ClientConnInterface) FooServiceClient
type FooServiceServer ¶
type FooServiceServer interface { GetFoo(context.Context, *GetFooRequest) (*GetFooResponse, error) PostFoo(context.Context, *PostFooRequest) (*PostFooResponse, error) // contains filtered or unexported methods }
FooServiceServer is the server API for FooService service. All implementations must embed UnimplementedFooServiceServer for forward compatibility
type FooTopicClient ¶
type FooTopicClient interface {
Foo(ctx context.Context, in *FooMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
FooTopicClient is the client API for FooTopic 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.
func NewFooTopicClient ¶
func NewFooTopicClient(cc grpc.ClientConnInterface) FooTopicClient
type FooTopicServer ¶
type FooTopicServer interface { Foo(context.Context, *FooMessage) (*emptypb.Empty, error) // contains filtered or unexported methods }
FooTopicServer is the server API for FooTopic service. All implementations must embed UnimplementedFooTopicServer for forward compatibility
type GetFooRequest ¶
type GetFooRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` Numbers []float32 `protobuf:"fixed32,3,rep,packed,name=numbers,proto3" json:"numbers,omitempty"` // contains filtered or unexported fields }
func (*GetFooRequest) Descriptor
deprecated
func (*GetFooRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetFooRequest.ProtoReflect.Descriptor instead.
func (*GetFooRequest) GetId ¶
func (x *GetFooRequest) GetId() string
func (*GetFooRequest) GetNumber ¶
func (x *GetFooRequest) GetNumber() int64
func (*GetFooRequest) GetNumbers ¶
func (x *GetFooRequest) GetNumbers() []float32
func (*GetFooRequest) ProtoMessage ¶
func (*GetFooRequest) ProtoMessage()
func (*GetFooRequest) ProtoReflect ¶
func (x *GetFooRequest) ProtoReflect() protoreflect.Message
func (*GetFooRequest) Reset ¶
func (x *GetFooRequest) Reset()
func (*GetFooRequest) String ¶
func (x *GetFooRequest) String() string
type GetFooResponse ¶
type GetFooResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*GetFooResponse) Descriptor
deprecated
func (*GetFooResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFooResponse.ProtoReflect.Descriptor instead.
func (*GetFooResponse) GetField ¶
func (x *GetFooResponse) GetField() string
func (*GetFooResponse) GetId ¶
func (x *GetFooResponse) GetId() string
func (*GetFooResponse) GetName ¶
func (x *GetFooResponse) GetName() string
func (*GetFooResponse) ProtoMessage ¶
func (*GetFooResponse) ProtoMessage()
func (*GetFooResponse) ProtoReflect ¶
func (x *GetFooResponse) ProtoReflect() protoreflect.Message
func (*GetFooResponse) Reset ¶
func (x *GetFooResponse) Reset()
func (*GetFooResponse) String ¶
func (x *GetFooResponse) String() string
type PostFooRequest ¶
type PostFooRequest struct { SString string `protobuf:"bytes,1,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"` OString *string `protobuf:"bytes,2,opt,name=o_string,json=oString,proto3,oneof" json:"o_string,omitempty"` RString []string `protobuf:"bytes,3,rep,name=r_string,json=rString,proto3" json:"r_string,omitempty"` SFloat float32 `protobuf:"fixed32,4,opt,name=s_float,json=sFloat,proto3" json:"s_float,omitempty"` OFloat *float32 `protobuf:"fixed32,5,opt,name=o_float,json=oFloat,proto3,oneof" json:"o_float,omitempty"` RFloat []float32 `protobuf:"fixed32,6,rep,packed,name=r_float,json=rFloat,proto3" json:"r_float,omitempty"` Ts *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=ts,proto3" json:"ts,omitempty"` RTs []*timestamppb.Timestamp `protobuf:"bytes,8,rep,name=r_ts,json=rTs,proto3" json:"r_ts,omitempty"` SBar *Bar `protobuf:"bytes,9,opt,name=s_bar,json=sBar,proto3" json:"s_bar,omitempty"` RBars []*Bar `protobuf:"bytes,10,rep,name=r_bars,json=rBars,proto3" json:"r_bars,omitempty"` Enum Enum `protobuf:"varint,11,opt,name=enum,proto3,enum=test.v1.Enum" json:"enum,omitempty"` REnum []Enum `protobuf:"varint,12,rep,packed,name=r_enum,json=rEnum,proto3,enum=test.v1.Enum" json:"r_enum,omitempty"` // Types that are assignable to NakedOneof: // // *PostFooRequest_OneofString // *PostFooRequest_OneBar // *PostFooRequest_OneofFloat // *PostFooRequest_OneofEnum NakedOneof isPostFooRequest_NakedOneof `protobuf_oneof:"naked_oneof"` // contains filtered or unexported fields }
func (*PostFooRequest) Descriptor
deprecated
func (*PostFooRequest) Descriptor() ([]byte, []int)
Deprecated: Use PostFooRequest.ProtoReflect.Descriptor instead.
func (*PostFooRequest) GetEnum ¶
func (x *PostFooRequest) GetEnum() Enum
func (*PostFooRequest) GetNakedOneof ¶
func (m *PostFooRequest) GetNakedOneof() isPostFooRequest_NakedOneof
func (*PostFooRequest) GetOFloat ¶
func (x *PostFooRequest) GetOFloat() float32
func (*PostFooRequest) GetOString ¶
func (x *PostFooRequest) GetOString() string
func (*PostFooRequest) GetOneBar ¶
func (x *PostFooRequest) GetOneBar() *Bar
func (*PostFooRequest) GetOneofEnum ¶
func (x *PostFooRequest) GetOneofEnum() Enum
func (*PostFooRequest) GetOneofFloat ¶
func (x *PostFooRequest) GetOneofFloat() float32
func (*PostFooRequest) GetOneofString ¶
func (x *PostFooRequest) GetOneofString() string
func (*PostFooRequest) GetRBars ¶
func (x *PostFooRequest) GetRBars() []*Bar
func (*PostFooRequest) GetREnum ¶
func (x *PostFooRequest) GetREnum() []Enum
func (*PostFooRequest) GetRFloat ¶
func (x *PostFooRequest) GetRFloat() []float32
func (*PostFooRequest) GetRString ¶
func (x *PostFooRequest) GetRString() []string
func (*PostFooRequest) GetRTs ¶
func (x *PostFooRequest) GetRTs() []*timestamppb.Timestamp
func (*PostFooRequest) GetSBar ¶
func (x *PostFooRequest) GetSBar() *Bar
func (*PostFooRequest) GetSFloat ¶
func (x *PostFooRequest) GetSFloat() float32
func (*PostFooRequest) GetSString ¶
func (x *PostFooRequest) GetSString() string
func (*PostFooRequest) GetTs ¶
func (x *PostFooRequest) GetTs() *timestamppb.Timestamp
func (*PostFooRequest) ProtoMessage ¶
func (*PostFooRequest) ProtoMessage()
func (*PostFooRequest) ProtoReflect ¶
func (x *PostFooRequest) ProtoReflect() protoreflect.Message
func (*PostFooRequest) Reset ¶
func (x *PostFooRequest) Reset()
func (*PostFooRequest) String ¶
func (x *PostFooRequest) String() string
type PostFooRequest_OneBar ¶
type PostFooRequest_OneBar struct {
OneBar *Bar `protobuf:"bytes,101,opt,name=one_bar,json=oneBar,proto3,oneof"`
}
type PostFooRequest_OneofEnum ¶
type PostFooRequest_OneofEnum struct {
OneofEnum Enum `protobuf:"varint,103,opt,name=oneof_enum,json=oneofEnum,proto3,enum=test.v1.Enum,oneof"`
}
type PostFooRequest_OneofFloat ¶
type PostFooRequest_OneofFloat struct {
OneofFloat float32 `protobuf:"fixed32,102,opt,name=oneof_float,json=oneofFloat,proto3,oneof"`
}
type PostFooRequest_OneofString ¶
type PostFooRequest_OneofString struct {
OneofString string `protobuf:"bytes,100,opt,name=oneof_string,json=oneofString,proto3,oneof"`
}
type PostFooResponse ¶
type PostFooResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*PostFooResponse) Descriptor
deprecated
func (*PostFooResponse) Descriptor() ([]byte, []int)
Deprecated: Use PostFooResponse.ProtoReflect.Descriptor instead.
func (*PostFooResponse) GetField ¶
func (x *PostFooResponse) GetField() string
func (*PostFooResponse) GetId ¶
func (x *PostFooResponse) GetId() string
func (*PostFooResponse) GetName ¶
func (x *PostFooResponse) GetName() string
func (*PostFooResponse) ProtoMessage ¶
func (*PostFooResponse) ProtoMessage()
func (*PostFooResponse) ProtoReflect ¶
func (x *PostFooResponse) ProtoReflect() protoreflect.Message
func (*PostFooResponse) Reset ¶
func (x *PostFooResponse) Reset()
func (*PostFooResponse) String ¶
func (x *PostFooResponse) String() string
type UnimplementedFooServiceServer ¶
type UnimplementedFooServiceServer struct { }
UnimplementedFooServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFooServiceServer) GetFoo ¶
func (UnimplementedFooServiceServer) GetFoo(context.Context, *GetFooRequest) (*GetFooResponse, error)
func (UnimplementedFooServiceServer) PostFoo ¶
func (UnimplementedFooServiceServer) PostFoo(context.Context, *PostFooRequest) (*PostFooResponse, error)
type UnimplementedFooTopicServer ¶
type UnimplementedFooTopicServer struct { }
UnimplementedFooTopicServer must be embedded to have forward compatible implementations.
func (UnimplementedFooTopicServer) Foo ¶
func (UnimplementedFooTopicServer) Foo(context.Context, *FooMessage) (*emptypb.Empty, error)
type UnsafeFooServiceServer ¶
type UnsafeFooServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFooServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooServiceServer will result in compilation errors.
type UnsafeFooTopicServer ¶
type UnsafeFooTopicServer interface {
// contains filtered or unexported methods
}
UnsafeFooTopicServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooTopicServer will result in compilation errors.