Documentation ¶
Index ¶
Constants ¶
const (
User_Get_FullMethodName = "/user.v1.User/Get"
)
Variables ¶
var File_user_v1_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.v1.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _User_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type GetRequest ¶
type GetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetName ¶
func (x *GetRequest) GetName() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetMessage ¶
func (x *GetResponse) GetMessage() string
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct{}
UnimplementedUserServer 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 (UnimplementedUserServer) Get ¶
func (UnimplementedUserServer) Get(context.Context, *GetRequest) (*GetResponse, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserServer ¶
type UserServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility.