Documentation ¶
Index ¶
- Variables
- func RegisterUserProviderServer(s *grpc.Server, srv UserProviderServer)
- type GetUserRequest
- type GetUserResponse
- func (*GetUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserResponse) GetMessage() string
- func (x *GetUserResponse) GetUsers() []*User
- func (*GetUserResponse) ProtoMessage()
- func (x *GetUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserResponse) Reset()
- func (x *GetUserResponse) String() string
- type UnimplementedUserProviderServer
- type UnsafeUserProviderServer
- type User
- type UserProviderClient
- type UserProviderServer
Constants ¶
This section is empty.
Variables ¶
var File_hello_grpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserProviderServer ¶
func RegisterUserProviderServer(s *grpc.Server, srv UserProviderServer)
Types ¶
type GetUserRequest ¶
type GetUserRequest struct { UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetUserId ¶
func (x *GetUserRequest) GetUserId() int32
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetMessage ¶
func (x *GetUserResponse) GetMessage() string
func (*GetUserResponse) GetUsers ¶
func (x *GetUserResponse) GetUsers() []*User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type UnimplementedUserProviderServer ¶
type UnimplementedUserProviderServer struct { }
UnimplementedUserProviderServer must be embedded to have forward compatible implementations.
func (UnimplementedUserProviderServer) GetUser ¶
func (UnimplementedUserProviderServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
type UnsafeUserProviderServer ¶
type UnsafeUserProviderServer interface {
// contains filtered or unexported methods
}
UnsafeUserProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserProviderServer will result in compilation errors.
type User ¶
type User struct { UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserProviderClient ¶
type UserProviderClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}
UserProviderClient is the client API for UserProvider 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 NewUserProviderClient ¶
func NewUserProviderClient(cc grpc.ClientConnInterface) UserProviderClient
type UserProviderServer ¶
type UserProviderServer interface { GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) // contains filtered or unexported methods }
UserProviderServer is the server API for UserProvider service. All implementations must embed UnimplementedUserProviderServer for forward compatibility