Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterReviewServiceHandler(s server.Server, hdlr ReviewServiceHandler, opts ...server.HandlerOption) error
- func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer)
- type GetReviewFromUserRequest
- func (*GetReviewFromUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewFromUserRequest) GetReviewId() uint64
- func (*GetReviewFromUserRequest) ProtoMessage()
- func (x *GetReviewFromUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetReviewFromUserRequest) Reset()
- func (x *GetReviewFromUserRequest) String() string
- type GetReviewFromUserResponse
- func (*GetReviewFromUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewFromUserResponse) GetMovie() *movie.Movie
- func (x *GetReviewFromUserResponse) GetReview() *Review
- func (*GetReviewFromUserResponse) ProtoMessage()
- func (x *GetReviewFromUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetReviewFromUserResponse) Reset()
- func (x *GetReviewFromUserResponse) String() string
- type GetReviewRequest
- func (*GetReviewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewRequest) GetMovieId() uint64
- func (x *GetReviewRequest) GetUserId() uint64
- func (*GetReviewRequest) ProtoMessage()
- func (x *GetReviewRequest) ProtoReflect() protoreflect.Message
- func (x *GetReviewRequest) Reset()
- func (x *GetReviewRequest) String() string
- type GetReviewResponse
- type GetReviewToMovieRequest
- func (*GetReviewToMovieRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewToMovieRequest) GetReviewId() uint64
- func (*GetReviewToMovieRequest) ProtoMessage()
- func (x *GetReviewToMovieRequest) ProtoReflect() protoreflect.Message
- func (x *GetReviewToMovieRequest) Reset()
- func (x *GetReviewToMovieRequest) String() string
- type GetReviewToMovieResponse
- func (*GetReviewToMovieResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetReviewToMovieResponse) GetReview() *Review
- func (x *GetReviewToMovieResponse) GetUser() *user.User
- func (*GetReviewToMovieResponse) ProtoMessage()
- func (x *GetReviewToMovieResponse) ProtoReflect() protoreflect.Message
- func (x *GetReviewToMovieResponse) Reset()
- func (x *GetReviewToMovieResponse) String() string
- type Review
- type ReviewService
- type ReviewServiceClient
- type ReviewServiceHandler
- type ReviewServiceServer
- type SetReviewRequest
- func (*SetReviewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetReviewRequest) GetContent() string
- func (x *SetReviewRequest) GetMovieId() uint64
- func (x *SetReviewRequest) GetRating() float32
- func (x *SetReviewRequest) GetUserId() uint64
- func (*SetReviewRequest) ProtoMessage()
- func (x *SetReviewRequest) ProtoReflect() protoreflect.Message
- func (x *SetReviewRequest) Reset()
- func (x *SetReviewRequest) String() string
- type SetReviewResponse
- type UnimplementedReviewServiceServer
- func (UnimplementedReviewServiceServer) GetReview(context.Context, *GetReviewRequest) (*GetReviewResponse, error)
- func (UnimplementedReviewServiceServer) GetReviewFromUser(context.Context, *GetReviewFromUserRequest) (*GetReviewFromUserResponse, error)
- func (UnimplementedReviewServiceServer) GetReviewToMovie(context.Context, *GetReviewToMovieRequest) (*GetReviewToMovieResponse, error)
- func (UnimplementedReviewServiceServer) SetReview(context.Context, *SetReviewRequest) (*SetReviewResponse, error)
- type UnsafeReviewServiceServer
Constants ¶
const ( ReviewService_GetReviewFromUser_FullMethodName = "/review.ReviewService/GetReviewFromUser" ReviewService_GetReviewToMovie_FullMethodName = "/review.ReviewService/GetReviewToMovie" ReviewService_GetReview_FullMethodName = "/review.ReviewService/GetReview" ReviewService_SetReview_FullMethodName = "/review.ReviewService/SetReview" )
Variables ¶
var File_micro_review_review_proto protoreflect.FileDescriptor
var ReviewService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "review.ReviewService", HandlerType: (*ReviewServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetReviewFromUser", Handler: _ReviewService_GetReviewFromUser_Handler, }, { MethodName: "GetReviewToMovie", Handler: _ReviewService_GetReviewToMovie_Handler, }, { MethodName: "GetReview", Handler: _ReviewService_GetReview_Handler, }, { MethodName: "SetReview", Handler: _ReviewService_SetReview_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "micro/review/review.proto", }
ReviewService_ServiceDesc is the grpc.ServiceDesc for ReviewService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterReviewServiceHandler ¶
func RegisterReviewServiceHandler(s server.Server, hdlr ReviewServiceHandler, opts ...server.HandlerOption) error
func RegisterReviewServiceServer ¶
func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer)
Types ¶
type GetReviewFromUserRequest ¶
type GetReviewFromUserRequest struct { ReviewId uint64 `protobuf:"varint,1,opt,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` // contains filtered or unexported fields }
func (*GetReviewFromUserRequest) Descriptor
deprecated
func (*GetReviewFromUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewFromUserRequest.ProtoReflect.Descriptor instead.
func (*GetReviewFromUserRequest) GetReviewId ¶
func (x *GetReviewFromUserRequest) GetReviewId() uint64
func (*GetReviewFromUserRequest) ProtoMessage ¶
func (*GetReviewFromUserRequest) ProtoMessage()
func (*GetReviewFromUserRequest) ProtoReflect ¶
func (x *GetReviewFromUserRequest) ProtoReflect() protoreflect.Message
func (*GetReviewFromUserRequest) Reset ¶
func (x *GetReviewFromUserRequest) Reset()
func (*GetReviewFromUserRequest) String ¶
func (x *GetReviewFromUserRequest) String() string
type GetReviewFromUserResponse ¶
type GetReviewFromUserResponse struct { Movie *movie.Movie `protobuf:"bytes,1,opt,name=movie,proto3" json:"movie,omitempty"` Review *Review `protobuf:"bytes,2,opt,name=review,proto3" json:"review,omitempty"` // contains filtered or unexported fields }
func (*GetReviewFromUserResponse) Descriptor
deprecated
func (*GetReviewFromUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewFromUserResponse.ProtoReflect.Descriptor instead.
func (*GetReviewFromUserResponse) GetMovie ¶
func (x *GetReviewFromUserResponse) GetMovie() *movie.Movie
func (*GetReviewFromUserResponse) GetReview ¶
func (x *GetReviewFromUserResponse) GetReview() *Review
func (*GetReviewFromUserResponse) ProtoMessage ¶
func (*GetReviewFromUserResponse) ProtoMessage()
func (*GetReviewFromUserResponse) ProtoReflect ¶
func (x *GetReviewFromUserResponse) ProtoReflect() protoreflect.Message
func (*GetReviewFromUserResponse) Reset ¶
func (x *GetReviewFromUserResponse) Reset()
func (*GetReviewFromUserResponse) String ¶
func (x *GetReviewFromUserResponse) String() string
type GetReviewRequest ¶
type GetReviewRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` MovieId uint64 `protobuf:"varint,2,opt,name=movie_id,json=movieId,proto3" json:"movie_id,omitempty"` // contains filtered or unexported fields }
func (*GetReviewRequest) Descriptor
deprecated
func (*GetReviewRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewRequest.ProtoReflect.Descriptor instead.
func (*GetReviewRequest) GetMovieId ¶
func (x *GetReviewRequest) GetMovieId() uint64
func (*GetReviewRequest) GetUserId ¶
func (x *GetReviewRequest) GetUserId() uint64
func (*GetReviewRequest) ProtoMessage ¶
func (*GetReviewRequest) ProtoMessage()
func (*GetReviewRequest) ProtoReflect ¶
func (x *GetReviewRequest) ProtoReflect() protoreflect.Message
func (*GetReviewRequest) Reset ¶
func (x *GetReviewRequest) Reset()
func (*GetReviewRequest) String ¶
func (x *GetReviewRequest) String() string
type GetReviewResponse ¶
type GetReviewResponse struct { Review *Review `protobuf:"bytes,1,opt,name=review,proto3" json:"review,omitempty"` // contains filtered or unexported fields }
func (*GetReviewResponse) Descriptor
deprecated
func (*GetReviewResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewResponse.ProtoReflect.Descriptor instead.
func (*GetReviewResponse) GetReview ¶
func (x *GetReviewResponse) GetReview() *Review
func (*GetReviewResponse) ProtoMessage ¶
func (*GetReviewResponse) ProtoMessage()
func (*GetReviewResponse) ProtoReflect ¶
func (x *GetReviewResponse) ProtoReflect() protoreflect.Message
func (*GetReviewResponse) Reset ¶
func (x *GetReviewResponse) Reset()
func (*GetReviewResponse) String ¶
func (x *GetReviewResponse) String() string
type GetReviewToMovieRequest ¶
type GetReviewToMovieRequest struct { ReviewId uint64 `protobuf:"varint,1,opt,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` // contains filtered or unexported fields }
func (*GetReviewToMovieRequest) Descriptor
deprecated
func (*GetReviewToMovieRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewToMovieRequest.ProtoReflect.Descriptor instead.
func (*GetReviewToMovieRequest) GetReviewId ¶
func (x *GetReviewToMovieRequest) GetReviewId() uint64
func (*GetReviewToMovieRequest) ProtoMessage ¶
func (*GetReviewToMovieRequest) ProtoMessage()
func (*GetReviewToMovieRequest) ProtoReflect ¶
func (x *GetReviewToMovieRequest) ProtoReflect() protoreflect.Message
func (*GetReviewToMovieRequest) Reset ¶
func (x *GetReviewToMovieRequest) Reset()
func (*GetReviewToMovieRequest) String ¶
func (x *GetReviewToMovieRequest) String() string
type GetReviewToMovieResponse ¶
type GetReviewToMovieResponse struct { User *user.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Review *Review `protobuf:"bytes,2,opt,name=review,proto3" json:"review,omitempty"` // contains filtered or unexported fields }
func (*GetReviewToMovieResponse) Descriptor
deprecated
func (*GetReviewToMovieResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetReviewToMovieResponse.ProtoReflect.Descriptor instead.
func (*GetReviewToMovieResponse) GetReview ¶
func (x *GetReviewToMovieResponse) GetReview() *Review
func (*GetReviewToMovieResponse) GetUser ¶
func (x *GetReviewToMovieResponse) GetUser() *user.User
func (*GetReviewToMovieResponse) ProtoMessage ¶
func (*GetReviewToMovieResponse) ProtoMessage()
func (*GetReviewToMovieResponse) ProtoReflect ¶
func (x *GetReviewToMovieResponse) ProtoReflect() protoreflect.Message
func (*GetReviewToMovieResponse) Reset ¶
func (x *GetReviewToMovieResponse) Reset()
func (*GetReviewToMovieResponse) String ¶
func (x *GetReviewToMovieResponse) String() string
type Review ¶
type Review struct { Rating float32 `protobuf:"fixed32,1,opt,name=rating,proto3" json:"rating,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Review) Descriptor
deprecated
func (*Review) GetContent ¶
func (*Review) ProtoMessage ¶
func (*Review) ProtoMessage()
func (*Review) ProtoReflect ¶
func (x *Review) ProtoReflect() protoreflect.Message
type ReviewService ¶
type ReviewService interface { GetReviewFromUser(ctx context.Context, in *GetReviewFromUserRequest, opts ...client.CallOption) (*GetReviewFromUserResponse, error) GetReviewToMovie(ctx context.Context, in *GetReviewToMovieRequest, opts ...client.CallOption) (*GetReviewToMovieResponse, error) GetReview(ctx context.Context, in *GetReviewRequest, opts ...client.CallOption) (*GetReviewResponse, error) SetReview(ctx context.Context, in *SetReviewRequest, opts ...client.CallOption) (*SetReviewResponse, error) }
func NewReviewService ¶
func NewReviewService(name string, c client.Client) ReviewService
type ReviewServiceClient ¶
type ReviewServiceClient interface { GetReviewFromUser(ctx context.Context, in *GetReviewFromUserRequest, opts ...grpc.CallOption) (*GetReviewFromUserResponse, error) GetReviewToMovie(ctx context.Context, in *GetReviewToMovieRequest, opts ...grpc.CallOption) (*GetReviewToMovieResponse, error) GetReview(ctx context.Context, in *GetReviewRequest, opts ...grpc.CallOption) (*GetReviewResponse, error) SetReview(ctx context.Context, in *SetReviewRequest, opts ...grpc.CallOption) (*SetReviewResponse, error) }
ReviewServiceClient is the client API for ReviewService 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.
protoc --proto_path=api --micro_out=.. --go-grpc_out=.. --go_out=.. api/micro/review/review.proto
func NewReviewServiceClient ¶
func NewReviewServiceClient(cc grpc.ClientConnInterface) ReviewServiceClient
type ReviewServiceHandler ¶
type ReviewServiceHandler interface { GetReviewFromUser(context.Context, *GetReviewFromUserRequest, *GetReviewFromUserResponse) error GetReviewToMovie(context.Context, *GetReviewToMovieRequest, *GetReviewToMovieResponse) error GetReview(context.Context, *GetReviewRequest, *GetReviewResponse) error SetReview(context.Context, *SetReviewRequest, *SetReviewResponse) error }
type ReviewServiceServer ¶
type ReviewServiceServer interface { GetReviewFromUser(context.Context, *GetReviewFromUserRequest) (*GetReviewFromUserResponse, error) GetReviewToMovie(context.Context, *GetReviewToMovieRequest) (*GetReviewToMovieResponse, error) GetReview(context.Context, *GetReviewRequest) (*GetReviewResponse, error) SetReview(context.Context, *SetReviewRequest) (*SetReviewResponse, error) // contains filtered or unexported methods }
ReviewServiceServer is the server API for ReviewService service. All implementations must embed UnimplementedReviewServiceServer for forward compatibility.
protoc --proto_path=api --micro_out=.. --go-grpc_out=.. --go_out=.. api/micro/review/review.proto
type SetReviewRequest ¶
type SetReviewRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` MovieId uint64 `protobuf:"varint,2,opt,name=movie_id,json=movieId,proto3" json:"movie_id,omitempty"` Rating float32 `protobuf:"fixed32,3,opt,name=rating,proto3" json:"rating,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*SetReviewRequest) Descriptor
deprecated
func (*SetReviewRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetReviewRequest.ProtoReflect.Descriptor instead.
func (*SetReviewRequest) GetContent ¶
func (x *SetReviewRequest) GetContent() string
func (*SetReviewRequest) GetMovieId ¶
func (x *SetReviewRequest) GetMovieId() uint64
func (*SetReviewRequest) GetRating ¶
func (x *SetReviewRequest) GetRating() float32
func (*SetReviewRequest) GetUserId ¶
func (x *SetReviewRequest) GetUserId() uint64
func (*SetReviewRequest) ProtoMessage ¶
func (*SetReviewRequest) ProtoMessage()
func (*SetReviewRequest) ProtoReflect ¶
func (x *SetReviewRequest) ProtoReflect() protoreflect.Message
func (*SetReviewRequest) Reset ¶
func (x *SetReviewRequest) Reset()
func (*SetReviewRequest) String ¶
func (x *SetReviewRequest) String() string
type SetReviewResponse ¶
type SetReviewResponse struct { Review *Review `protobuf:"bytes,1,opt,name=review,proto3" json:"review,omitempty"` // contains filtered or unexported fields }
func (*SetReviewResponse) Descriptor
deprecated
func (*SetReviewResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetReviewResponse.ProtoReflect.Descriptor instead.
func (*SetReviewResponse) GetReview ¶
func (x *SetReviewResponse) GetReview() *Review
func (*SetReviewResponse) ProtoMessage ¶
func (*SetReviewResponse) ProtoMessage()
func (*SetReviewResponse) ProtoReflect ¶
func (x *SetReviewResponse) ProtoReflect() protoreflect.Message
func (*SetReviewResponse) Reset ¶
func (x *SetReviewResponse) Reset()
func (*SetReviewResponse) String ¶
func (x *SetReviewResponse) String() string
type UnimplementedReviewServiceServer ¶
type UnimplementedReviewServiceServer struct{}
UnimplementedReviewServiceServer 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 (UnimplementedReviewServiceServer) GetReview ¶
func (UnimplementedReviewServiceServer) GetReview(context.Context, *GetReviewRequest) (*GetReviewResponse, error)
func (UnimplementedReviewServiceServer) GetReviewFromUser ¶
func (UnimplementedReviewServiceServer) GetReviewFromUser(context.Context, *GetReviewFromUserRequest) (*GetReviewFromUserResponse, error)
func (UnimplementedReviewServiceServer) GetReviewToMovie ¶
func (UnimplementedReviewServiceServer) GetReviewToMovie(context.Context, *GetReviewToMovieRequest) (*GetReviewToMovieResponse, error)
func (UnimplementedReviewServiceServer) SetReview ¶
func (UnimplementedReviewServiceServer) SetReview(context.Context, *SetReviewRequest) (*SetReviewResponse, error)
type UnsafeReviewServiceServer ¶
type UnsafeReviewServiceServer interface {
// contains filtered or unexported methods
}
UnsafeReviewServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReviewServiceServer will result in compilation errors.