Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- type CreateUserResponse
- type Empty
- type GetByIDRequest
- type GetReviewsResponse
- func (*GetReviewsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewsResponse) GetReviews() []*Review
- func (*GetReviewsResponse) ProtoMessage()
- func (x *GetReviewsResponse) ProtoReflect() protoreflect.Message
- func (x *GetReviewsResponse) Reset()
- func (x *GetReviewsResponse) String() string
- type Review
- func (*Review) Descriptor() ([]byte, []int)deprecated
- func (x *Review) GetComment() string
- func (x *Review) GetDriverId() string
- func (x *Review) GetId() string
- func (x *Review) GetStar() uint32
- func (x *Review) GetUserId() string
- func (*Review) ProtoMessage()
- func (x *Review) ProtoReflect() protoreflect.Message
- func (x *Review) Reset()
- func (x *Review) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedUserServiceServer) GetReviews(context.Context, *Empty) (*GetReviewsResponse, error)
- func (UnimplementedUserServiceServer) GetReviewsByID(context.Context, *GetByIDRequest) (*Review, error)
- func (UnimplementedUserServiceServer) GetUserDetails(context.Context, *GetByIDRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUsers(context.Context, *Empty) (*Users, error)
- type UnsafeUserServiceServer
- type User
- type UserServiceClient
- type UserServiceServer
- type Users
Constants ¶
const ( UserService_CreateUser_FullMethodName = "/user.UserService/CreateUser" UserService_GetUsers_FullMethodName = "/user.UserService/GetUsers" UserService_GetUserDetails_FullMethodName = "/user.UserService/GetUserDetails" UserService_GetReviews_FullMethodName = "/user.UserService/GetReviews" UserService_GetReviewsByID_FullMethodName = "/user.UserService/GetReviewsByID" )
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUsers", Handler: _UserService_GetUsers_Handler, }, { MethodName: "GetUserDetails", Handler: _UserService_GetUserDetails_Handler, }, { MethodName: "GetReviews", Handler: _UserService_GetReviews_Handler, }, { MethodName: "GetReviewsByID", Handler: _UserService_GetReviewsByID_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetUser ¶
func (x *CreateUserRequest) GetUser() *User
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetId ¶
func (x *CreateUserResponse) GetId() string
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetByIDRequest ¶
type GetByIDRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetByIDRequest) Descriptor
deprecated
func (*GetByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByIDRequest.ProtoReflect.Descriptor instead.
func (*GetByIDRequest) GetId ¶
func (x *GetByIDRequest) GetId() string
func (*GetByIDRequest) ProtoMessage ¶
func (*GetByIDRequest) ProtoMessage()
func (*GetByIDRequest) ProtoReflect ¶
func (x *GetByIDRequest) ProtoReflect() protoreflect.Message
func (*GetByIDRequest) Reset ¶
func (x *GetByIDRequest) Reset()
func (*GetByIDRequest) String ¶
func (x *GetByIDRequest) String() string
type GetReviewsResponse ¶
type GetReviewsResponse struct { Reviews []*Review `protobuf:"bytes,1,rep,name=reviews,proto3" json:"reviews,omitempty"` // contains filtered or unexported fields }
func (*GetReviewsResponse) Descriptor
deprecated
func (*GetReviewsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewsResponse.ProtoReflect.Descriptor instead.
func (*GetReviewsResponse) GetReviews ¶
func (x *GetReviewsResponse) GetReviews() []*Review
func (*GetReviewsResponse) ProtoMessage ¶
func (*GetReviewsResponse) ProtoMessage()
func (*GetReviewsResponse) ProtoReflect ¶
func (x *GetReviewsResponse) ProtoReflect() protoreflect.Message
func (*GetReviewsResponse) Reset ¶
func (x *GetReviewsResponse) Reset()
func (*GetReviewsResponse) String ¶
func (x *GetReviewsResponse) String() string
type Review ¶
type Review struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` DriverId string `protobuf:"bytes,3,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"` Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` Star uint32 `protobuf:"varint,5,opt,name=star,proto3" json:"star,omitempty"` // contains filtered or unexported fields }
func (*Review) Descriptor
deprecated
func (*Review) GetComment ¶
func (*Review) GetDriverId ¶
func (*Review) ProtoMessage ¶
func (*Review) ProtoMessage()
func (*Review) ProtoReflect ¶
func (x *Review) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer 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 (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedUserServiceServer) GetReviews ¶
func (UnimplementedUserServiceServer) GetReviews(context.Context, *Empty) (*GetReviewsResponse, error)
func (UnimplementedUserServiceServer) GetReviewsByID ¶
func (UnimplementedUserServiceServer) GetReviewsByID(context.Context, *GetByIDRequest) (*Review, error)
func (UnimplementedUserServiceServer) GetUserDetails ¶
func (UnimplementedUserServiceServer) GetUserDetails(context.Context, *GetByIDRequest) (*User, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,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 UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Users, error) GetUserDetails(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*User, error) GetReviews(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetReviewsResponse, error) GetReviewsByID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*Review, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) GetUsers(context.Context, *Empty) (*Users, error) GetUserDetails(context.Context, *GetByIDRequest) (*User, error) GetReviews(context.Context, *Empty) (*GetReviewsResponse, error) GetReviewsByID(context.Context, *GetByIDRequest) (*Review, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
type Users ¶
type Users struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message