Documentation ¶
Index ¶
- Variables
- func RegisterUsersService(s grpc.ServiceRegistrar, srv *UsersService)
- type UserRequest
- func (*UserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRequest) GetEmail() string
- func (x *UserRequest) GetId() string
- func (x *UserRequest) GetName() string
- func (*UserRequest) ProtoMessage()
- func (x *UserRequest) ProtoReflect() protoreflect.Message
- func (x *UserRequest) Reset()
- func (x *UserRequest) String() string
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetEmail() string
- func (x *UserResponse) GetId() string
- func (x *UserResponse) GetName() string
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- type UsersClient
- type UsersResponse
- type UsersService
Constants ¶
This section is empty.
Variables ¶
var File_grpcs_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersService ¶
func RegisterUsersService(s grpc.ServiceRegistrar, srv *UsersService)
RegisterUsersService registers a service implementation with a gRPC server.
Types ¶
type UserRequest ¶
type UserRequest 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"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*UserRequest) Descriptor
deprecated
func (*UserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.
func (*UserRequest) GetEmail ¶
func (x *UserRequest) GetEmail() string
func (*UserRequest) GetId ¶
func (x *UserRequest) GetId() string
func (*UserRequest) GetName ¶
func (x *UserRequest) GetName() string
func (*UserRequest) ProtoMessage ¶
func (*UserRequest) ProtoMessage()
func (*UserRequest) ProtoReflect ¶
func (x *UserRequest) ProtoReflect() protoreflect.Message
func (*UserRequest) Reset ¶
func (x *UserRequest) Reset()
func (*UserRequest) String ¶
func (x *UserRequest) String() string
type UserResponse ¶
type UserResponse 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"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetEmail ¶
func (x *UserResponse) GetEmail() string
func (*UserResponse) GetId ¶
func (x *UserResponse) GetId() string
func (*UserResponse) GetName ¶
func (x *UserResponse) GetName() string
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UsersClient ¶
type UsersClient interface { // Sends a greeting Create(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Update(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) GetById(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Delete(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Get(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UsersResponse, error) }
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersResponse ¶
type UsersResponse struct { Users []*UserResponse `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*UsersResponse) Descriptor
deprecated
func (*UsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use UsersResponse.ProtoReflect.Descriptor instead.
func (*UsersResponse) GetUsers ¶
func (x *UsersResponse) GetUsers() []*UserResponse
func (*UsersResponse) ProtoMessage ¶
func (*UsersResponse) ProtoMessage()
func (*UsersResponse) ProtoReflect ¶
func (x *UsersResponse) ProtoReflect() protoreflect.Message
func (*UsersResponse) Reset ¶
func (x *UsersResponse) Reset()
func (*UsersResponse) String ¶
func (x *UsersResponse) String() string
type UsersService ¶
type UsersService struct { // Sends a greeting Create func(context.Context, *UserRequest) (*UserResponse, error) Update func(context.Context, *UserRequest) (*UserResponse, error) GetById func(context.Context, *UserRequest) (*UserResponse, error) Delete func(context.Context, *UserRequest) (*UserResponse, error) Get func(context.Context, *empty.Empty) (*UsersResponse, error) }
UsersService is the service API for Users service. Fields should be assigned to their respective handler implementations only before RegisterUsersService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.