diff --git a/Makefile b/Makefile index 80f428f..2c8688f 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,9 @@ pb: @./script/pb.sh user @./script/pb.sh blog + @./script/pb.sh post + @./script/pb.sh page + @./script/pb.sh comment .PHONY: test test: diff --git a/service/blog/rpc/blog/blog.pb.go b/service/blog/rpc/blog/blog.pb.go index 0658b34..ce54de9 100644 --- a/service/blog/rpc/blog/blog.pb.go +++ b/service/blog/rpc/blog/blog.pb.go @@ -26,14 +26,18 @@ type Blog struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Published *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=published,proto3" json:"published,omitempty"` - Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` - Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` - SelfLink string `protobuf:"bytes,8,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Published *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=published,proto3" json:"published,omitempty"` + Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` + Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` + SelfLink string `protobuf:"bytes,8,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Posts *Posts `protobuf:"bytes,9,opt,name=posts,proto3" json:"posts,omitempty"` + Pages *Pages `protobuf:"bytes,10,opt,name=pages,proto3" json:"pages,omitempty"` + CustomMetaData string `protobuf:"bytes,11,opt,name=customMetaData,proto3" json:"customMetaData,omitempty"` + PostsItems *PostsItems `protobuf:"bytes,12,opt,name=posts_items,json=postsItems,proto3" json:"posts_items,omitempty"` } func (x *Blog) Reset() { @@ -124,34 +128,705 @@ func (x *Blog) GetSelfLink() string { return "" } +func (x *Blog) GetPosts() *Posts { + if x != nil { + return x.Posts + } + return nil +} + +func (x *Blog) GetPages() *Pages { + if x != nil { + return x.Pages + } + return nil +} + +func (x *Blog) GetCustomMetaData() string { + if x != nil { + return x.CustomMetaData + } + return "" +} + +func (x *Blog) GetPostsItems() *PostsItems { + if x != nil { + return x.PostsItems + } + return nil +} + +type Posts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalItems string `protobuf:"bytes,1,opt,name=totalItems,proto3" json:"totalItems,omitempty"` + SelfLink string `protobuf:"bytes,2,opt,name=selfLink,proto3" json:"selfLink,omitempty"` +} + +func (x *Posts) Reset() { + *x = Posts{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Posts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Posts) ProtoMessage() {} + +func (x *Posts) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Posts.ProtoReflect.Descriptor instead. +func (*Posts) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{1} +} + +func (x *Posts) GetTotalItems() string { + if x != nil { + return x.TotalItems + } + return "" +} + +func (x *Posts) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +type PostsItems struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PostsItems) Reset() { + *x = PostsItems{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostsItems) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostsItems) ProtoMessage() {} + +func (x *PostsItems) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostsItems.ProtoReflect.Descriptor instead. +func (*PostsItems) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{2} +} + +type Pages struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalItems string `protobuf:"bytes,1,opt,name=totalItems,proto3" json:"totalItems,omitempty"` + SelfLink string `protobuf:"bytes,2,opt,name=selfLink,proto3" json:"selfLink,omitempty"` +} + +func (x *Pages) Reset() { + *x = Pages{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pages) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pages) ProtoMessage() {} + +func (x *Pages) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pages.ProtoReflect.Descriptor instead. +func (*Pages) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{3} +} + +func (x *Pages) GetTotalItems() string { + if x != nil { + return x.TotalItems + } + return "" +} + +func (x *Pages) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +type Locale struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` + Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` + Variant string `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *Locale) Reset() { + *x = Locale{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Locale) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Locale) ProtoMessage() {} + +func (x *Locale) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Locale.ProtoReflect.Descriptor instead. +func (*Locale) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{4} +} + +func (x *Locale) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +func (x *Locale) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +func (x *Locale) GetVariant() string { + if x != nil { + return x.Variant + } + return "" +} + type GetReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` - PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` - MaxComments uint64 `protobuf:"varint,3,opt,name=maxComments,proto3" json:"maxComments,omitempty"` - View string `protobuf:"bytes,4,opt,name=view,proto3" json:"view,omitempty"` + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + MaxPosts uint64 `protobuf:"varint,2,opt,name=maxPosts,proto3" json:"maxPosts,omitempty"` +} + +func (x *GetReq) Reset() { + *x = GetReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReq) ProtoMessage() {} + +func (x *GetReq) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReq.ProtoReflect.Descriptor instead. +func (*GetReq) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{5} +} + +func (x *GetReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetReq) GetMaxPosts() uint64 { + if x != nil { + return x.MaxPosts + } + return 0 +} + +type GetByUrlReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *GetByUrlReq) Reset() { + *x = GetByUrlReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetByUrlReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetByUrlReq) ProtoMessage() {} + +func (x *GetByUrlReq) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetByUrlReq.ProtoReflect.Descriptor instead. +func (*GetByUrlReq) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{6} +} + +func (x *GetByUrlReq) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type ListByUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + FetchUserInfo bool `protobuf:"varint,2,opt,name=fetchUserInfo,proto3" json:"fetchUserInfo,omitempty"` + View string `protobuf:"bytes,3,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *ListByUserReq) Reset() { + *x = ListByUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListByUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListByUserReq) ProtoMessage() {} + +func (x *ListByUserReq) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListByUserReq.ProtoReflect.Descriptor instead. +func (*ListByUserReq) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{7} +} + +func (x *ListByUserReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListByUserReq) GetFetchUserInfo() bool { + if x != nil { + return x.FetchUserInfo + } + return false +} + +func (x *ListByUserReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type ListByUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Items []*Blog `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` + BlogUserInfos []*BlogUserInfos `protobuf:"bytes,3,rep,name=blogUserInfos,proto3" json:"blogUserInfos,omitempty"` +} + +func (x *ListByUserResp) Reset() { + *x = ListByUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListByUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListByUserResp) ProtoMessage() {} + +func (x *ListByUserResp) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListByUserResp.ProtoReflect.Descriptor instead. +func (*ListByUserResp) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{8} +} + +func (x *ListByUserResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListByUserResp) GetItems() []*Blog { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListByUserResp) GetBlogUserInfos() []*BlogUserInfos { + if x != nil { + return x.BlogUserInfos + } + return nil +} + +type BlogUserInfos struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Blog *Blog `protobuf:"bytes,2,opt,name=blog,proto3" json:"blog,omitempty"` + BlogUserInfo *BlogUserInfo `protobuf:"bytes,3,opt,name=blog_user_info,json=blogUserInfo,proto3" json:"blog_user_info,omitempty"` +} + +func (x *BlogUserInfos) Reset() { + *x = BlogUserInfos{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlogUserInfos) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlogUserInfos) ProtoMessage() {} + +func (x *BlogUserInfos) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlogUserInfos.ProtoReflect.Descriptor instead. +func (*BlogUserInfos) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{9} +} + +func (x *BlogUserInfos) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BlogUserInfos) GetBlog() *Blog { + if x != nil { + return x.Blog + } + return nil +} + +func (x *BlogUserInfos) GetBlogUserInfo() *BlogUserInfo { + if x != nil { + return x.BlogUserInfo + } + return nil +} + +type BlogUserInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + BlogId string `protobuf:"bytes,3,opt,name=blogId,proto3" json:"blogId,omitempty"` + PhotosAlbumKey string `protobuf:"bytes,4,opt,name=photosAlbumKey,proto3" json:"photosAlbumKey,omitempty"` + HasAdminAccess bool `protobuf:"varint,5,opt,name=hasAdminAccess,proto3" json:"hasAdminAccess,omitempty"` +} + +func (x *BlogUserInfo) Reset() { + *x = BlogUserInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlogUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlogUserInfo) ProtoMessage() {} + +func (x *BlogUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlogUserInfo.ProtoReflect.Descriptor instead. +func (*BlogUserInfo) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{10} +} + +func (x *BlogUserInfo) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BlogUserInfo) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *BlogUserInfo) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *BlogUserInfo) GetPhotosAlbumKey() string { + if x != nil { + return x.PhotosAlbumKey + } + return "" +} + +func (x *BlogUserInfo) GetHasAdminAccess() bool { + if x != nil { + return x.HasAdminAccess + } + return false +} + +type BlogUserInfosReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + MaxPosts uint64 `protobuf:"varint,3,opt,name=maxPosts,proto3" json:"maxPosts,omitempty"` +} + +func (x *BlogUserInfosReq) Reset() { + *x = BlogUserInfosReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlogUserInfosReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlogUserInfosReq) ProtoMessage() {} + +func (x *BlogUserInfosReq) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlogUserInfosReq.ProtoReflect.Descriptor instead. +func (*BlogUserInfosReq) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{11} +} + +func (x *BlogUserInfosReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *BlogUserInfosReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *BlogUserInfosReq) GetMaxPosts() uint64 { + if x != nil { + return x.MaxPosts + } + return 0 +} + +type PageViews struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + BlogId int64 `protobuf:"varint,2,opt,name=blogId,proto3" json:"blogId,omitempty"` + Counts []*Count `protobuf:"bytes,3,rep,name=counts,proto3" json:"counts,omitempty"` } -func (x *GetReq) Reset() { - *x = GetReq{} +func (x *PageViews) Reset() { + *x = PageViews{} if protoimpl.UnsafeEnabled { - mi := &file_service_blog_rpc_blog_proto_msgTypes[1] + mi := &file_service_blog_rpc_blog_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetReq) String() string { +func (x *PageViews) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetReq) ProtoMessage() {} +func (*PageViews) ProtoMessage() {} -func (x *GetReq) ProtoReflect() protoreflect.Message { - mi := &file_service_blog_rpc_blog_proto_msgTypes[1] +func (x *PageViews) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,35 +837,138 @@ func (x *GetReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetReq.ProtoReflect.Descriptor instead. -func (*GetReq) Descriptor() ([]byte, []int) { - return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{1} +// Deprecated: Use PageViews.ProtoReflect.Descriptor instead. +func (*PageViews) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{12} } -func (x *GetReq) GetBlogId() string { +func (x *PageViews) GetKind() string { if x != nil { - return x.BlogId + return x.Kind } return "" } -func (x *GetReq) GetPostId() string { +func (x *PageViews) GetBlogId() int64 { + if x != nil { + return x.BlogId + } + return 0 +} + +func (x *PageViews) GetCounts() []*Count { + if x != nil { + return x.Counts + } + return nil +} + +type Count struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimeRange string `protobuf:"bytes,1,opt,name=timeRange,proto3" json:"timeRange,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *Count) Reset() { + *x = Count{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Count) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Count) ProtoMessage() {} + +func (x *Count) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Count.ProtoReflect.Descriptor instead. +func (*Count) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{13} +} + +func (x *Count) GetTimeRange() string { if x != nil { - return x.PostId + return x.TimeRange } return "" } -func (x *GetReq) GetMaxComments() uint64 { +func (x *Count) GetCount() uint64 { if x != nil { - return x.MaxComments + return x.Count } return 0 } -func (x *GetReq) GetView() string { +type GetPageViewsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + Range string `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"` +} + +func (x *GetPageViewsReq) Reset() { + *x = GetPageViewsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_blog_rpc_blog_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPageViewsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPageViewsReq) ProtoMessage() {} + +func (x *GetPageViewsReq) ProtoReflect() protoreflect.Message { + mi := &file_service_blog_rpc_blog_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPageViewsReq.ProtoReflect.Descriptor instead. +func (*GetPageViewsReq) Descriptor() ([]byte, []int) { + return file_service_blog_rpc_blog_proto_rawDescGZIP(), []int{14} +} + +func (x *GetPageViewsReq) GetBlogId() string { if x != nil { - return x.View + return x.BlogId + } + return "" +} + +func (x *GetPageViewsReq) GetRange() string { + if x != nil { + return x.Range } return "" } @@ -202,7 +980,7 @@ var file_service_blog_rpc_blog_proto_rawDesc = []byte{ 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -218,18 +996,108 @@ var file_service_blog_rpc_blog_proto_rawDesc = []byte{ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, - 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x6e, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, - 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x76, 0x69, 0x65, 0x77, 0x32, 0x2e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x67, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x62, 0x6c, - 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x62, 0x6c, 0x6f, 0x67, - 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x73, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, + 0x50, 0x6f, 0x73, 0x74, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, + 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x43, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x0c, 0x0a, 0x0a, 0x50, + 0x6f, 0x73, 0x74, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x43, 0x0a, 0x05, 0x50, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x58, + 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x3c, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, + 0x78, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, + 0x78, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x79, 0x55, + 0x72, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x61, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x81, 0x01, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x20, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x6c, 0x6f, + 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, + 0x0d, 0x62, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x7d, + 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x62, + 0x6c, 0x6f, 0x67, 0x12, 0x38, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x6c, + 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0c, 0x62, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa2, 0x01, + 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, + 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x41, 0x6c, 0x62, 0x75, + 0x6d, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x73, 0x41, 0x6c, 0x62, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x68, 0x61, + 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x22, 0x5e, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x73, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x73, + 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x6c, + 0x6f, 0x67, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x22, 0x3b, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3f, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x67, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x32, 0x8b, + 0x02, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x12, + 0x29, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x11, 0x2e, 0x62, 0x6c, + 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0a, + 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x37, 0x0a, 0x0a, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, + 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x16, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, + 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x67, 0x65, 0x56, + 0x69, 0x65, 0x77, 0x73, 0x12, 0x15, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x6c, + 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x42, 0x08, 0x5a, 0x06, + 0x2e, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -244,22 +1112,51 @@ func file_service_blog_rpc_blog_proto_rawDescGZIP() []byte { return file_service_blog_rpc_blog_proto_rawDescData } -var file_service_blog_rpc_blog_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_service_blog_rpc_blog_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_service_blog_rpc_blog_proto_goTypes = []interface{}{ (*Blog)(nil), // 0: blog.Blog - (*GetReq)(nil), // 1: blog.GetReq - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*Posts)(nil), // 1: blog.Posts + (*PostsItems)(nil), // 2: blog.PostsItems + (*Pages)(nil), // 3: blog.Pages + (*Locale)(nil), // 4: blog.Locale + (*GetReq)(nil), // 5: blog.GetReq + (*GetByUrlReq)(nil), // 6: blog.GetByUrlReq + (*ListByUserReq)(nil), // 7: blog.ListByUserReq + (*ListByUserResp)(nil), // 8: blog.ListByUserResp + (*BlogUserInfos)(nil), // 9: blog.BlogUserInfos + (*BlogUserInfo)(nil), // 10: blog.BlogUserInfo + (*BlogUserInfosReq)(nil), // 11: blog.BlogUserInfosReq + (*PageViews)(nil), // 12: blog.PageViews + (*Count)(nil), // 13: blog.Count + (*GetPageViewsReq)(nil), // 14: blog.GetPageViewsReq + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp } var file_service_blog_rpc_blog_proto_depIdxs = []int32{ - 2, // 0: blog.Blog.published:type_name -> google.protobuf.Timestamp - 2, // 1: blog.Blog.updated:type_name -> google.protobuf.Timestamp - 1, // 2: blog.BlogService.Get:input_type -> blog.GetReq - 0, // 3: blog.BlogService.Get:output_type -> blog.Blog - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 15, // 0: blog.Blog.published:type_name -> google.protobuf.Timestamp + 15, // 1: blog.Blog.updated:type_name -> google.protobuf.Timestamp + 1, // 2: blog.Blog.posts:type_name -> blog.Posts + 3, // 3: blog.Blog.pages:type_name -> blog.Pages + 2, // 4: blog.Blog.posts_items:type_name -> blog.PostsItems + 0, // 5: blog.ListByUserResp.items:type_name -> blog.Blog + 9, // 6: blog.ListByUserResp.blogUserInfos:type_name -> blog.BlogUserInfos + 0, // 7: blog.BlogUserInfos.blog:type_name -> blog.Blog + 10, // 8: blog.BlogUserInfos.blog_user_info:type_name -> blog.BlogUserInfo + 13, // 9: blog.PageViews.counts:type_name -> blog.Count + 5, // 10: blog.BlogService.Get:input_type -> blog.GetReq + 6, // 11: blog.BlogService.GetByUrl:input_type -> blog.GetByUrlReq + 7, // 12: blog.BlogService.ListByUser:input_type -> blog.ListByUserReq + 11, // 13: blog.BlogService.GetBlogUserInfos:input_type -> blog.BlogUserInfosReq + 14, // 14: blog.BlogService.GetPageViews:input_type -> blog.GetPageViewsReq + 0, // 15: blog.BlogService.Get:output_type -> blog.Blog + 0, // 16: blog.BlogService.GetByUrl:output_type -> blog.Blog + 8, // 17: blog.BlogService.ListByUser:output_type -> blog.ListByUserResp + 9, // 18: blog.BlogService.GetBlogUserInfos:output_type -> blog.BlogUserInfos + 12, // 19: blog.BlogService.GetPageViews:output_type -> blog.PageViews + 15, // [15:20] is the sub-list for method output_type + 10, // [10:15] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_service_blog_rpc_blog_proto_init() } @@ -281,6 +1178,54 @@ func file_service_blog_rpc_blog_proto_init() { } } file_service_blog_rpc_blog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Posts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostsItems); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pages); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Locale); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetReq); i { case 0: return &v.state @@ -292,6 +1237,114 @@ func file_service_blog_rpc_blog_proto_init() { return nil } } + file_service_blog_rpc_blog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetByUrlReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListByUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListByUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlogUserInfos); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlogUserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlogUserInfosReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageViews); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Count); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_blog_rpc_blog_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPageViewsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -299,7 +1352,7 @@ func file_service_blog_rpc_blog_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_blog_rpc_blog_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/service/blog/rpc/blog/blog_grpc.pb.go b/service/blog/rpc/blog/blog_grpc.pb.go index 125575b..304219b 100644 --- a/service/blog/rpc/blog/blog_grpc.pb.go +++ b/service/blog/rpc/blog/blog_grpc.pb.go @@ -19,7 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - BlogService_Get_FullMethodName = "/blog.BlogService/Get" + BlogService_Get_FullMethodName = "/blog.BlogService/Get" + BlogService_GetByUrl_FullMethodName = "/blog.BlogService/GetByUrl" + BlogService_ListByUser_FullMethodName = "/blog.BlogService/ListByUser" + BlogService_GetBlogUserInfos_FullMethodName = "/blog.BlogService/GetBlogUserInfos" + BlogService_GetPageViews_FullMethodName = "/blog.BlogService/GetPageViews" ) // BlogServiceClient is the client API for BlogService service. @@ -27,6 +31,10 @@ const ( // 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. type BlogServiceClient interface { Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Blog, error) + GetByUrl(ctx context.Context, in *GetByUrlReq, opts ...grpc.CallOption) (*Blog, error) + ListByUser(ctx context.Context, in *ListByUserReq, opts ...grpc.CallOption) (*ListByUserResp, error) + GetBlogUserInfos(ctx context.Context, in *BlogUserInfosReq, opts ...grpc.CallOption) (*BlogUserInfos, error) + GetPageViews(ctx context.Context, in *GetPageViewsReq, opts ...grpc.CallOption) (*PageViews, error) } type blogServiceClient struct { @@ -46,11 +54,51 @@ func (c *blogServiceClient) Get(ctx context.Context, in *GetReq, opts ...grpc.Ca return out, nil } +func (c *blogServiceClient) GetByUrl(ctx context.Context, in *GetByUrlReq, opts ...grpc.CallOption) (*Blog, error) { + out := new(Blog) + err := c.cc.Invoke(ctx, BlogService_GetByUrl_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blogServiceClient) ListByUser(ctx context.Context, in *ListByUserReq, opts ...grpc.CallOption) (*ListByUserResp, error) { + out := new(ListByUserResp) + err := c.cc.Invoke(ctx, BlogService_ListByUser_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blogServiceClient) GetBlogUserInfos(ctx context.Context, in *BlogUserInfosReq, opts ...grpc.CallOption) (*BlogUserInfos, error) { + out := new(BlogUserInfos) + err := c.cc.Invoke(ctx, BlogService_GetBlogUserInfos_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blogServiceClient) GetPageViews(ctx context.Context, in *GetPageViewsReq, opts ...grpc.CallOption) (*PageViews, error) { + out := new(PageViews) + err := c.cc.Invoke(ctx, BlogService_GetPageViews_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BlogServiceServer is the server API for BlogService service. // All implementations must embed UnimplementedBlogServiceServer // for forward compatibility type BlogServiceServer interface { Get(context.Context, *GetReq) (*Blog, error) + GetByUrl(context.Context, *GetByUrlReq) (*Blog, error) + ListByUser(context.Context, *ListByUserReq) (*ListByUserResp, error) + GetBlogUserInfos(context.Context, *BlogUserInfosReq) (*BlogUserInfos, error) + GetPageViews(context.Context, *GetPageViewsReq) (*PageViews, error) mustEmbedUnimplementedBlogServiceServer() } @@ -61,6 +109,18 @@ type UnimplementedBlogServiceServer struct { func (UnimplementedBlogServiceServer) Get(context.Context, *GetReq) (*Blog, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (UnimplementedBlogServiceServer) GetByUrl(context.Context, *GetByUrlReq) (*Blog, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByUrl not implemented") +} +func (UnimplementedBlogServiceServer) ListByUser(context.Context, *ListByUserReq) (*ListByUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByUser not implemented") +} +func (UnimplementedBlogServiceServer) GetBlogUserInfos(context.Context, *BlogUserInfosReq) (*BlogUserInfos, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlogUserInfos not implemented") +} +func (UnimplementedBlogServiceServer) GetPageViews(context.Context, *GetPageViewsReq) (*PageViews, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPageViews not implemented") +} func (UnimplementedBlogServiceServer) mustEmbedUnimplementedBlogServiceServer() {} // UnsafeBlogServiceServer may be embedded to opt out of forward compatibility for this service. @@ -92,6 +152,78 @@ func _BlogService_Get_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _BlogService_GetByUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByUrlReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlogServiceServer).GetByUrl(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BlogService_GetByUrl_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlogServiceServer).GetByUrl(ctx, req.(*GetByUrlReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _BlogService_ListByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListByUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlogServiceServer).ListByUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BlogService_ListByUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlogServiceServer).ListByUser(ctx, req.(*ListByUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _BlogService_GetBlogUserInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlogUserInfosReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlogServiceServer).GetBlogUserInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BlogService_GetBlogUserInfos_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlogServiceServer).GetBlogUserInfos(ctx, req.(*BlogUserInfosReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _BlogService_GetPageViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPageViewsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlogServiceServer).GetPageViews(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BlogService_GetPageViews_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlogServiceServer).GetPageViews(ctx, req.(*GetPageViewsReq)) + } + return interceptor(ctx, in, info, handler) +} + // BlogService_ServiceDesc is the grpc.ServiceDesc for BlogService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -103,6 +235,22 @@ var BlogService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Get", Handler: _BlogService_Get_Handler, }, + { + MethodName: "GetByUrl", + Handler: _BlogService_GetByUrl_Handler, + }, + { + MethodName: "ListByUser", + Handler: _BlogService_ListByUser_Handler, + }, + { + MethodName: "GetBlogUserInfos", + Handler: _BlogService_GetBlogUserInfos_Handler, + }, + { + MethodName: "GetPageViews", + Handler: _BlogService_GetPageViews_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/blog/rpc/blog.proto", diff --git a/service/blog/rpc/blogservice/blog_service.go b/service/blog/rpc/blogservice/blog_service.go index 341c404..8fd62d9 100644 --- a/service/blog/rpc/blogservice/blog_service.go +++ b/service/blog/rpc/blogservice/blog_service.go @@ -13,11 +13,28 @@ import ( ) type ( - Blog = blog.Blog - GetReq = blog.GetReq + Blog = blog.Blog + BlogUserInfo = blog.BlogUserInfo + BlogUserInfos = blog.BlogUserInfos + BlogUserInfosReq = blog.BlogUserInfosReq + Count = blog.Count + GetByUrlReq = blog.GetByUrlReq + GetPageViewsReq = blog.GetPageViewsReq + GetReq = blog.GetReq + ListByUserReq = blog.ListByUserReq + ListByUserResp = blog.ListByUserResp + Locale = blog.Locale + PageViews = blog.PageViews + Pages = blog.Pages + Posts = blog.Posts + PostsItems = blog.PostsItems BlogService interface { Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Blog, error) + GetByUrl(ctx context.Context, in *GetByUrlReq, opts ...grpc.CallOption) (*Blog, error) + ListByUser(ctx context.Context, in *ListByUserReq, opts ...grpc.CallOption) (*ListByUserResp, error) + GetBlogUserInfos(ctx context.Context, in *BlogUserInfosReq, opts ...grpc.CallOption) (*BlogUserInfos, error) + GetPageViews(ctx context.Context, in *GetPageViewsReq, opts ...grpc.CallOption) (*PageViews, error) } defaultBlogService struct { @@ -35,3 +52,23 @@ func (m *defaultBlogService) Get(ctx context.Context, in *GetReq, opts ...grpc.C client := blog.NewBlogServiceClient(m.cli.Conn()) return client.Get(ctx, in, opts...) } + +func (m *defaultBlogService) GetByUrl(ctx context.Context, in *GetByUrlReq, opts ...grpc.CallOption) (*Blog, error) { + client := blog.NewBlogServiceClient(m.cli.Conn()) + return client.GetByUrl(ctx, in, opts...) +} + +func (m *defaultBlogService) ListByUser(ctx context.Context, in *ListByUserReq, opts ...grpc.CallOption) (*ListByUserResp, error) { + client := blog.NewBlogServiceClient(m.cli.Conn()) + return client.ListByUser(ctx, in, opts...) +} + +func (m *defaultBlogService) GetBlogUserInfos(ctx context.Context, in *BlogUserInfosReq, opts ...grpc.CallOption) (*BlogUserInfos, error) { + client := blog.NewBlogServiceClient(m.cli.Conn()) + return client.GetBlogUserInfos(ctx, in, opts...) +} + +func (m *defaultBlogService) GetPageViews(ctx context.Context, in *GetPageViewsReq, opts ...grpc.CallOption) (*PageViews, error) { + client := blog.NewBlogServiceClient(m.cli.Conn()) + return client.GetPageViews(ctx, in, opts...) +} diff --git a/service/blog/rpc/internal/logic/get_blog_user_infos_logic.go b/service/blog/rpc/internal/logic/get_blog_user_infos_logic.go new file mode 100644 index 0000000..4fe2fc3 --- /dev/null +++ b/service/blog/rpc/internal/logic/get_blog_user_infos_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/blog/rpc/blog" + "github.com/linehk/go-blogger/service/blog/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetBlogUserInfosLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetBlogUserInfosLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetBlogUserInfosLogic { + return &GetBlogUserInfosLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetBlogUserInfosLogic) GetBlogUserInfos(in *blog.BlogUserInfosReq) (*blog.BlogUserInfos, error) { + // todo: add your logic here and delete this line + + return &blog.BlogUserInfos{}, nil +} diff --git a/service/blog/rpc/internal/logic/get_by_url_logic.go b/service/blog/rpc/internal/logic/get_by_url_logic.go new file mode 100644 index 0000000..0d62d2c --- /dev/null +++ b/service/blog/rpc/internal/logic/get_by_url_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/blog/rpc/blog" + "github.com/linehk/go-blogger/service/blog/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetByUrlLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetByUrlLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetByUrlLogic { + return &GetByUrlLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetByUrlLogic) GetByUrl(in *blog.GetByUrlReq) (*blog.Blog, error) { + // todo: add your logic here and delete this line + + return &blog.Blog{}, nil +} diff --git a/service/blog/rpc/internal/logic/get_page_views_logic.go b/service/blog/rpc/internal/logic/get_page_views_logic.go new file mode 100644 index 0000000..ed0f6dc --- /dev/null +++ b/service/blog/rpc/internal/logic/get_page_views_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/blog/rpc/blog" + "github.com/linehk/go-blogger/service/blog/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetPageViewsLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetPageViewsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPageViewsLogic { + return &GetPageViewsLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetPageViewsLogic) GetPageViews(in *blog.GetPageViewsReq) (*blog.PageViews, error) { + // todo: add your logic here and delete this line + + return &blog.PageViews{}, nil +} diff --git a/service/blog/rpc/internal/logic/list_by_user_logic.go b/service/blog/rpc/internal/logic/list_by_user_logic.go new file mode 100644 index 0000000..e2f1887 --- /dev/null +++ b/service/blog/rpc/internal/logic/list_by_user_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/blog/rpc/blog" + "github.com/linehk/go-blogger/service/blog/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListByUserLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListByUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListByUserLogic { + return &ListByUserLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListByUserLogic) ListByUser(in *blog.ListByUserReq) (*blog.ListByUserResp, error) { + // todo: add your logic here and delete this line + + return &blog.ListByUserResp{}, nil +} diff --git a/service/blog/rpc/internal/server/blog_service_server.go b/service/blog/rpc/internal/server/blog_service_server.go index 68441e4..db8ebab 100644 --- a/service/blog/rpc/internal/server/blog_service_server.go +++ b/service/blog/rpc/internal/server/blog_service_server.go @@ -26,3 +26,23 @@ func (s *BlogServiceServer) Get(ctx context.Context, in *blog.GetReq) (*blog.Blo l := logic.NewGetLogic(ctx, s.svcCtx) return l.Get(in) } + +func (s *BlogServiceServer) GetByUrl(ctx context.Context, in *blog.GetByUrlReq) (*blog.Blog, error) { + l := logic.NewGetByUrlLogic(ctx, s.svcCtx) + return l.GetByUrl(in) +} + +func (s *BlogServiceServer) ListByUser(ctx context.Context, in *blog.ListByUserReq) (*blog.ListByUserResp, error) { + l := logic.NewListByUserLogic(ctx, s.svcCtx) + return l.ListByUser(in) +} + +func (s *BlogServiceServer) GetBlogUserInfos(ctx context.Context, in *blog.BlogUserInfosReq) (*blog.BlogUserInfos, error) { + l := logic.NewGetBlogUserInfosLogic(ctx, s.svcCtx) + return l.GetBlogUserInfos(in) +} + +func (s *BlogServiceServer) GetPageViews(ctx context.Context, in *blog.GetPageViewsReq) (*blog.PageViews, error) { + l := logic.NewGetPageViewsLogic(ctx, s.svcCtx) + return l.GetPageViews(in) +} diff --git a/service/comment/rpc/comment.go b/service/comment/rpc/comment.go new file mode 100644 index 0000000..70c3e1b --- /dev/null +++ b/service/comment/rpc/comment.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/config" + "github.com/linehk/go-blogger/service/comment/rpc/internal/server" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/comment.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + comment.RegisterCommentServiceServer(grpcServer, server.NewCommentServiceServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/service/comment/rpc/comment/comment.pb.go b/service/comment/rpc/comment/comment.pb.go new file mode 100644 index 0000000..17fc7f0 --- /dev/null +++ b/service/comment/rpc/comment/comment.pb.go @@ -0,0 +1,1545 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: service/comment/rpc/comment.proto + +package comment + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Comment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + InReplyTo *InReplyTo `protobuf:"bytes,4,opt,name=inReplyTo,proto3" json:"inReplyTo,omitempty"` + Post *Post `protobuf:"bytes,5,opt,name=post,proto3" json:"post,omitempty"` + Blog *Blog `protobuf:"bytes,6,opt,name=blog,proto3" json:"blog,omitempty"` + Published *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=published,proto3" json:"published,omitempty"` + Updated *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated,proto3" json:"updated,omitempty"` + SelfLink string `protobuf:"bytes,9,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content,omitempty"` + Author *Author `protobuf:"bytes,11,opt,name=author,proto3" json:"author,omitempty"` +} + +func (x *Comment) Reset() { + *x = Comment{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Comment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Comment) ProtoMessage() {} + +func (x *Comment) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Comment.ProtoReflect.Descriptor instead. +func (*Comment) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{0} +} + +func (x *Comment) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Comment) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Comment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Comment) GetInReplyTo() *InReplyTo { + if x != nil { + return x.InReplyTo + } + return nil +} + +func (x *Comment) GetPost() *Post { + if x != nil { + return x.Post + } + return nil +} + +func (x *Comment) GetBlog() *Blog { + if x != nil { + return x.Blog + } + return nil +} + +func (x *Comment) GetPublished() *timestamppb.Timestamp { + if x != nil { + return x.Published + } + return nil +} + +func (x *Comment) GetUpdated() *timestamppb.Timestamp { + if x != nil { + return x.Updated + } + return nil +} + +func (x *Comment) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +func (x *Comment) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Comment) GetAuthor() *Author { + if x != nil { + return x.Author + } + return nil +} + +type Author struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + Image *Image `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` +} + +func (x *Author) Reset() { + *x = Author{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Author) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Author) ProtoMessage() {} + +func (x *Author) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Author.ProtoReflect.Descriptor instead. +func (*Author) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{1} +} + +func (x *Author) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Author) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Author) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Author) GetImage() *Image { + if x != nil { + return x.Image + } + return nil +} + +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{2} +} + +func (x *Image) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type InReplyTo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *InReplyTo) Reset() { + *x = InReplyTo{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InReplyTo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InReplyTo) ProtoMessage() {} + +func (x *InReplyTo) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InReplyTo.ProtoReflect.Descriptor instead. +func (*InReplyTo) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{3} +} + +func (x *InReplyTo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Post struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Post) Reset() { + *x = Post{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Post) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Post) ProtoMessage() {} + +func (x *Post) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Post.ProtoReflect.Descriptor instead. +func (*Post) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{4} +} + +func (x *Post) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Blog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Blog) Reset() { + *x = Blog{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Blog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Blog) ProtoMessage() {} + +func (x *Blog) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Blog.ProtoReflect.Descriptor instead. +func (*Blog) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{5} +} + +func (x *Blog) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + EndDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=endDate,proto3" json:"endDate,omitempty"` + FetchBodies bool `protobuf:"varint,4,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + MaxResults uint64 `protobuf:"varint,5,opt,name=maxResults,proto3" json:"maxResults,omitempty"` + PageToken string `protobuf:"bytes,6,opt,name=pageToken,proto3" json:"pageToken,omitempty"` + StartDate *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=startDate,proto3" json:"startDate,omitempty"` + Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + View string `protobuf:"bytes,9,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *ListReq) Reset() { + *x = ListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReq) ProtoMessage() {} + +func (x *ListReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReq.ProtoReflect.Descriptor instead. +func (*ListReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{6} +} + +func (x *ListReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ListReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *ListReq) GetEndDate() *timestamppb.Timestamp { + if x != nil { + return x.EndDate + } + return nil +} + +func (x *ListReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *ListReq) GetMaxResults() uint64 { + if x != nil { + return x.MaxResults + } + return 0 +} + +func (x *ListReq) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListReq) GetStartDate() *timestamppb.Timestamp { + if x != nil { + return x.StartDate + } + return nil +} + +func (x *ListReq) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type ListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=nextPageToken,proto3" json:"nextPageToken,omitempty"` + PrevPageToken string `protobuf:"bytes,3,opt,name=prevPageToken,proto3" json:"prevPageToken,omitempty"` + Items []*Comment `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListResp) Reset() { + *x = ListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResp) ProtoMessage() {} + +func (x *ListResp) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResp.ProtoReflect.Descriptor instead. +func (*ListResp) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{7} +} + +func (x *ListResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListResp) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListResp) GetPrevPageToken() string { + if x != nil { + return x.PrevPageToken + } + return "" +} + +func (x *ListResp) GetItems() []*Comment { + if x != nil { + return x.Items + } + return nil +} + +type GetReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + CommentId string `protobuf:"bytes,2,opt,name=commentId,proto3" json:"commentId,omitempty"` + PostId string `protobuf:"bytes,3,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *GetReq) Reset() { + *x = GetReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReq) ProtoMessage() {} + +func (x *GetReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReq.ProtoReflect.Descriptor instead. +func (*GetReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{8} +} + +func (x *GetReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetReq) GetCommentId() string { + if x != nil { + return x.CommentId + } + return "" +} + +func (x *GetReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type ApproveReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + CommentId string `protobuf:"bytes,2,opt,name=commentId,proto3" json:"commentId,omitempty"` + PostId string `protobuf:"bytes,3,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *ApproveReq) Reset() { + *x = ApproveReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApproveReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveReq) ProtoMessage() {} + +func (x *ApproveReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveReq.ProtoReflect.Descriptor instead. +func (*ApproveReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{9} +} + +func (x *ApproveReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ApproveReq) GetCommentId() string { + if x != nil { + return x.CommentId + } + return "" +} + +func (x *ApproveReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type DeleteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + CommentId string `protobuf:"bytes,2,opt,name=commentId,proto3" json:"commentId,omitempty"` + PostId string `protobuf:"bytes,3,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *DeleteReq) Reset() { + *x = DeleteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReq) ProtoMessage() {} + +func (x *DeleteReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead. +func (*DeleteReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *DeleteReq) GetCommentId() string { + if x != nil { + return x.CommentId + } + return "" +} + +func (x *DeleteReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type ListByBlogReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + EndDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=endDate,proto3" json:"endDate,omitempty"` + FetchBodies bool `protobuf:"varint,3,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + MaxResults uint64 `protobuf:"varint,4,opt,name=maxResults,proto3" json:"maxResults,omitempty"` + PageToken string `protobuf:"bytes,5,opt,name=pageToken,proto3" json:"pageToken,omitempty"` + StartDate *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=startDate,proto3" json:"startDate,omitempty"` +} + +func (x *ListByBlogReq) Reset() { + *x = ListByBlogReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListByBlogReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListByBlogReq) ProtoMessage() {} + +func (x *ListByBlogReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListByBlogReq.ProtoReflect.Descriptor instead. +func (*ListByBlogReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{11} +} + +func (x *ListByBlogReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ListByBlogReq) GetEndDate() *timestamppb.Timestamp { + if x != nil { + return x.EndDate + } + return nil +} + +func (x *ListByBlogReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *ListByBlogReq) GetMaxResults() uint64 { + if x != nil { + return x.MaxResults + } + return 0 +} + +func (x *ListByBlogReq) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListByBlogReq) GetStartDate() *timestamppb.Timestamp { + if x != nil { + return x.StartDate + } + return nil +} + +type ListByBlogResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=nextPageToken,proto3" json:"nextPageToken,omitempty"` + PrevPageToken string `protobuf:"bytes,3,opt,name=prevPageToken,proto3" json:"prevPageToken,omitempty"` + Items []*Comment `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListByBlogResp) Reset() { + *x = ListByBlogResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListByBlogResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListByBlogResp) ProtoMessage() {} + +func (x *ListByBlogResp) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListByBlogResp.ProtoReflect.Descriptor instead. +func (*ListByBlogResp) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{12} +} + +func (x *ListByBlogResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListByBlogResp) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListByBlogResp) GetPrevPageToken() string { + if x != nil { + return x.PrevPageToken + } + return "" +} + +func (x *ListByBlogResp) GetItems() []*Comment { + if x != nil { + return x.Items + } + return nil +} + +type MarkAsSpamReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + CommentId string `protobuf:"bytes,2,opt,name=commentId,proto3" json:"commentId,omitempty"` + PostId string `protobuf:"bytes,3,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *MarkAsSpamReq) Reset() { + *x = MarkAsSpamReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarkAsSpamReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkAsSpamReq) ProtoMessage() {} + +func (x *MarkAsSpamReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarkAsSpamReq.ProtoReflect.Descriptor instead. +func (*MarkAsSpamReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{13} +} + +func (x *MarkAsSpamReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *MarkAsSpamReq) GetCommentId() string { + if x != nil { + return x.CommentId + } + return "" +} + +func (x *MarkAsSpamReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type RemoveContentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + CommentId string `protobuf:"bytes,2,opt,name=commentId,proto3" json:"commentId,omitempty"` + PostId string `protobuf:"bytes,3,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *RemoveContentReq) Reset() { + *x = RemoveContentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveContentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveContentReq) ProtoMessage() {} + +func (x *RemoveContentReq) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveContentReq.ProtoReflect.Descriptor instead. +func (*RemoveContentReq) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{14} +} + +func (x *RemoveContentReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *RemoveContentReq) GetCommentId() string { + if x != nil { + return x.CommentId + } + return "" +} + +func (x *RemoveContentReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type EmptyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResp) Reset() { + *x = EmptyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_comment_rpc_comment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResp) ProtoMessage() {} + +func (x *EmptyResp) ProtoReflect() protoreflect.Message { + mi := &file_service_comment_rpc_comment_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. +func (*EmptyResp) Descriptor() ([]byte, []int) { + return file_service_comment_rpc_comment_proto_rawDescGZIP(), []int{15} +} + +var File_service_comment_rpc_comment_proto protoreflect.FileDescriptor + +var file_service_comment_rpc_comment_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x03, + 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x09, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x54, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x52, 0x09, 0x69, 0x6e, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x6c, + 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x12, 0x38, 0x0a, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x72, 0x0a, 0x06, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x22, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x1b, 0x0a, 0x09, 0x49, + 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x16, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x16, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb5, 0x02, 0x0a, 0x07, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x65, + 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x44, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x76, 0x69, 0x65, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, + 0x22, 0x92, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x70, 0x72, 0x65, 0x76, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x56, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x5a, 0x0a, + 0x0a, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x09, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x22, 0xf7, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x34, + 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, + 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x22, 0x98, + 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x70, + 0x72, 0x65, 0x76, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x61, 0x72, + 0x6b, 0x41, 0x73, 0x53, 0x70, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x32, 0x80, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0f, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, + 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x30, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x13, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, + 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x73, 0x53, 0x70, + 0x61, 0x6d, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x41, 0x73, 0x53, 0x70, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0d, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_comment_rpc_comment_proto_rawDescOnce sync.Once + file_service_comment_rpc_comment_proto_rawDescData = file_service_comment_rpc_comment_proto_rawDesc +) + +func file_service_comment_rpc_comment_proto_rawDescGZIP() []byte { + file_service_comment_rpc_comment_proto_rawDescOnce.Do(func() { + file_service_comment_rpc_comment_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_comment_rpc_comment_proto_rawDescData) + }) + return file_service_comment_rpc_comment_proto_rawDescData +} + +var file_service_comment_rpc_comment_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_service_comment_rpc_comment_proto_goTypes = []interface{}{ + (*Comment)(nil), // 0: comment.Comment + (*Author)(nil), // 1: comment.Author + (*Image)(nil), // 2: comment.Image + (*InReplyTo)(nil), // 3: comment.InReplyTo + (*Post)(nil), // 4: comment.Post + (*Blog)(nil), // 5: comment.Blog + (*ListReq)(nil), // 6: comment.ListReq + (*ListResp)(nil), // 7: comment.ListResp + (*GetReq)(nil), // 8: comment.GetReq + (*ApproveReq)(nil), // 9: comment.ApproveReq + (*DeleteReq)(nil), // 10: comment.DeleteReq + (*ListByBlogReq)(nil), // 11: comment.ListByBlogReq + (*ListByBlogResp)(nil), // 12: comment.ListByBlogResp + (*MarkAsSpamReq)(nil), // 13: comment.MarkAsSpamReq + (*RemoveContentReq)(nil), // 14: comment.RemoveContentReq + (*EmptyResp)(nil), // 15: comment.EmptyResp + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp +} +var file_service_comment_rpc_comment_proto_depIdxs = []int32{ + 3, // 0: comment.Comment.inReplyTo:type_name -> comment.InReplyTo + 4, // 1: comment.Comment.post:type_name -> comment.Post + 5, // 2: comment.Comment.blog:type_name -> comment.Blog + 16, // 3: comment.Comment.published:type_name -> google.protobuf.Timestamp + 16, // 4: comment.Comment.updated:type_name -> google.protobuf.Timestamp + 1, // 5: comment.Comment.author:type_name -> comment.Author + 2, // 6: comment.Author.image:type_name -> comment.Image + 16, // 7: comment.ListReq.endDate:type_name -> google.protobuf.Timestamp + 16, // 8: comment.ListReq.startDate:type_name -> google.protobuf.Timestamp + 0, // 9: comment.ListResp.items:type_name -> comment.Comment + 16, // 10: comment.ListByBlogReq.endDate:type_name -> google.protobuf.Timestamp + 16, // 11: comment.ListByBlogReq.startDate:type_name -> google.protobuf.Timestamp + 0, // 12: comment.ListByBlogResp.items:type_name -> comment.Comment + 6, // 13: comment.CommentService.List:input_type -> comment.ListReq + 8, // 14: comment.CommentService.Get:input_type -> comment.GetReq + 9, // 15: comment.CommentService.Approve:input_type -> comment.ApproveReq + 10, // 16: comment.CommentService.Delete:input_type -> comment.DeleteReq + 11, // 17: comment.CommentService.ListByBlog:input_type -> comment.ListByBlogReq + 13, // 18: comment.CommentService.MarkAsSpam:input_type -> comment.MarkAsSpamReq + 14, // 19: comment.CommentService.RemoveContent:input_type -> comment.RemoveContentReq + 7, // 20: comment.CommentService.List:output_type -> comment.ListResp + 0, // 21: comment.CommentService.Get:output_type -> comment.Comment + 0, // 22: comment.CommentService.Approve:output_type -> comment.Comment + 15, // 23: comment.CommentService.Delete:output_type -> comment.EmptyResp + 12, // 24: comment.CommentService.ListByBlog:output_type -> comment.ListByBlogResp + 0, // 25: comment.CommentService.MarkAsSpam:output_type -> comment.Comment + 0, // 26: comment.CommentService.RemoveContent:output_type -> comment.Comment + 20, // [20:27] is the sub-list for method output_type + 13, // [13:20] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_service_comment_rpc_comment_proto_init() } +func file_service_comment_rpc_comment_proto_init() { + if File_service_comment_rpc_comment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_comment_rpc_comment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Comment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Author); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InReplyTo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Post); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Blog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApproveReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListByBlogReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListByBlogResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkAsSpamReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveContentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_comment_rpc_comment_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_comment_rpc_comment_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_comment_rpc_comment_proto_goTypes, + DependencyIndexes: file_service_comment_rpc_comment_proto_depIdxs, + MessageInfos: file_service_comment_rpc_comment_proto_msgTypes, + }.Build() + File_service_comment_rpc_comment_proto = out.File + file_service_comment_rpc_comment_proto_rawDesc = nil + file_service_comment_rpc_comment_proto_goTypes = nil + file_service_comment_rpc_comment_proto_depIdxs = nil +} diff --git a/service/comment/rpc/comment/comment_grpc.pb.go b/service/comment/rpc/comment/comment_grpc.pb.go new file mode 100644 index 0000000..93ccc31 --- /dev/null +++ b/service/comment/rpc/comment/comment_grpc.pb.go @@ -0,0 +1,331 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.2 +// source: service/comment/rpc/comment.proto + +package comment + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + CommentService_List_FullMethodName = "/comment.CommentService/List" + CommentService_Get_FullMethodName = "/comment.CommentService/Get" + CommentService_Approve_FullMethodName = "/comment.CommentService/Approve" + CommentService_Delete_FullMethodName = "/comment.CommentService/Delete" + CommentService_ListByBlog_FullMethodName = "/comment.CommentService/ListByBlog" + CommentService_MarkAsSpam_FullMethodName = "/comment.CommentService/MarkAsSpam" + CommentService_RemoveContent_FullMethodName = "/comment.CommentService/RemoveContent" +) + +// CommentServiceClient is the client API for CommentService 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. +type CommentServiceClient interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Comment, error) + Approve(ctx context.Context, in *ApproveReq, opts ...grpc.CallOption) (*Comment, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + ListByBlog(ctx context.Context, in *ListByBlogReq, opts ...grpc.CallOption) (*ListByBlogResp, error) + MarkAsSpam(ctx context.Context, in *MarkAsSpamReq, opts ...grpc.CallOption) (*Comment, error) + RemoveContent(ctx context.Context, in *RemoveContentReq, opts ...grpc.CallOption) (*Comment, error) +} + +type commentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCommentServiceClient(cc grpc.ClientConnInterface) CommentServiceClient { + return &commentServiceClient{cc} +} + +func (c *commentServiceClient) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + out := new(ListResp) + err := c.cc.Invoke(ctx, CommentService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Comment, error) { + out := new(Comment) + err := c.cc.Invoke(ctx, CommentService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) Approve(ctx context.Context, in *ApproveReq, opts ...grpc.CallOption) (*Comment, error) { + out := new(Comment) + err := c.cc.Invoke(ctx, CommentService_Approve_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + out := new(EmptyResp) + err := c.cc.Invoke(ctx, CommentService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) ListByBlog(ctx context.Context, in *ListByBlogReq, opts ...grpc.CallOption) (*ListByBlogResp, error) { + out := new(ListByBlogResp) + err := c.cc.Invoke(ctx, CommentService_ListByBlog_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) MarkAsSpam(ctx context.Context, in *MarkAsSpamReq, opts ...grpc.CallOption) (*Comment, error) { + out := new(Comment) + err := c.cc.Invoke(ctx, CommentService_MarkAsSpam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commentServiceClient) RemoveContent(ctx context.Context, in *RemoveContentReq, opts ...grpc.CallOption) (*Comment, error) { + out := new(Comment) + err := c.cc.Invoke(ctx, CommentService_RemoveContent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CommentServiceServer is the server API for CommentService service. +// All implementations must embed UnimplementedCommentServiceServer +// for forward compatibility +type CommentServiceServer interface { + List(context.Context, *ListReq) (*ListResp, error) + Get(context.Context, *GetReq) (*Comment, error) + Approve(context.Context, *ApproveReq) (*Comment, error) + Delete(context.Context, *DeleteReq) (*EmptyResp, error) + ListByBlog(context.Context, *ListByBlogReq) (*ListByBlogResp, error) + MarkAsSpam(context.Context, *MarkAsSpamReq) (*Comment, error) + RemoveContent(context.Context, *RemoveContentReq) (*Comment, error) + mustEmbedUnimplementedCommentServiceServer() +} + +// UnimplementedCommentServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCommentServiceServer struct { +} + +func (UnimplementedCommentServiceServer) List(context.Context, *ListReq) (*ListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedCommentServiceServer) Get(context.Context, *GetReq) (*Comment, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedCommentServiceServer) Approve(context.Context, *ApproveReq) (*Comment, error) { + return nil, status.Errorf(codes.Unimplemented, "method Approve not implemented") +} +func (UnimplementedCommentServiceServer) Delete(context.Context, *DeleteReq) (*EmptyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedCommentServiceServer) ListByBlog(context.Context, *ListByBlogReq) (*ListByBlogResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByBlog not implemented") +} +func (UnimplementedCommentServiceServer) MarkAsSpam(context.Context, *MarkAsSpamReq) (*Comment, error) { + return nil, status.Errorf(codes.Unimplemented, "method MarkAsSpam not implemented") +} +func (UnimplementedCommentServiceServer) RemoveContent(context.Context, *RemoveContentReq) (*Comment, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveContent not implemented") +} +func (UnimplementedCommentServiceServer) mustEmbedUnimplementedCommentServiceServer() {} + +// UnsafeCommentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CommentServiceServer will +// result in compilation errors. +type UnsafeCommentServiceServer interface { + mustEmbedUnimplementedCommentServiceServer() +} + +func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer) { + s.RegisterService(&CommentService_ServiceDesc, srv) +} + +func _CommentService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).List(ctx, req.(*ListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).Get(ctx, req.(*GetReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_Approve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApproveReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).Approve(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_Approve_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).Approve(ctx, req.(*ApproveReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).Delete(ctx, req.(*DeleteReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_ListByBlog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListByBlogReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).ListByBlog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_ListByBlog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).ListByBlog(ctx, req.(*ListByBlogReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_MarkAsSpam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarkAsSpamReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).MarkAsSpam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_MarkAsSpam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).MarkAsSpam(ctx, req.(*MarkAsSpamReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommentService_RemoveContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveContentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommentServiceServer).RemoveContent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommentService_RemoveContent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommentServiceServer).RemoveContent(ctx, req.(*RemoveContentReq)) + } + return interceptor(ctx, in, info, handler) +} + +// CommentService_ServiceDesc is the grpc.ServiceDesc for CommentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CommentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "comment.CommentService", + HandlerType: (*CommentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _CommentService_List_Handler, + }, + { + MethodName: "Get", + Handler: _CommentService_Get_Handler, + }, + { + MethodName: "Approve", + Handler: _CommentService_Approve_Handler, + }, + { + MethodName: "Delete", + Handler: _CommentService_Delete_Handler, + }, + { + MethodName: "ListByBlog", + Handler: _CommentService_ListByBlog_Handler, + }, + { + MethodName: "MarkAsSpam", + Handler: _CommentService_MarkAsSpam_Handler, + }, + { + MethodName: "RemoveContent", + Handler: _CommentService_RemoveContent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/comment/rpc/comment.proto", +} diff --git a/service/comment/rpc/commentservice/comment_service.go b/service/comment/rpc/commentservice/comment_service.go new file mode 100644 index 0000000..541a58b --- /dev/null +++ b/service/comment/rpc/commentservice/comment_service.go @@ -0,0 +1,87 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: comment.proto + +package commentservice + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + ApproveReq = comment.ApproveReq + Author = comment.Author + Blog = comment.Blog + Comment = comment.Comment + DeleteReq = comment.DeleteReq + EmptyResp = comment.EmptyResp + GetReq = comment.GetReq + Image = comment.Image + InReplyTo = comment.InReplyTo + ListByBlogReq = comment.ListByBlogReq + ListByBlogResp = comment.ListByBlogResp + ListReq = comment.ListReq + ListResp = comment.ListResp + MarkAsSpamReq = comment.MarkAsSpamReq + Post = comment.Post + RemoveContentReq = comment.RemoveContentReq + + CommentService interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Comment, error) + Approve(ctx context.Context, in *ApproveReq, opts ...grpc.CallOption) (*Comment, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + ListByBlog(ctx context.Context, in *ListByBlogReq, opts ...grpc.CallOption) (*ListByBlogResp, error) + MarkAsSpam(ctx context.Context, in *MarkAsSpamReq, opts ...grpc.CallOption) (*Comment, error) + RemoveContent(ctx context.Context, in *RemoveContentReq, opts ...grpc.CallOption) (*Comment, error) + } + + defaultCommentService struct { + cli zrpc.Client + } +) + +func NewCommentService(cli zrpc.Client) CommentService { + return &defaultCommentService{ + cli: cli, + } +} + +func (m *defaultCommentService) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.List(ctx, in, opts...) +} + +func (m *defaultCommentService) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Comment, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.Get(ctx, in, opts...) +} + +func (m *defaultCommentService) Approve(ctx context.Context, in *ApproveReq, opts ...grpc.CallOption) (*Comment, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.Approve(ctx, in, opts...) +} + +func (m *defaultCommentService) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.Delete(ctx, in, opts...) +} + +func (m *defaultCommentService) ListByBlog(ctx context.Context, in *ListByBlogReq, opts ...grpc.CallOption) (*ListByBlogResp, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.ListByBlog(ctx, in, opts...) +} + +func (m *defaultCommentService) MarkAsSpam(ctx context.Context, in *MarkAsSpamReq, opts ...grpc.CallOption) (*Comment, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.MarkAsSpam(ctx, in, opts...) +} + +func (m *defaultCommentService) RemoveContent(ctx context.Context, in *RemoveContentReq, opts ...grpc.CallOption) (*Comment, error) { + client := comment.NewCommentServiceClient(m.cli.Conn()) + return client.RemoveContent(ctx, in, opts...) +} diff --git a/service/comment/rpc/etc/comment.yaml b/service/comment/rpc/etc/comment.yaml new file mode 100644 index 0000000..88d1cf4 --- /dev/null +++ b/service/comment/rpc/etc/comment.yaml @@ -0,0 +1,6 @@ +Name: comment.rpc +ListenOn: 0.0.0.0:8080 +Etcd: + Hosts: + - 127.0.0.1:2379 + Key: comment.rpc diff --git a/service/comment/rpc/internal/config/config.go b/service/comment/rpc/internal/config/config.go new file mode 100755 index 0000000..c1f85b9 --- /dev/null +++ b/service/comment/rpc/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/service/comment/rpc/internal/logic/approve_logic.go b/service/comment/rpc/internal/logic/approve_logic.go new file mode 100644 index 0000000..7dc74cf --- /dev/null +++ b/service/comment/rpc/internal/logic/approve_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ApproveLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewApproveLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApproveLogic { + return &ApproveLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ApproveLogic) Approve(in *comment.ApproveReq) (*comment.Comment, error) { + // todo: add your logic here and delete this line + + return &comment.Comment{}, nil +} diff --git a/service/comment/rpc/internal/logic/delete_logic.go b/service/comment/rpc/internal/logic/delete_logic.go new file mode 100644 index 0000000..90d1a5c --- /dev/null +++ b/service/comment/rpc/internal/logic/delete_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type DeleteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteLogic { + return &DeleteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *DeleteLogic) Delete(in *comment.DeleteReq) (*comment.EmptyResp, error) { + // todo: add your logic here and delete this line + + return &comment.EmptyResp{}, nil +} diff --git a/service/comment/rpc/internal/logic/get_logic.go b/service/comment/rpc/internal/logic/get_logic.go new file mode 100644 index 0000000..5bf48a9 --- /dev/null +++ b/service/comment/rpc/internal/logic/get_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLogic { + return &GetLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetLogic) Get(in *comment.GetReq) (*comment.Comment, error) { + // todo: add your logic here and delete this line + + return &comment.Comment{}, nil +} diff --git a/service/comment/rpc/internal/logic/list_by_blog_logic.go b/service/comment/rpc/internal/logic/list_by_blog_logic.go new file mode 100644 index 0000000..62fe9a0 --- /dev/null +++ b/service/comment/rpc/internal/logic/list_by_blog_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListByBlogLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListByBlogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListByBlogLogic { + return &ListByBlogLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListByBlogLogic) ListByBlog(in *comment.ListByBlogReq) (*comment.ListByBlogResp, error) { + // todo: add your logic here and delete this line + + return &comment.ListByBlogResp{}, nil +} diff --git a/service/comment/rpc/internal/logic/list_logic.go b/service/comment/rpc/internal/logic/list_logic.go new file mode 100644 index 0000000..9f621c5 --- /dev/null +++ b/service/comment/rpc/internal/logic/list_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListLogic { + return &ListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListLogic) List(in *comment.ListReq) (*comment.ListResp, error) { + // todo: add your logic here and delete this line + + return &comment.ListResp{}, nil +} diff --git a/service/comment/rpc/internal/logic/mark_as_spam_logic.go b/service/comment/rpc/internal/logic/mark_as_spam_logic.go new file mode 100644 index 0000000..b20938b --- /dev/null +++ b/service/comment/rpc/internal/logic/mark_as_spam_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type MarkAsSpamLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewMarkAsSpamLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MarkAsSpamLogic { + return &MarkAsSpamLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *MarkAsSpamLogic) MarkAsSpam(in *comment.MarkAsSpamReq) (*comment.Comment, error) { + // todo: add your logic here and delete this line + + return &comment.Comment{}, nil +} diff --git a/service/comment/rpc/internal/logic/remove_content_logic.go b/service/comment/rpc/internal/logic/remove_content_logic.go new file mode 100644 index 0000000..cd456d5 --- /dev/null +++ b/service/comment/rpc/internal/logic/remove_content_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type RemoveContentLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewRemoveContentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RemoveContentLogic { + return &RemoveContentLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *RemoveContentLogic) RemoveContent(in *comment.RemoveContentReq) (*comment.Comment, error) { + // todo: add your logic here and delete this line + + return &comment.Comment{}, nil +} diff --git a/service/comment/rpc/internal/server/comment_service_server.go b/service/comment/rpc/internal/server/comment_service_server.go new file mode 100644 index 0000000..f37e72f --- /dev/null +++ b/service/comment/rpc/internal/server/comment_service_server.go @@ -0,0 +1,58 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: comment.proto + +package server + +import ( + "context" + + "github.com/linehk/go-blogger/service/comment/rpc/comment" + "github.com/linehk/go-blogger/service/comment/rpc/internal/logic" + "github.com/linehk/go-blogger/service/comment/rpc/internal/svc" +) + +type CommentServiceServer struct { + svcCtx *svc.ServiceContext + comment.UnimplementedCommentServiceServer +} + +func NewCommentServiceServer(svcCtx *svc.ServiceContext) *CommentServiceServer { + return &CommentServiceServer{ + svcCtx: svcCtx, + } +} + +func (s *CommentServiceServer) List(ctx context.Context, in *comment.ListReq) (*comment.ListResp, error) { + l := logic.NewListLogic(ctx, s.svcCtx) + return l.List(in) +} + +func (s *CommentServiceServer) Get(ctx context.Context, in *comment.GetReq) (*comment.Comment, error) { + l := logic.NewGetLogic(ctx, s.svcCtx) + return l.Get(in) +} + +func (s *CommentServiceServer) Approve(ctx context.Context, in *comment.ApproveReq) (*comment.Comment, error) { + l := logic.NewApproveLogic(ctx, s.svcCtx) + return l.Approve(in) +} + +func (s *CommentServiceServer) Delete(ctx context.Context, in *comment.DeleteReq) (*comment.EmptyResp, error) { + l := logic.NewDeleteLogic(ctx, s.svcCtx) + return l.Delete(in) +} + +func (s *CommentServiceServer) ListByBlog(ctx context.Context, in *comment.ListByBlogReq) (*comment.ListByBlogResp, error) { + l := logic.NewListByBlogLogic(ctx, s.svcCtx) + return l.ListByBlog(in) +} + +func (s *CommentServiceServer) MarkAsSpam(ctx context.Context, in *comment.MarkAsSpamReq) (*comment.Comment, error) { + l := logic.NewMarkAsSpamLogic(ctx, s.svcCtx) + return l.MarkAsSpam(in) +} + +func (s *CommentServiceServer) RemoveContent(ctx context.Context, in *comment.RemoveContentReq) (*comment.Comment, error) { + l := logic.NewRemoveContentLogic(ctx, s.svcCtx) + return l.RemoveContent(in) +} diff --git a/service/comment/rpc/internal/svc/service_context.go b/service/comment/rpc/internal/svc/service_context.go new file mode 100644 index 0000000..b485ef4 --- /dev/null +++ b/service/comment/rpc/internal/svc/service_context.go @@ -0,0 +1,13 @@ +package svc + +import "github.com/linehk/go-blogger/service/comment/rpc/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} diff --git a/service/page/rpc/etc/page.yaml b/service/page/rpc/etc/page.yaml new file mode 100644 index 0000000..da3ef70 --- /dev/null +++ b/service/page/rpc/etc/page.yaml @@ -0,0 +1,6 @@ +Name: page.rpc +ListenOn: 0.0.0.0:8080 +Etcd: + Hosts: + - 127.0.0.1:2379 + Key: page.rpc diff --git a/service/page/rpc/internal/config/config.go b/service/page/rpc/internal/config/config.go new file mode 100755 index 0000000..c1f85b9 --- /dev/null +++ b/service/page/rpc/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/service/page/rpc/internal/logic/delete_logic.go b/service/page/rpc/internal/logic/delete_logic.go new file mode 100644 index 0000000..3370231 --- /dev/null +++ b/service/page/rpc/internal/logic/delete_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type DeleteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteLogic { + return &DeleteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *DeleteLogic) Delete(in *page.DeleteReq) (*page.EmptyResp, error) { + // todo: add your logic here and delete this line + + return &page.EmptyResp{}, nil +} diff --git a/service/page/rpc/internal/logic/get_logic.go b/service/page/rpc/internal/logic/get_logic.go new file mode 100644 index 0000000..b616a05 --- /dev/null +++ b/service/page/rpc/internal/logic/get_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLogic { + return &GetLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetLogic) Get(in *page.GetReq) (*page.Page, error) { + // todo: add your logic here and delete this line + + return &page.Page{}, nil +} diff --git a/service/page/rpc/internal/logic/insert_logic.go b/service/page/rpc/internal/logic/insert_logic.go new file mode 100644 index 0000000..57faf15 --- /dev/null +++ b/service/page/rpc/internal/logic/insert_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type InsertLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewInsertLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InsertLogic { + return &InsertLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *InsertLogic) Insert(in *page.InsertReq) (*page.Page, error) { + // todo: add your logic here and delete this line + + return &page.Page{}, nil +} diff --git a/service/page/rpc/internal/logic/list_logic.go b/service/page/rpc/internal/logic/list_logic.go new file mode 100644 index 0000000..669f33a --- /dev/null +++ b/service/page/rpc/internal/logic/list_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListLogic { + return &ListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListLogic) List(in *page.ListReq) (*page.ListResp, error) { + // todo: add your logic here and delete this line + + return &page.ListResp{}, nil +} diff --git a/service/page/rpc/internal/logic/patch_logic.go b/service/page/rpc/internal/logic/patch_logic.go new file mode 100644 index 0000000..e3298de --- /dev/null +++ b/service/page/rpc/internal/logic/patch_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type PatchLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewPatchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PatchLogic { + return &PatchLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *PatchLogic) Patch(in *page.PatchReq) (*page.Page, error) { + // todo: add your logic here and delete this line + + return &page.Page{}, nil +} diff --git a/service/page/rpc/internal/logic/update_logic.go b/service/page/rpc/internal/logic/update_logic.go new file mode 100644 index 0000000..d563c93 --- /dev/null +++ b/service/page/rpc/internal/logic/update_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UpdateLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateLogic { + return &UpdateLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UpdateLogic) Update(in *page.UpdateReq) (*page.Page, error) { + // todo: add your logic here and delete this line + + return &page.Page{}, nil +} diff --git a/service/page/rpc/internal/server/page_service_server.go b/service/page/rpc/internal/server/page_service_server.go new file mode 100644 index 0000000..53e95fa --- /dev/null +++ b/service/page/rpc/internal/server/page_service_server.go @@ -0,0 +1,53 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: page.proto + +package server + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/internal/logic" + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" +) + +type PageServiceServer struct { + svcCtx *svc.ServiceContext + page.UnimplementedPageServiceServer +} + +func NewPageServiceServer(svcCtx *svc.ServiceContext) *PageServiceServer { + return &PageServiceServer{ + svcCtx: svcCtx, + } +} + +func (s *PageServiceServer) List(ctx context.Context, in *page.ListReq) (*page.ListResp, error) { + l := logic.NewListLogic(ctx, s.svcCtx) + return l.List(in) +} + +func (s *PageServiceServer) Get(ctx context.Context, in *page.GetReq) (*page.Page, error) { + l := logic.NewGetLogic(ctx, s.svcCtx) + return l.Get(in) +} + +func (s *PageServiceServer) Delete(ctx context.Context, in *page.DeleteReq) (*page.EmptyResp, error) { + l := logic.NewDeleteLogic(ctx, s.svcCtx) + return l.Delete(in) +} + +func (s *PageServiceServer) Insert(ctx context.Context, in *page.InsertReq) (*page.Page, error) { + l := logic.NewInsertLogic(ctx, s.svcCtx) + return l.Insert(in) +} + +func (s *PageServiceServer) Patch(ctx context.Context, in *page.PatchReq) (*page.Page, error) { + l := logic.NewPatchLogic(ctx, s.svcCtx) + return l.Patch(in) +} + +func (s *PageServiceServer) Update(ctx context.Context, in *page.UpdateReq) (*page.Page, error) { + l := logic.NewUpdateLogic(ctx, s.svcCtx) + return l.Update(in) +} diff --git a/service/page/rpc/internal/svc/service_context.go b/service/page/rpc/internal/svc/service_context.go new file mode 100644 index 0000000..55d0113 --- /dev/null +++ b/service/page/rpc/internal/svc/service_context.go @@ -0,0 +1,13 @@ +package svc + +import "github.com/linehk/go-blogger/service/page/rpc/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} diff --git a/service/page/rpc/page.go b/service/page/rpc/page.go new file mode 100644 index 0000000..18fba62 --- /dev/null +++ b/service/page/rpc/page.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "github.com/linehk/go-blogger/service/page/rpc/internal/config" + "github.com/linehk/go-blogger/service/page/rpc/internal/server" + "github.com/linehk/go-blogger/service/page/rpc/internal/svc" + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/page.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + page.RegisterPageServiceServer(grpcServer, server.NewPageServiceServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/service/page/rpc/page/page.pb.go b/service/page/rpc/page/page.pb.go new file mode 100644 index 0000000..88f6214 --- /dev/null +++ b/service/page/rpc/page/page.pb.go @@ -0,0 +1,1109 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: service/page/rpc/page.proto + +package page + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Page struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + Blog *Blog `protobuf:"bytes,4,opt,name=blog,proto3" json:"blog,omitempty"` + Published *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=published,proto3" json:"published,omitempty"` + Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` + Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` + SelfLink string `protobuf:"bytes,8,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Title string `protobuf:"bytes,9,opt,name=title,proto3" json:"title,omitempty"` + Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content,omitempty"` + Author *Author `protobuf:"bytes,11,opt,name=author,proto3" json:"author,omitempty"` +} + +func (x *Page) Reset() { + *x = Page{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Page) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Page) ProtoMessage() {} + +func (x *Page) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Page.ProtoReflect.Descriptor instead. +func (*Page) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{0} +} + +func (x *Page) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Page) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Page) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Page) GetBlog() *Blog { + if x != nil { + return x.Blog + } + return nil +} + +func (x *Page) GetPublished() *timestamppb.Timestamp { + if x != nil { + return x.Published + } + return nil +} + +func (x *Page) GetUpdated() *timestamppb.Timestamp { + if x != nil { + return x.Updated + } + return nil +} + +func (x *Page) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Page) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +func (x *Page) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Page) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Page) GetAuthor() *Author { + if x != nil { + return x.Author + } + return nil +} + +type Blog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Blog) Reset() { + *x = Blog{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Blog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Blog) ProtoMessage() {} + +func (x *Blog) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Blog.ProtoReflect.Descriptor instead. +func (*Blog) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{1} +} + +func (x *Blog) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Author struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + Image *Image `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` +} + +func (x *Author) Reset() { + *x = Author{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Author) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Author) ProtoMessage() {} + +func (x *Author) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Author.ProtoReflect.Descriptor instead. +func (*Author) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{2} +} + +func (x *Author) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Author) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Author) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Author) GetImage() *Image { + if x != nil { + return x.Image + } + return nil +} + +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{3} +} + +func (x *Image) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type ListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + FetchBodies bool `protobuf:"varint,2,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + View string `protobuf:"bytes,4,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *ListReq) Reset() { + *x = ListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReq) ProtoMessage() {} + +func (x *ListReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReq.ProtoReflect.Descriptor instead. +func (*ListReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{4} +} + +func (x *ListReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ListReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *ListReq) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type ListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Items []*Page `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListResp) Reset() { + *x = ListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResp) ProtoMessage() {} + +func (x *ListResp) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResp.ProtoReflect.Descriptor instead. +func (*ListResp) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{5} +} + +func (x *ListResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListResp) GetItems() []*Page { + if x != nil { + return x.Items + } + return nil +} + +type GetReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PageId string `protobuf:"bytes,2,opt,name=pageId,proto3" json:"pageId,omitempty"` + View string `protobuf:"bytes,3,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *GetReq) Reset() { + *x = GetReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReq) ProtoMessage() {} + +func (x *GetReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReq.ProtoReflect.Descriptor instead. +func (*GetReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{6} +} + +func (x *GetReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetReq) GetPageId() string { + if x != nil { + return x.PageId + } + return "" +} + +func (x *GetReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type DeleteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PageId string `protobuf:"bytes,2,opt,name=pageId,proto3" json:"pageId,omitempty"` + UseTrash bool `protobuf:"varint,3,opt,name=useTrash,proto3" json:"useTrash,omitempty"` +} + +func (x *DeleteReq) Reset() { + *x = DeleteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReq) ProtoMessage() {} + +func (x *DeleteReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead. +func (*DeleteReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *DeleteReq) GetPageId() string { + if x != nil { + return x.PageId + } + return "" +} + +func (x *DeleteReq) GetUseTrash() bool { + if x != nil { + return x.UseTrash + } + return false +} + +type InsertReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + Page *Page `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *InsertReq) Reset() { + *x = InsertReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InsertReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertReq) ProtoMessage() {} + +func (x *InsertReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertReq.ProtoReflect.Descriptor instead. +func (*InsertReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{8} +} + +func (x *InsertReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *InsertReq) GetPage() *Page { + if x != nil { + return x.Page + } + return nil +} + +type PatchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PageId string `protobuf:"bytes,2,opt,name=pageId,proto3" json:"pageId,omitempty"` + Page *Page `protobuf:"bytes,3,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *PatchReq) Reset() { + *x = PatchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchReq) ProtoMessage() {} + +func (x *PatchReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchReq.ProtoReflect.Descriptor instead. +func (*PatchReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{9} +} + +func (x *PatchReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *PatchReq) GetPageId() string { + if x != nil { + return x.PageId + } + return "" +} + +func (x *PatchReq) GetPage() *Page { + if x != nil { + return x.Page + } + return nil +} + +type UpdateReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PageId string `protobuf:"bytes,2,opt,name=pageId,proto3" json:"pageId,omitempty"` + Page *Page `protobuf:"bytes,3,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *UpdateReq) Reset() { + *x = UpdateReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReq) ProtoMessage() {} + +func (x *UpdateReq) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReq.ProtoReflect.Descriptor instead. +func (*UpdateReq) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *UpdateReq) GetPageId() string { + if x != nil { + return x.PageId + } + return "" +} + +func (x *UpdateReq) GetPage() *Page { + if x != nil { + return x.Page + } + return nil +} + +type EmptyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResp) Reset() { + *x = EmptyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_page_rpc_page_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResp) ProtoMessage() {} + +func (x *EmptyResp) ProtoReflect() protoreflect.Message { + mi := &file_service_page_rpc_page_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. +func (*EmptyResp) Descriptor() ([]byte, []int) { + return file_service_page_rpc_page_proto_rawDescGZIP(), []int{11} +} + +var File_service_page_rpc_page_proto protoreflect.FileDescriptor + +var file_service_page_rpc_page_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x02, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x42, + 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x16, 0x0a, + 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, + 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x22, 0x6f, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, + 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, + 0x65, 0x77, 0x22, 0x40, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4c, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, + 0x65, 0x77, 0x22, 0x57, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, + 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x54, 0x72, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x75, 0x73, 0x65, 0x54, 0x72, 0x61, 0x73, 0x68, 0x22, 0x43, 0x0a, 0x09, 0x49, + 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, + 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, + 0x22, 0x5a, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x61, 0x67, + 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x5b, 0x0a, 0x09, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x32, 0xf4, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0d, + 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, + 0x70, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, + 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x12, 0x2a, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0f, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x61, 0x67, 0x65, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x49, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x12, 0x0f, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x65, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x12, 0x23, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x2e, 0x70, 0x61, 0x67, + 0x65, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x61, 0x67, + 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x0f, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x42, 0x08, 0x5a, + 0x06, 0x2e, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_page_rpc_page_proto_rawDescOnce sync.Once + file_service_page_rpc_page_proto_rawDescData = file_service_page_rpc_page_proto_rawDesc +) + +func file_service_page_rpc_page_proto_rawDescGZIP() []byte { + file_service_page_rpc_page_proto_rawDescOnce.Do(func() { + file_service_page_rpc_page_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_page_rpc_page_proto_rawDescData) + }) + return file_service_page_rpc_page_proto_rawDescData +} + +var file_service_page_rpc_page_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_service_page_rpc_page_proto_goTypes = []interface{}{ + (*Page)(nil), // 0: page.Page + (*Blog)(nil), // 1: page.Blog + (*Author)(nil), // 2: page.Author + (*Image)(nil), // 3: page.Image + (*ListReq)(nil), // 4: page.ListReq + (*ListResp)(nil), // 5: page.ListResp + (*GetReq)(nil), // 6: page.GetReq + (*DeleteReq)(nil), // 7: page.DeleteReq + (*InsertReq)(nil), // 8: page.InsertReq + (*PatchReq)(nil), // 9: page.PatchReq + (*UpdateReq)(nil), // 10: page.UpdateReq + (*EmptyResp)(nil), // 11: page.EmptyResp + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_service_page_rpc_page_proto_depIdxs = []int32{ + 1, // 0: page.Page.blog:type_name -> page.Blog + 12, // 1: page.Page.published:type_name -> google.protobuf.Timestamp + 12, // 2: page.Page.updated:type_name -> google.protobuf.Timestamp + 2, // 3: page.Page.author:type_name -> page.Author + 3, // 4: page.Author.image:type_name -> page.Image + 0, // 5: page.ListResp.items:type_name -> page.Page + 0, // 6: page.InsertReq.page:type_name -> page.Page + 0, // 7: page.PatchReq.page:type_name -> page.Page + 0, // 8: page.UpdateReq.page:type_name -> page.Page + 4, // 9: page.PageService.List:input_type -> page.ListReq + 6, // 10: page.PageService.Get:input_type -> page.GetReq + 7, // 11: page.PageService.Delete:input_type -> page.DeleteReq + 8, // 12: page.PageService.Insert:input_type -> page.InsertReq + 9, // 13: page.PageService.Patch:input_type -> page.PatchReq + 10, // 14: page.PageService.Update:input_type -> page.UpdateReq + 5, // 15: page.PageService.List:output_type -> page.ListResp + 0, // 16: page.PageService.Get:output_type -> page.Page + 11, // 17: page.PageService.Delete:output_type -> page.EmptyResp + 0, // 18: page.PageService.Insert:output_type -> page.Page + 0, // 19: page.PageService.Patch:output_type -> page.Page + 0, // 20: page.PageService.Update:output_type -> page.Page + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_service_page_rpc_page_proto_init() } +func file_service_page_rpc_page_proto_init() { + if File_service_page_rpc_page_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_page_rpc_page_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Page); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Blog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Author); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InsertReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_page_rpc_page_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_page_rpc_page_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_page_rpc_page_proto_goTypes, + DependencyIndexes: file_service_page_rpc_page_proto_depIdxs, + MessageInfos: file_service_page_rpc_page_proto_msgTypes, + }.Build() + File_service_page_rpc_page_proto = out.File + file_service_page_rpc_page_proto_rawDesc = nil + file_service_page_rpc_page_proto_goTypes = nil + file_service_page_rpc_page_proto_depIdxs = nil +} diff --git a/service/page/rpc/page/page_grpc.pb.go b/service/page/rpc/page/page_grpc.pb.go new file mode 100644 index 0000000..0476e79 --- /dev/null +++ b/service/page/rpc/page/page_grpc.pb.go @@ -0,0 +1,294 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.2 +// source: service/page/rpc/page.proto + +package page + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PageService_List_FullMethodName = "/page.PageService/List" + PageService_Get_FullMethodName = "/page.PageService/Get" + PageService_Delete_FullMethodName = "/page.PageService/Delete" + PageService_Insert_FullMethodName = "/page.PageService/Insert" + PageService_Patch_FullMethodName = "/page.PageService/Patch" + PageService_Update_FullMethodName = "/page.PageService/Update" +) + +// PageServiceClient is the client API for PageService 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. +type PageServiceClient interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Page, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Page, error) + Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Page, error) + Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Page, error) +} + +type pageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPageServiceClient(cc grpc.ClientConnInterface) PageServiceClient { + return &pageServiceClient{cc} +} + +func (c *pageServiceClient) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + out := new(ListResp) + err := c.cc.Invoke(ctx, PageService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pageServiceClient) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, PageService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pageServiceClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + out := new(EmptyResp) + err := c.cc.Invoke(ctx, PageService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pageServiceClient) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, PageService_Insert_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pageServiceClient) Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, PageService_Patch_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pageServiceClient) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, PageService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PageServiceServer is the server API for PageService service. +// All implementations must embed UnimplementedPageServiceServer +// for forward compatibility +type PageServiceServer interface { + List(context.Context, *ListReq) (*ListResp, error) + Get(context.Context, *GetReq) (*Page, error) + Delete(context.Context, *DeleteReq) (*EmptyResp, error) + Insert(context.Context, *InsertReq) (*Page, error) + Patch(context.Context, *PatchReq) (*Page, error) + Update(context.Context, *UpdateReq) (*Page, error) + mustEmbedUnimplementedPageServiceServer() +} + +// UnimplementedPageServiceServer must be embedded to have forward compatible implementations. +type UnimplementedPageServiceServer struct { +} + +func (UnimplementedPageServiceServer) List(context.Context, *ListReq) (*ListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedPageServiceServer) Get(context.Context, *GetReq) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedPageServiceServer) Delete(context.Context, *DeleteReq) (*EmptyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedPageServiceServer) Insert(context.Context, *InsertReq) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented") +} +func (UnimplementedPageServiceServer) Patch(context.Context, *PatchReq) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented") +} +func (UnimplementedPageServiceServer) Update(context.Context, *UpdateReq) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedPageServiceServer) mustEmbedUnimplementedPageServiceServer() {} + +// UnsafePageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PageServiceServer will +// result in compilation errors. +type UnsafePageServiceServer interface { + mustEmbedUnimplementedPageServiceServer() +} + +func RegisterPageServiceServer(s grpc.ServiceRegistrar, srv PageServiceServer) { + s.RegisterService(&PageService_ServiceDesc, srv) +} + +func _PageService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).List(ctx, req.(*ListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PageService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).Get(ctx, req.(*GetReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PageService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).Delete(ctx, req.(*DeleteReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PageService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).Insert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_Insert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).Insert(ctx, req.(*InsertReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PageService_Patch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PatchReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).Patch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_Patch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).Patch(ctx, req.(*PatchReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PageService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PageServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PageService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PageServiceServer).Update(ctx, req.(*UpdateReq)) + } + return interceptor(ctx, in, info, handler) +} + +// PageService_ServiceDesc is the grpc.ServiceDesc for PageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "page.PageService", + HandlerType: (*PageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _PageService_List_Handler, + }, + { + MethodName: "Get", + Handler: _PageService_Get_Handler, + }, + { + MethodName: "Delete", + Handler: _PageService_Delete_Handler, + }, + { + MethodName: "Insert", + Handler: _PageService_Insert_Handler, + }, + { + MethodName: "Patch", + Handler: _PageService_Patch_Handler, + }, + { + MethodName: "Update", + Handler: _PageService_Update_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/page/rpc/page.proto", +} diff --git a/service/page/rpc/pageservice/page_service.go b/service/page/rpc/pageservice/page_service.go new file mode 100644 index 0000000..478145a --- /dev/null +++ b/service/page/rpc/pageservice/page_service.go @@ -0,0 +1,77 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: page.proto + +package pageservice + +import ( + "context" + + "github.com/linehk/go-blogger/service/page/rpc/page" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + Author = page.Author + Blog = page.Blog + DeleteReq = page.DeleteReq + EmptyResp = page.EmptyResp + GetReq = page.GetReq + Image = page.Image + InsertReq = page.InsertReq + ListReq = page.ListReq + ListResp = page.ListResp + Page = page.Page + PatchReq = page.PatchReq + UpdateReq = page.UpdateReq + + PageService interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Page, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Page, error) + Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Page, error) + Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Page, error) + } + + defaultPageService struct { + cli zrpc.Client + } +) + +func NewPageService(cli zrpc.Client) PageService { + return &defaultPageService{ + cli: cli, + } +} + +func (m *defaultPageService) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.List(ctx, in, opts...) +} + +func (m *defaultPageService) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Page, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.Get(ctx, in, opts...) +} + +func (m *defaultPageService) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.Delete(ctx, in, opts...) +} + +func (m *defaultPageService) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Page, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.Insert(ctx, in, opts...) +} + +func (m *defaultPageService) Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Page, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.Patch(ctx, in, opts...) +} + +func (m *defaultPageService) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Page, error) { + client := page.NewPageServiceClient(m.cli.Conn()) + return client.Update(ctx, in, opts...) +} diff --git a/service/post/rpc/etc/post.yaml b/service/post/rpc/etc/post.yaml new file mode 100644 index 0000000..cc15e5b --- /dev/null +++ b/service/post/rpc/etc/post.yaml @@ -0,0 +1,6 @@ +Name: post.rpc +ListenOn: 0.0.0.0:8080 +Etcd: + Hosts: + - 127.0.0.1:2379 + Key: post.rpc diff --git a/service/post/rpc/internal/config/config.go b/service/post/rpc/internal/config/config.go new file mode 100755 index 0000000..c1f85b9 --- /dev/null +++ b/service/post/rpc/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/service/post/rpc/internal/logic/delete_logic.go b/service/post/rpc/internal/logic/delete_logic.go new file mode 100644 index 0000000..6e1a1d5 --- /dev/null +++ b/service/post/rpc/internal/logic/delete_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type DeleteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteLogic { + return &DeleteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *DeleteLogic) Delete(in *post.DeleteReq) (*post.EmptyResp, error) { + // todo: add your logic here and delete this line + + return &post.EmptyResp{}, nil +} diff --git a/service/post/rpc/internal/logic/get_by_path_logic.go b/service/post/rpc/internal/logic/get_by_path_logic.go new file mode 100644 index 0000000..5d80184 --- /dev/null +++ b/service/post/rpc/internal/logic/get_by_path_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetByPathLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetByPathLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetByPathLogic { + return &GetByPathLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetByPathLogic) GetByPath(in *post.GetByPathReq) (*post.EmptyResp, error) { + // todo: add your logic here and delete this line + + return &post.EmptyResp{}, nil +} diff --git a/service/post/rpc/internal/logic/get_logic.go b/service/post/rpc/internal/logic/get_logic.go new file mode 100644 index 0000000..e2c4d61 --- /dev/null +++ b/service/post/rpc/internal/logic/get_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLogic { + return &GetLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetLogic) Get(in *post.GetReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/logic/get_post_user_infos_logic.go b/service/post/rpc/internal/logic/get_post_user_infos_logic.go new file mode 100644 index 0000000..978d438 --- /dev/null +++ b/service/post/rpc/internal/logic/get_post_user_infos_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetPostUserInfosLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetPostUserInfosLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPostUserInfosLogic { + return &GetPostUserInfosLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetPostUserInfosLogic) GetPostUserInfos(in *post.GetPostUserInfosReq) (*post.PostUserInfos, error) { + // todo: add your logic here and delete this line + + return &post.PostUserInfos{}, nil +} diff --git a/service/post/rpc/internal/logic/insert_logic.go b/service/post/rpc/internal/logic/insert_logic.go new file mode 100644 index 0000000..cb4ac32 --- /dev/null +++ b/service/post/rpc/internal/logic/insert_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type InsertLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewInsertLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InsertLogic { + return &InsertLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *InsertLogic) Insert(in *post.InsertReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/logic/list_logic.go b/service/post/rpc/internal/logic/list_logic.go new file mode 100644 index 0000000..5504f97 --- /dev/null +++ b/service/post/rpc/internal/logic/list_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListLogic { + return &ListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListLogic) List(in *post.ListReq) (*post.ListResp, error) { + // todo: add your logic here and delete this line + + return &post.ListResp{}, nil +} diff --git a/service/post/rpc/internal/logic/list_post_user_infos_logic.go b/service/post/rpc/internal/logic/list_post_user_infos_logic.go new file mode 100644 index 0000000..ea09407 --- /dev/null +++ b/service/post/rpc/internal/logic/list_post_user_infos_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListPostUserInfosLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListPostUserInfosLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListPostUserInfosLogic { + return &ListPostUserInfosLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ListPostUserInfosLogic) ListPostUserInfos(in *post.ListPostUserInfosReq) (*post.ListPostUserInfosResp, error) { + // todo: add your logic here and delete this line + + return &post.ListPostUserInfosResp{}, nil +} diff --git a/service/post/rpc/internal/logic/patch_logic.go b/service/post/rpc/internal/logic/patch_logic.go new file mode 100644 index 0000000..9d77bff --- /dev/null +++ b/service/post/rpc/internal/logic/patch_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type PatchLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewPatchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PatchLogic { + return &PatchLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *PatchLogic) Patch(in *post.PatchReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/logic/publish_logic.go b/service/post/rpc/internal/logic/publish_logic.go new file mode 100644 index 0000000..6507456 --- /dev/null +++ b/service/post/rpc/internal/logic/publish_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type PublishLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewPublishLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PublishLogic { + return &PublishLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *PublishLogic) Publish(in *post.PublishReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/logic/revert_logic.go b/service/post/rpc/internal/logic/revert_logic.go new file mode 100644 index 0000000..fdeefbe --- /dev/null +++ b/service/post/rpc/internal/logic/revert_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type RevertLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewRevertLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RevertLogic { + return &RevertLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *RevertLogic) Revert(in *post.RevertReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/logic/search_logic.go b/service/post/rpc/internal/logic/search_logic.go new file mode 100644 index 0000000..acc7cfe --- /dev/null +++ b/service/post/rpc/internal/logic/search_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type SearchLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SearchLogic { + return &SearchLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *SearchLogic) Search(in *post.SearchReq) (*post.SearchResp, error) { + // todo: add your logic here and delete this line + + return &post.SearchResp{}, nil +} diff --git a/service/post/rpc/internal/logic/update_logic.go b/service/post/rpc/internal/logic/update_logic.go new file mode 100644 index 0000000..f644603 --- /dev/null +++ b/service/post/rpc/internal/logic/update_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UpdateLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateLogic { + return &UpdateLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UpdateLogic) Update(in *post.UpdateReq) (*post.Post, error) { + // todo: add your logic here and delete this line + + return &post.Post{}, nil +} diff --git a/service/post/rpc/internal/server/post_service_server.go b/service/post/rpc/internal/server/post_service_server.go new file mode 100644 index 0000000..265813c --- /dev/null +++ b/service/post/rpc/internal/server/post_service_server.go @@ -0,0 +1,83 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: post.proto + +package server + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/internal/logic" + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" +) + +type PostServiceServer struct { + svcCtx *svc.ServiceContext + post.UnimplementedPostServiceServer +} + +func NewPostServiceServer(svcCtx *svc.ServiceContext) *PostServiceServer { + return &PostServiceServer{ + svcCtx: svcCtx, + } +} + +func (s *PostServiceServer) List(ctx context.Context, in *post.ListReq) (*post.ListResp, error) { + l := logic.NewListLogic(ctx, s.svcCtx) + return l.List(in) +} + +func (s *PostServiceServer) Get(ctx context.Context, in *post.GetReq) (*post.Post, error) { + l := logic.NewGetLogic(ctx, s.svcCtx) + return l.Get(in) +} + +func (s *PostServiceServer) Search(ctx context.Context, in *post.SearchReq) (*post.SearchResp, error) { + l := logic.NewSearchLogic(ctx, s.svcCtx) + return l.Search(in) +} + +func (s *PostServiceServer) Insert(ctx context.Context, in *post.InsertReq) (*post.Post, error) { + l := logic.NewInsertLogic(ctx, s.svcCtx) + return l.Insert(in) +} + +func (s *PostServiceServer) Delete(ctx context.Context, in *post.DeleteReq) (*post.EmptyResp, error) { + l := logic.NewDeleteLogic(ctx, s.svcCtx) + return l.Delete(in) +} + +func (s *PostServiceServer) GetByPath(ctx context.Context, in *post.GetByPathReq) (*post.EmptyResp, error) { + l := logic.NewGetByPathLogic(ctx, s.svcCtx) + return l.GetByPath(in) +} + +func (s *PostServiceServer) Patch(ctx context.Context, in *post.PatchReq) (*post.Post, error) { + l := logic.NewPatchLogic(ctx, s.svcCtx) + return l.Patch(in) +} + +func (s *PostServiceServer) Update(ctx context.Context, in *post.UpdateReq) (*post.Post, error) { + l := logic.NewUpdateLogic(ctx, s.svcCtx) + return l.Update(in) +} + +func (s *PostServiceServer) Publish(ctx context.Context, in *post.PublishReq) (*post.Post, error) { + l := logic.NewPublishLogic(ctx, s.svcCtx) + return l.Publish(in) +} + +func (s *PostServiceServer) Revert(ctx context.Context, in *post.RevertReq) (*post.Post, error) { + l := logic.NewRevertLogic(ctx, s.svcCtx) + return l.Revert(in) +} + +func (s *PostServiceServer) GetPostUserInfos(ctx context.Context, in *post.GetPostUserInfosReq) (*post.PostUserInfos, error) { + l := logic.NewGetPostUserInfosLogic(ctx, s.svcCtx) + return l.GetPostUserInfos(in) +} + +func (s *PostServiceServer) ListPostUserInfos(ctx context.Context, in *post.ListPostUserInfosReq) (*post.ListPostUserInfosResp, error) { + l := logic.NewListPostUserInfosLogic(ctx, s.svcCtx) + return l.ListPostUserInfos(in) +} diff --git a/service/post/rpc/internal/svc/service_context.go b/service/post/rpc/internal/svc/service_context.go new file mode 100644 index 0000000..d2dd60d --- /dev/null +++ b/service/post/rpc/internal/svc/service_context.go @@ -0,0 +1,13 @@ +package svc + +import "github.com/linehk/go-blogger/service/post/rpc/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} diff --git a/service/post/rpc/post.go b/service/post/rpc/post.go new file mode 100644 index 0000000..cec315b --- /dev/null +++ b/service/post/rpc/post.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "github.com/linehk/go-blogger/service/post/rpc/internal/config" + "github.com/linehk/go-blogger/service/post/rpc/internal/server" + "github.com/linehk/go-blogger/service/post/rpc/internal/svc" + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/post.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + post.RegisterPostServiceServer(grpcServer, server.NewPostServiceServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/service/post/rpc/post/post.pb.go b/service/post/rpc/post/post.pb.go new file mode 100644 index 0000000..5e54bed --- /dev/null +++ b/service/post/rpc/post/post.pb.go @@ -0,0 +1,2805 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: service/post/rpc/post.proto + +package post + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Post struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Blog *Blog `protobuf:"bytes,3,opt,name=blog,proto3" json:"blog,omitempty"` + Published *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=published,proto3" json:"published,omitempty"` + Updated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated,proto3" json:"updated,omitempty"` + Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` + SelfLink string `protobuf:"bytes,7,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"` + TitleLink string `protobuf:"bytes,9,opt,name=titleLink,proto3" json:"titleLink,omitempty"` + Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content,omitempty"` + Images []*Image `protobuf:"bytes,11,rep,name=images,proto3" json:"images,omitempty"` + CustomMetaData string `protobuf:"bytes,12,opt,name=customMetaData,proto3" json:"customMetaData,omitempty"` + Author *Author `protobuf:"bytes,13,opt,name=author,proto3" json:"author,omitempty"` + Replies *Reply `protobuf:"bytes,14,opt,name=replies,proto3" json:"replies,omitempty"` + Labels []string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty"` + Location *Location `protobuf:"bytes,16,opt,name=location,proto3" json:"location,omitempty"` + Status string `protobuf:"bytes,17,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Post) Reset() { + *x = Post{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Post) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Post) ProtoMessage() {} + +func (x *Post) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Post.ProtoReflect.Descriptor instead. +func (*Post) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{0} +} + +func (x *Post) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Post) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Post) GetBlog() *Blog { + if x != nil { + return x.Blog + } + return nil +} + +func (x *Post) GetPublished() *timestamppb.Timestamp { + if x != nil { + return x.Published + } + return nil +} + +func (x *Post) GetUpdated() *timestamppb.Timestamp { + if x != nil { + return x.Updated + } + return nil +} + +func (x *Post) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Post) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +func (x *Post) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Post) GetTitleLink() string { + if x != nil { + return x.TitleLink + } + return "" +} + +func (x *Post) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Post) GetImages() []*Image { + if x != nil { + return x.Images + } + return nil +} + +func (x *Post) GetCustomMetaData() string { + if x != nil { + return x.CustomMetaData + } + return "" +} + +func (x *Post) GetAuthor() *Author { + if x != nil { + return x.Author + } + return nil +} + +func (x *Post) GetReplies() *Reply { + if x != nil { + return x.Replies + } + return nil +} + +func (x *Post) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Post) GetLocation() *Location { + if x != nil { + return x.Location + } + return nil +} + +func (x *Post) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +type Reply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalItems int64 `protobuf:"varint,1,opt,name=totalItems,proto3" json:"totalItems,omitempty"` + SelfLink string `protobuf:"bytes,2,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Items []*Comment `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *Reply) Reset() { + *x = Reply{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Reply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Reply) ProtoMessage() {} + +func (x *Reply) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Reply.ProtoReflect.Descriptor instead. +func (*Reply) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{1} +} + +func (x *Reply) GetTotalItems() int64 { + if x != nil { + return x.TotalItems + } + return 0 +} + +func (x *Reply) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +func (x *Reply) GetItems() []*Comment { + if x != nil { + return x.Items + } + return nil +} + +type Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Lat float32 `protobuf:"fixed32,2,opt,name=lat,proto3" json:"lat,omitempty"` + Lng float32 `protobuf:"fixed32,3,opt,name=lng,proto3" json:"lng,omitempty"` + Span string `protobuf:"bytes,4,opt,name=span,proto3" json:"span,omitempty"` +} + +func (x *Location) Reset() { + *x = Location{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Location) ProtoMessage() {} + +func (x *Location) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Location.ProtoReflect.Descriptor instead. +func (*Location) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{2} +} + +func (x *Location) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Location) GetLat() float32 { + if x != nil { + return x.Lat + } + return 0 +} + +func (x *Location) GetLng() float32 { + if x != nil { + return x.Lng + } + return 0 +} + +func (x *Location) GetSpan() string { + if x != nil { + return x.Span + } + return "" +} + +// go-zero can't import other proto +// https://go-zero.dev/docs/tutorials/proto/faq +type Comment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + // avoid loop ref + InReplyTo *Comment_InReplyTo `protobuf:"bytes,4,opt,name=inReplyTo,proto3" json:"inReplyTo,omitempty"` + Post *Comment_Post `protobuf:"bytes,5,opt,name=post,proto3" json:"post,omitempty"` + Blog *Comment_Blog `protobuf:"bytes,6,opt,name=blog,proto3" json:"blog,omitempty"` + Published *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=published,proto3" json:"published,omitempty"` + Updated *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated,proto3" json:"updated,omitempty"` + SelfLink string `protobuf:"bytes,9,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content,omitempty"` + Author *Author `protobuf:"bytes,11,opt,name=author,proto3" json:"author,omitempty"` +} + +func (x *Comment) Reset() { + *x = Comment{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Comment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Comment) ProtoMessage() {} + +func (x *Comment) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Comment.ProtoReflect.Descriptor instead. +func (*Comment) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{3} +} + +func (x *Comment) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Comment) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Comment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Comment) GetInReplyTo() *Comment_InReplyTo { + if x != nil { + return x.InReplyTo + } + return nil +} + +func (x *Comment) GetPost() *Comment_Post { + if x != nil { + return x.Post + } + return nil +} + +func (x *Comment) GetBlog() *Comment_Blog { + if x != nil { + return x.Blog + } + return nil +} + +func (x *Comment) GetPublished() *timestamppb.Timestamp { + if x != nil { + return x.Published + } + return nil +} + +func (x *Comment) GetUpdated() *timestamppb.Timestamp { + if x != nil { + return x.Updated + } + return nil +} + +func (x *Comment) GetSelfLink() string { + if x != nil { + return x.SelfLink + } + return "" +} + +func (x *Comment) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Comment) GetAuthor() *Author { + if x != nil { + return x.Author + } + return nil +} + +type Blog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Blog) Reset() { + *x = Blog{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Blog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Blog) ProtoMessage() {} + +func (x *Blog) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Blog.ProtoReflect.Descriptor instead. +func (*Blog) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{4} +} + +func (x *Blog) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{5} +} + +func (x *Image) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type Author struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + Image *Image `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` +} + +func (x *Author) Reset() { + *x = Author{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Author) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Author) ProtoMessage() {} + +func (x *Author) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Author.ProtoReflect.Descriptor instead. +func (*Author) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{6} +} + +func (x *Author) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Author) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Author) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Author) GetImage() *Image { + if x != nil { + return x.Image + } + return nil +} + +type ListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + EndDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=endDate,proto3" json:"endDate,omitempty"` + FetchBodies bool `protobuf:"varint,3,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + FetchImages bool `protobuf:"varint,4,opt,name=fetchImages,proto3" json:"fetchImages,omitempty"` + Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` + MaxResults uint64 `protobuf:"varint,6,opt,name=maxResults,proto3" json:"maxResults,omitempty"` + OrderBy string `protobuf:"bytes,7,opt,name=orderBy,proto3" json:"orderBy,omitempty"` + SortOption string `protobuf:"bytes,8,opt,name=sortOption,proto3" json:"sortOption,omitempty"` + PageToken string `protobuf:"bytes,9,opt,name=pageToken,proto3" json:"pageToken,omitempty"` + StartDate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=startDate,proto3" json:"startDate,omitempty"` + Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` + View string `protobuf:"bytes,12,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *ListReq) Reset() { + *x = ListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReq) ProtoMessage() {} + +func (x *ListReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReq.ProtoReflect.Descriptor instead. +func (*ListReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{7} +} + +func (x *ListReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ListReq) GetEndDate() *timestamppb.Timestamp { + if x != nil { + return x.EndDate + } + return nil +} + +func (x *ListReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *ListReq) GetFetchImages() bool { + if x != nil { + return x.FetchImages + } + return false +} + +func (x *ListReq) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *ListReq) GetMaxResults() uint64 { + if x != nil { + return x.MaxResults + } + return 0 +} + +func (x *ListReq) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListReq) GetSortOption() string { + if x != nil { + return x.SortOption + } + return "" +} + +func (x *ListReq) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListReq) GetStartDate() *timestamppb.Timestamp { + if x != nil { + return x.StartDate + } + return nil +} + +func (x *ListReq) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type ListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=nextPageToken,proto3" json:"nextPageToken,omitempty"` + Items []*Post `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListResp) Reset() { + *x = ListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResp) ProtoMessage() {} + +func (x *ListResp) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResp.ProtoReflect.Descriptor instead. +func (*ListResp) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{8} +} + +func (x *ListResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListResp) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListResp) GetItems() []*Post { + if x != nil { + return x.Items + } + return nil +} + +type GetReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + MaxComments uint64 `protobuf:"varint,3,opt,name=maxComments,proto3" json:"maxComments,omitempty"` + View string `protobuf:"bytes,4,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *GetReq) Reset() { + *x = GetReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReq) ProtoMessage() {} + +func (x *GetReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReq.ProtoReflect.Descriptor instead. +func (*GetReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{9} +} + +func (x *GetReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *GetReq) GetMaxComments() uint64 { + if x != nil { + return x.MaxComments + } + return 0 +} + +func (x *GetReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type SearchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + Q string `protobuf:"bytes,2,opt,name=q,proto3" json:"q,omitempty"` + FetchBodies bool `protobuf:"varint,3,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + OrderBy string `protobuf:"bytes,4,opt,name=orderBy,proto3" json:"orderBy,omitempty"` +} + +func (x *SearchReq) Reset() { + *x = SearchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchReq) ProtoMessage() {} + +func (x *SearchReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchReq.ProtoReflect.Descriptor instead. +func (*SearchReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{10} +} + +func (x *SearchReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *SearchReq) GetQ() string { + if x != nil { + return x.Q + } + return "" +} + +func (x *SearchReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *SearchReq) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type SearchResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=nextPageToken,proto3" json:"nextPageToken,omitempty"` + Items []*Post `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *SearchResp) Reset() { + *x = SearchResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchResp) ProtoMessage() {} + +func (x *SearchResp) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchResp.ProtoReflect.Descriptor instead. +func (*SearchResp) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{11} +} + +func (x *SearchResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *SearchResp) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SearchResp) GetItems() []*Post { + if x != nil { + return x.Items + } + return nil +} + +type InsertReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + IsDraft bool `protobuf:"varint,2,opt,name=isDraft,proto3" json:"isDraft,omitempty"` + Post *Post `protobuf:"bytes,3,opt,name=post,proto3" json:"post,omitempty"` +} + +func (x *InsertReq) Reset() { + *x = InsertReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InsertReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertReq) ProtoMessage() {} + +func (x *InsertReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertReq.ProtoReflect.Descriptor instead. +func (*InsertReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{12} +} + +func (x *InsertReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *InsertReq) GetIsDraft() bool { + if x != nil { + return x.IsDraft + } + return false +} + +func (x *InsertReq) GetPost() *Post { + if x != nil { + return x.Post + } + return nil +} + +type DeleteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + UseTrash bool `protobuf:"varint,3,opt,name=useTrash,proto3" json:"useTrash,omitempty"` +} + +func (x *DeleteReq) Reset() { + *x = DeleteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReq) ProtoMessage() {} + +func (x *DeleteReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead. +func (*DeleteReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *DeleteReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *DeleteReq) GetUseTrash() bool { + if x != nil { + return x.UseTrash + } + return false +} + +type GetByPathReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + MaxComments uint64 `protobuf:"varint,3,opt,name=maxComments,proto3" json:"maxComments,omitempty"` + View string `protobuf:"bytes,4,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *GetByPathReq) Reset() { + *x = GetByPathReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetByPathReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetByPathReq) ProtoMessage() {} + +func (x *GetByPathReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetByPathReq.ProtoReflect.Descriptor instead. +func (*GetByPathReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{14} +} + +func (x *GetByPathReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetByPathReq) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *GetByPathReq) GetMaxComments() uint64 { + if x != nil { + return x.MaxComments + } + return 0 +} + +func (x *GetByPathReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type PatchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + Post *Post `protobuf:"bytes,3,opt,name=post,proto3" json:"post,omitempty"` +} + +func (x *PatchReq) Reset() { + *x = PatchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchReq) ProtoMessage() {} + +func (x *PatchReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchReq.ProtoReflect.Descriptor instead. +func (*PatchReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{15} +} + +func (x *PatchReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *PatchReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PatchReq) GetPost() *Post { + if x != nil { + return x.Post + } + return nil +} + +type UpdateReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + Post *Post `protobuf:"bytes,4,opt,name=post,proto3" json:"post,omitempty"` +} + +func (x *UpdateReq) Reset() { + *x = UpdateReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReq) ProtoMessage() {} + +func (x *UpdateReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReq.ProtoReflect.Descriptor instead. +func (*UpdateReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *UpdateReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *UpdateReq) GetPost() *Post { + if x != nil { + return x.Post + } + return nil +} + +type PublishReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + PublishDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=publishDate,proto3" json:"publishDate,omitempty"` +} + +func (x *PublishReq) Reset() { + *x = PublishReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishReq) ProtoMessage() {} + +func (x *PublishReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishReq.ProtoReflect.Descriptor instead. +func (*PublishReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{17} +} + +func (x *PublishReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *PublishReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PublishReq) GetPublishDate() *timestamppb.Timestamp { + if x != nil { + return x.PublishDate + } + return nil +} + +type RevertReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` +} + +func (x *RevertReq) Reset() { + *x = RevertReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevertReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertReq) ProtoMessage() {} + +func (x *RevertReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevertReq.ProtoReflect.Descriptor instead. +func (*RevertReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{18} +} + +func (x *RevertReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *RevertReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type PostUserInfos struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Post *Post `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"` + PostUserInfo *PostUserInfo `protobuf:"bytes,3,opt,name=post_user_info,json=postUserInfo,proto3" json:"post_user_info,omitempty"` +} + +func (x *PostUserInfos) Reset() { + *x = PostUserInfos{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostUserInfos) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostUserInfos) ProtoMessage() {} + +func (x *PostUserInfos) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostUserInfos.ProtoReflect.Descriptor instead. +func (*PostUserInfos) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{19} +} + +func (x *PostUserInfos) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *PostUserInfos) GetPost() *Post { + if x != nil { + return x.Post + } + return nil +} + +func (x *PostUserInfos) GetPostUserInfo() *PostUserInfo { + if x != nil { + return x.PostUserInfo + } + return nil +} + +type PostUserInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + BlogId string `protobuf:"bytes,3,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,4,opt,name=postId,proto3" json:"postId,omitempty"` + HasEditAccess bool `protobuf:"varint,5,opt,name=hasEditAccess,proto3" json:"hasEditAccess,omitempty"` +} + +func (x *PostUserInfo) Reset() { + *x = PostUserInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostUserInfo) ProtoMessage() {} + +func (x *PostUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostUserInfo.ProtoReflect.Descriptor instead. +func (*PostUserInfo) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{20} +} + +func (x *PostUserInfo) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *PostUserInfo) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *PostUserInfo) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *PostUserInfo) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PostUserInfo) GetHasEditAccess() bool { + if x != nil { + return x.HasEditAccess + } + return false +} + +type GetPostUserInfosReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` + MaxComments uint64 `protobuf:"varint,4,opt,name=maxComments,proto3" json:"maxComments,omitempty"` +} + +func (x *GetPostUserInfosReq) Reset() { + *x = GetPostUserInfosReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPostUserInfosReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPostUserInfosReq) ProtoMessage() {} + +func (x *GetPostUserInfosReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPostUserInfosReq.ProtoReflect.Descriptor instead. +func (*GetPostUserInfosReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{21} +} + +func (x *GetPostUserInfosReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *GetPostUserInfosReq) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *GetPostUserInfosReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetPostUserInfosReq) GetMaxComments() uint64 { + if x != nil { + return x.MaxComments + } + return 0 +} + +type ListPostUserInfosReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlogId string `protobuf:"bytes,1,opt,name=blogId,proto3" json:"blogId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + EndDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=endDate,proto3" json:"endDate,omitempty"` + FetchBodies bool `protobuf:"varint,4,opt,name=fetchBodies,proto3" json:"fetchBodies,omitempty"` + Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` + MaxResults uint64 `protobuf:"varint,6,opt,name=maxResults,proto3" json:"maxResults,omitempty"` + OrderBy string `protobuf:"bytes,7,opt,name=orderBy,proto3" json:"orderBy,omitempty"` + PageToken string `protobuf:"bytes,8,opt,name=pageToken,proto3" json:"pageToken,omitempty"` + StartDate *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=startDate,proto3" json:"startDate,omitempty"` + Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` + View string `protobuf:"bytes,11,opt,name=view,proto3" json:"view,omitempty"` +} + +func (x *ListPostUserInfosReq) Reset() { + *x = ListPostUserInfosReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPostUserInfosReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPostUserInfosReq) ProtoMessage() {} + +func (x *ListPostUserInfosReq) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPostUserInfosReq.ProtoReflect.Descriptor instead. +func (*ListPostUserInfosReq) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{22} +} + +func (x *ListPostUserInfosReq) GetBlogId() string { + if x != nil { + return x.BlogId + } + return "" +} + +func (x *ListPostUserInfosReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ListPostUserInfosReq) GetEndDate() *timestamppb.Timestamp { + if x != nil { + return x.EndDate + } + return nil +} + +func (x *ListPostUserInfosReq) GetFetchBodies() bool { + if x != nil { + return x.FetchBodies + } + return false +} + +func (x *ListPostUserInfosReq) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *ListPostUserInfosReq) GetMaxResults() uint64 { + if x != nil { + return x.MaxResults + } + return 0 +} + +func (x *ListPostUserInfosReq) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListPostUserInfosReq) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListPostUserInfosReq) GetStartDate() *timestamppb.Timestamp { + if x != nil { + return x.StartDate + } + return nil +} + +func (x *ListPostUserInfosReq) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListPostUserInfosReq) GetView() string { + if x != nil { + return x.View + } + return "" +} + +type ListPostUserInfosResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=nextPageToken,proto3" json:"nextPageToken,omitempty"` + Items []*PostUserInfos `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListPostUserInfosResp) Reset() { + *x = ListPostUserInfosResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPostUserInfosResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPostUserInfosResp) ProtoMessage() {} + +func (x *ListPostUserInfosResp) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPostUserInfosResp.ProtoReflect.Descriptor instead. +func (*ListPostUserInfosResp) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{23} +} + +func (x *ListPostUserInfosResp) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ListPostUserInfosResp) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListPostUserInfosResp) GetItems() []*PostUserInfos { + if x != nil { + return x.Items + } + return nil +} + +type EmptyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResp) Reset() { + *x = EmptyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResp) ProtoMessage() {} + +func (x *EmptyResp) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. +func (*EmptyResp) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{24} +} + +type Comment_InReplyTo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Comment_InReplyTo) Reset() { + *x = Comment_InReplyTo{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Comment_InReplyTo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Comment_InReplyTo) ProtoMessage() {} + +func (x *Comment_InReplyTo) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Comment_InReplyTo.ProtoReflect.Descriptor instead. +func (*Comment_InReplyTo) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Comment_InReplyTo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Comment_Post struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Comment_Post) Reset() { + *x = Comment_Post{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Comment_Post) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Comment_Post) ProtoMessage() {} + +func (x *Comment_Post) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Comment_Post.ProtoReflect.Descriptor instead. +func (*Comment_Post) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Comment_Post) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Comment_Blog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Comment_Blog) Reset() { + *x = Comment_Blog{} + if protoimpl.UnsafeEnabled { + mi := &file_service_post_rpc_post_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Comment_Blog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Comment_Blog) ProtoMessage() {} + +func (x *Comment_Blog) ProtoReflect() protoreflect.Message { + mi := &file_service_post_rpc_post_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Comment_Blog.ProtoReflect.Descriptor instead. +func (*Comment_Blog) Descriptor() ([]byte, []int) { + return file_service_post_rpc_post_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *Comment_Blog) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_service_post_rpc_post_proto protoreflect.FileDescriptor + +var file_service_post_rpc_post_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x70, + 0x6f, 0x73, 0x74, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x04, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x62, 0x6c, 0x6f, + 0x67, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x4c, 0x69, + 0x6e, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, + 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, + 0x44, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x06, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x07, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, + 0x2a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x68, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x56, 0x0a, + 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x6c, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x6e, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x70, 0x61, 0x6e, 0x22, 0xe5, 0x03, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, + 0x09, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x52, 0x09, 0x69, 0x6e, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, + 0x62, 0x6c, 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x52, 0x04, + 0x62, 0x6c, 0x6f, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x34, + 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x1a, 0x1b, 0x0a, 0x09, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x16, 0x0a, + 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x16, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x16, 0x0a, + 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x22, 0x6f, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x21, + 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x22, 0x91, 0x03, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, + 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, + 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x66, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x6e, 0x0a, + 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, + 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x6d, 0x0a, + 0x09, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, + 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x71, + 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, 0x69, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0x68, 0x0a, 0x0a, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, + 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x5d, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, + 0x73, 0x44, 0x72, 0x61, 0x66, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, + 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, + 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x54, 0x72, 0x61, 0x73, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, 0x65, 0x54, 0x72, 0x61, 0x73, 0x68, 0x22, 0x70, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, + 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, + 0x22, 0x5a, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, + 0x70, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x09, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x6f, 0x73, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x0a, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x44, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, + 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, + 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x24, + 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x45, 0x64, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x68, 0x61, 0x73, 0x45, 0x64, 0x69, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x22, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xf4, 0x02, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, + 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x64, + 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x7c, 0x0a, 0x15, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb5, 0x04, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x0d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, + 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x0f, 0x2e, 0x70, 0x6f, 0x73, 0x74, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, + 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x0f, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x49, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0f, 0x2e, + 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, + 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x30, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x2e, 0x70, + 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x1a, 0x0f, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x23, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x0f, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x27, 0x0a, + 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x10, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, + 0x12, 0x0f, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x42, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x12, 0x19, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, + 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x12, 0x4c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, + 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, + 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_service_post_rpc_post_proto_rawDescOnce sync.Once + file_service_post_rpc_post_proto_rawDescData = file_service_post_rpc_post_proto_rawDesc +) + +func file_service_post_rpc_post_proto_rawDescGZIP() []byte { + file_service_post_rpc_post_proto_rawDescOnce.Do(func() { + file_service_post_rpc_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_post_rpc_post_proto_rawDescData) + }) + return file_service_post_rpc_post_proto_rawDescData +} + +var file_service_post_rpc_post_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_service_post_rpc_post_proto_goTypes = []interface{}{ + (*Post)(nil), // 0: post.Post + (*Reply)(nil), // 1: post.Reply + (*Location)(nil), // 2: post.Location + (*Comment)(nil), // 3: post.Comment + (*Blog)(nil), // 4: post.Blog + (*Image)(nil), // 5: post.Image + (*Author)(nil), // 6: post.Author + (*ListReq)(nil), // 7: post.ListReq + (*ListResp)(nil), // 8: post.ListResp + (*GetReq)(nil), // 9: post.GetReq + (*SearchReq)(nil), // 10: post.SearchReq + (*SearchResp)(nil), // 11: post.SearchResp + (*InsertReq)(nil), // 12: post.InsertReq + (*DeleteReq)(nil), // 13: post.DeleteReq + (*GetByPathReq)(nil), // 14: post.GetByPathReq + (*PatchReq)(nil), // 15: post.PatchReq + (*UpdateReq)(nil), // 16: post.UpdateReq + (*PublishReq)(nil), // 17: post.PublishReq + (*RevertReq)(nil), // 18: post.RevertReq + (*PostUserInfos)(nil), // 19: post.PostUserInfos + (*PostUserInfo)(nil), // 20: post.PostUserInfo + (*GetPostUserInfosReq)(nil), // 21: post.GetPostUserInfosReq + (*ListPostUserInfosReq)(nil), // 22: post.ListPostUserInfosReq + (*ListPostUserInfosResp)(nil), // 23: post.ListPostUserInfosResp + (*EmptyResp)(nil), // 24: post.EmptyResp + (*Comment_InReplyTo)(nil), // 25: post.Comment.InReplyTo + (*Comment_Post)(nil), // 26: post.Comment.Post + (*Comment_Blog)(nil), // 27: post.Comment.Blog + (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp +} +var file_service_post_rpc_post_proto_depIdxs = []int32{ + 4, // 0: post.Post.blog:type_name -> post.Blog + 28, // 1: post.Post.published:type_name -> google.protobuf.Timestamp + 28, // 2: post.Post.updated:type_name -> google.protobuf.Timestamp + 5, // 3: post.Post.images:type_name -> post.Image + 6, // 4: post.Post.author:type_name -> post.Author + 1, // 5: post.Post.replies:type_name -> post.Reply + 2, // 6: post.Post.location:type_name -> post.Location + 3, // 7: post.Reply.items:type_name -> post.Comment + 25, // 8: post.Comment.inReplyTo:type_name -> post.Comment.InReplyTo + 26, // 9: post.Comment.post:type_name -> post.Comment.Post + 27, // 10: post.Comment.blog:type_name -> post.Comment.Blog + 28, // 11: post.Comment.published:type_name -> google.protobuf.Timestamp + 28, // 12: post.Comment.updated:type_name -> google.protobuf.Timestamp + 6, // 13: post.Comment.author:type_name -> post.Author + 5, // 14: post.Author.image:type_name -> post.Image + 28, // 15: post.ListReq.endDate:type_name -> google.protobuf.Timestamp + 28, // 16: post.ListReq.startDate:type_name -> google.protobuf.Timestamp + 0, // 17: post.ListResp.items:type_name -> post.Post + 0, // 18: post.SearchResp.items:type_name -> post.Post + 0, // 19: post.InsertReq.post:type_name -> post.Post + 0, // 20: post.PatchReq.post:type_name -> post.Post + 0, // 21: post.UpdateReq.post:type_name -> post.Post + 28, // 22: post.PublishReq.publishDate:type_name -> google.protobuf.Timestamp + 0, // 23: post.PostUserInfos.post:type_name -> post.Post + 20, // 24: post.PostUserInfos.post_user_info:type_name -> post.PostUserInfo + 28, // 25: post.ListPostUserInfosReq.endDate:type_name -> google.protobuf.Timestamp + 28, // 26: post.ListPostUserInfosReq.startDate:type_name -> google.protobuf.Timestamp + 19, // 27: post.ListPostUserInfosResp.items:type_name -> post.PostUserInfos + 7, // 28: post.PostService.List:input_type -> post.ListReq + 9, // 29: post.PostService.Get:input_type -> post.GetReq + 10, // 30: post.PostService.Search:input_type -> post.SearchReq + 12, // 31: post.PostService.Insert:input_type -> post.InsertReq + 13, // 32: post.PostService.Delete:input_type -> post.DeleteReq + 14, // 33: post.PostService.GetByPath:input_type -> post.GetByPathReq + 15, // 34: post.PostService.Patch:input_type -> post.PatchReq + 16, // 35: post.PostService.Update:input_type -> post.UpdateReq + 17, // 36: post.PostService.Publish:input_type -> post.PublishReq + 18, // 37: post.PostService.Revert:input_type -> post.RevertReq + 21, // 38: post.PostService.GetPostUserInfos:input_type -> post.GetPostUserInfosReq + 22, // 39: post.PostService.ListPostUserInfos:input_type -> post.ListPostUserInfosReq + 8, // 40: post.PostService.List:output_type -> post.ListResp + 0, // 41: post.PostService.Get:output_type -> post.Post + 11, // 42: post.PostService.Search:output_type -> post.SearchResp + 0, // 43: post.PostService.Insert:output_type -> post.Post + 24, // 44: post.PostService.Delete:output_type -> post.EmptyResp + 24, // 45: post.PostService.GetByPath:output_type -> post.EmptyResp + 0, // 46: post.PostService.Patch:output_type -> post.Post + 0, // 47: post.PostService.Update:output_type -> post.Post + 0, // 48: post.PostService.Publish:output_type -> post.Post + 0, // 49: post.PostService.Revert:output_type -> post.Post + 19, // 50: post.PostService.GetPostUserInfos:output_type -> post.PostUserInfos + 23, // 51: post.PostService.ListPostUserInfos:output_type -> post.ListPostUserInfosResp + 40, // [40:52] is the sub-list for method output_type + 28, // [28:40] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_service_post_rpc_post_proto_init() } +func file_service_post_rpc_post_proto_init() { + if File_service_post_rpc_post_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_post_rpc_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Post); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Reply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Comment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Blog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Author); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InsertReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetByPathReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublishReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevertReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostUserInfos); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostUserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPostUserInfosReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPostUserInfosReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPostUserInfosResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Comment_InReplyTo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Comment_Post); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_post_rpc_post_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Comment_Blog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_post_rpc_post_proto_rawDesc, + NumEnums: 0, + NumMessages: 28, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_post_rpc_post_proto_goTypes, + DependencyIndexes: file_service_post_rpc_post_proto_depIdxs, + MessageInfos: file_service_post_rpc_post_proto_msgTypes, + }.Build() + File_service_post_rpc_post_proto = out.File + file_service_post_rpc_post_proto_rawDesc = nil + file_service_post_rpc_post_proto_goTypes = nil + file_service_post_rpc_post_proto_depIdxs = nil +} diff --git a/service/post/rpc/post/post_grpc.pb.go b/service/post/rpc/post/post_grpc.pb.go new file mode 100644 index 0000000..4c87190 --- /dev/null +++ b/service/post/rpc/post/post_grpc.pb.go @@ -0,0 +1,516 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.2 +// source: service/post/rpc/post.proto + +package post + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PostService_List_FullMethodName = "/post.PostService/List" + PostService_Get_FullMethodName = "/post.PostService/Get" + PostService_Search_FullMethodName = "/post.PostService/Search" + PostService_Insert_FullMethodName = "/post.PostService/Insert" + PostService_Delete_FullMethodName = "/post.PostService/Delete" + PostService_GetByPath_FullMethodName = "/post.PostService/GetByPath" + PostService_Patch_FullMethodName = "/post.PostService/Patch" + PostService_Update_FullMethodName = "/post.PostService/Update" + PostService_Publish_FullMethodName = "/post.PostService/Publish" + PostService_Revert_FullMethodName = "/post.PostService/Revert" + PostService_GetPostUserInfos_FullMethodName = "/post.PostService/GetPostUserInfos" + PostService_ListPostUserInfos_FullMethodName = "/post.PostService/ListPostUserInfos" +) + +// PostServiceClient is the client API for PostService 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. +type PostServiceClient interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Post, error) + Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) + Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Post, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + GetByPath(ctx context.Context, in *GetByPathReq, opts ...grpc.CallOption) (*EmptyResp, error) + Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Post, error) + Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Post, error) + Publish(ctx context.Context, in *PublishReq, opts ...grpc.CallOption) (*Post, error) + Revert(ctx context.Context, in *RevertReq, opts ...grpc.CallOption) (*Post, error) + GetPostUserInfos(ctx context.Context, in *GetPostUserInfosReq, opts ...grpc.CallOption) (*PostUserInfos, error) + ListPostUserInfos(ctx context.Context, in *ListPostUserInfosReq, opts ...grpc.CallOption) (*ListPostUserInfosResp, error) +} + +type postServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient { + return &postServiceClient{cc} +} + +func (c *postServiceClient) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + out := new(ListResp) + err := c.cc.Invoke(ctx, PostService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) { + out := new(SearchResp) + err := c.cc.Invoke(ctx, PostService_Search_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Insert_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + out := new(EmptyResp) + err := c.cc.Invoke(ctx, PostService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) GetByPath(ctx context.Context, in *GetByPathReq, opts ...grpc.CallOption) (*EmptyResp, error) { + out := new(EmptyResp) + err := c.cc.Invoke(ctx, PostService_GetByPath_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Patch_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Publish(ctx context.Context, in *PublishReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Publish_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) Revert(ctx context.Context, in *RevertReq, opts ...grpc.CallOption) (*Post, error) { + out := new(Post) + err := c.cc.Invoke(ctx, PostService_Revert_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) GetPostUserInfos(ctx context.Context, in *GetPostUserInfosReq, opts ...grpc.CallOption) (*PostUserInfos, error) { + out := new(PostUserInfos) + err := c.cc.Invoke(ctx, PostService_GetPostUserInfos_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) ListPostUserInfos(ctx context.Context, in *ListPostUserInfosReq, opts ...grpc.CallOption) (*ListPostUserInfosResp, error) { + out := new(ListPostUserInfosResp) + err := c.cc.Invoke(ctx, PostService_ListPostUserInfos_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PostServiceServer is the server API for PostService service. +// All implementations must embed UnimplementedPostServiceServer +// for forward compatibility +type PostServiceServer interface { + List(context.Context, *ListReq) (*ListResp, error) + Get(context.Context, *GetReq) (*Post, error) + Search(context.Context, *SearchReq) (*SearchResp, error) + Insert(context.Context, *InsertReq) (*Post, error) + Delete(context.Context, *DeleteReq) (*EmptyResp, error) + GetByPath(context.Context, *GetByPathReq) (*EmptyResp, error) + Patch(context.Context, *PatchReq) (*Post, error) + Update(context.Context, *UpdateReq) (*Post, error) + Publish(context.Context, *PublishReq) (*Post, error) + Revert(context.Context, *RevertReq) (*Post, error) + GetPostUserInfos(context.Context, *GetPostUserInfosReq) (*PostUserInfos, error) + ListPostUserInfos(context.Context, *ListPostUserInfosReq) (*ListPostUserInfosResp, error) + mustEmbedUnimplementedPostServiceServer() +} + +// UnimplementedPostServiceServer must be embedded to have forward compatible implementations. +type UnimplementedPostServiceServer struct { +} + +func (UnimplementedPostServiceServer) List(context.Context, *ListReq) (*ListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedPostServiceServer) Get(context.Context, *GetReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedPostServiceServer) Search(context.Context, *SearchReq) (*SearchResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") +} +func (UnimplementedPostServiceServer) Insert(context.Context, *InsertReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented") +} +func (UnimplementedPostServiceServer) Delete(context.Context, *DeleteReq) (*EmptyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedPostServiceServer) GetByPath(context.Context, *GetByPathReq) (*EmptyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByPath not implemented") +} +func (UnimplementedPostServiceServer) Patch(context.Context, *PatchReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented") +} +func (UnimplementedPostServiceServer) Update(context.Context, *UpdateReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedPostServiceServer) Publish(context.Context, *PublishReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented") +} +func (UnimplementedPostServiceServer) Revert(context.Context, *RevertReq) (*Post, error) { + return nil, status.Errorf(codes.Unimplemented, "method Revert not implemented") +} +func (UnimplementedPostServiceServer) GetPostUserInfos(context.Context, *GetPostUserInfosReq) (*PostUserInfos, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPostUserInfos not implemented") +} +func (UnimplementedPostServiceServer) ListPostUserInfos(context.Context, *ListPostUserInfosReq) (*ListPostUserInfosResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPostUserInfos not implemented") +} +func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {} + +// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PostServiceServer will +// result in compilation errors. +type UnsafePostServiceServer interface { + mustEmbedUnimplementedPostServiceServer() +} + +func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) { + s.RegisterService(&PostService_ServiceDesc, srv) +} + +func _PostService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).List(ctx, req.(*ListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Get(ctx, req.(*GetReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Search(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Search_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Search(ctx, req.(*SearchReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Insert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Insert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Insert(ctx, req.(*InsertReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Delete(ctx, req.(*DeleteReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_GetByPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByPathReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).GetByPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_GetByPath_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).GetByPath(ctx, req.(*GetByPathReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Patch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PatchReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Patch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Patch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Patch(ctx, req.(*PatchReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Update(ctx, req.(*UpdateReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PublishReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Publish(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Publish_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Publish(ctx, req.(*PublishReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_Revert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevertReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).Revert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_Revert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).Revert(ctx, req.(*RevertReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_GetPostUserInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPostUserInfosReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).GetPostUserInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_GetPostUserInfos_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).GetPostUserInfos(ctx, req.(*GetPostUserInfosReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_ListPostUserInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPostUserInfosReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).ListPostUserInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_ListPostUserInfos_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).ListPostUserInfos(ctx, req.(*ListPostUserInfosReq)) + } + return interceptor(ctx, in, info, handler) +} + +// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PostService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "post.PostService", + HandlerType: (*PostServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _PostService_List_Handler, + }, + { + MethodName: "Get", + Handler: _PostService_Get_Handler, + }, + { + MethodName: "Search", + Handler: _PostService_Search_Handler, + }, + { + MethodName: "Insert", + Handler: _PostService_Insert_Handler, + }, + { + MethodName: "Delete", + Handler: _PostService_Delete_Handler, + }, + { + MethodName: "GetByPath", + Handler: _PostService_GetByPath_Handler, + }, + { + MethodName: "Patch", + Handler: _PostService_Patch_Handler, + }, + { + MethodName: "Update", + Handler: _PostService_Update_Handler, + }, + { + MethodName: "Publish", + Handler: _PostService_Publish_Handler, + }, + { + MethodName: "Revert", + Handler: _PostService_Revert_Handler, + }, + { + MethodName: "GetPostUserInfos", + Handler: _PostService_GetPostUserInfos_Handler, + }, + { + MethodName: "ListPostUserInfos", + Handler: _PostService_ListPostUserInfos_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/post/rpc/post.proto", +} diff --git a/service/post/rpc/postservice/post_service.go b/service/post/rpc/postservice/post_service.go new file mode 100644 index 0000000..4a8137c --- /dev/null +++ b/service/post/rpc/postservice/post_service.go @@ -0,0 +1,129 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: post.proto + +package postservice + +import ( + "context" + + "github.com/linehk/go-blogger/service/post/rpc/post" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + Author = post.Author + Blog = post.Blog + Comment = post.Comment + Comment_Blog = post.Comment_Blog + Comment_InReplyTo = post.Comment_InReplyTo + Comment_Post = post.Comment_Post + DeleteReq = post.DeleteReq + EmptyResp = post.EmptyResp + GetByPathReq = post.GetByPathReq + GetPostUserInfosReq = post.GetPostUserInfosReq + GetReq = post.GetReq + Image = post.Image + InsertReq = post.InsertReq + ListPostUserInfosReq = post.ListPostUserInfosReq + ListPostUserInfosResp = post.ListPostUserInfosResp + ListReq = post.ListReq + ListResp = post.ListResp + Location = post.Location + PatchReq = post.PatchReq + Post = post.Post + PostUserInfo = post.PostUserInfo + PostUserInfos = post.PostUserInfos + PublishReq = post.PublishReq + Reply = post.Reply + RevertReq = post.RevertReq + SearchReq = post.SearchReq + SearchResp = post.SearchResp + UpdateReq = post.UpdateReq + + PostService interface { + List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) + Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Post, error) + Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) + Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Post, error) + Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) + GetByPath(ctx context.Context, in *GetByPathReq, opts ...grpc.CallOption) (*EmptyResp, error) + Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Post, error) + Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Post, error) + Publish(ctx context.Context, in *PublishReq, opts ...grpc.CallOption) (*Post, error) + Revert(ctx context.Context, in *RevertReq, opts ...grpc.CallOption) (*Post, error) + GetPostUserInfos(ctx context.Context, in *GetPostUserInfosReq, opts ...grpc.CallOption) (*PostUserInfos, error) + ListPostUserInfos(ctx context.Context, in *ListPostUserInfosReq, opts ...grpc.CallOption) (*ListPostUserInfosResp, error) + } + + defaultPostService struct { + cli zrpc.Client + } +) + +func NewPostService(cli zrpc.Client) PostService { + return &defaultPostService{ + cli: cli, + } +} + +func (m *defaultPostService) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.List(ctx, in, opts...) +} + +func (m *defaultPostService) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Get(ctx, in, opts...) +} + +func (m *defaultPostService) Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Search(ctx, in, opts...) +} + +func (m *defaultPostService) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Insert(ctx, in, opts...) +} + +func (m *defaultPostService) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*EmptyResp, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Delete(ctx, in, opts...) +} + +func (m *defaultPostService) GetByPath(ctx context.Context, in *GetByPathReq, opts ...grpc.CallOption) (*EmptyResp, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.GetByPath(ctx, in, opts...) +} + +func (m *defaultPostService) Patch(ctx context.Context, in *PatchReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Patch(ctx, in, opts...) +} + +func (m *defaultPostService) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Update(ctx, in, opts...) +} + +func (m *defaultPostService) Publish(ctx context.Context, in *PublishReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Publish(ctx, in, opts...) +} + +func (m *defaultPostService) Revert(ctx context.Context, in *RevertReq, opts ...grpc.CallOption) (*Post, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.Revert(ctx, in, opts...) +} + +func (m *defaultPostService) GetPostUserInfos(ctx context.Context, in *GetPostUserInfosReq, opts ...grpc.CallOption) (*PostUserInfos, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.GetPostUserInfos(ctx, in, opts...) +} + +func (m *defaultPostService) ListPostUserInfos(ctx context.Context, in *ListPostUserInfosReq, opts ...grpc.CallOption) (*ListPostUserInfosResp, error) { + client := post.NewPostServiceClient(m.cli.Conn()) + return client.ListPostUserInfos(ctx, in, opts...) +} diff --git a/service/user/rpc/user/user.pb.go b/service/user/rpc/user/user.pb.go index c6158be..57d1d08 100644 --- a/service/user/rpc/user/user.pb.go +++ b/service/user/rpc/user/user.pb.go @@ -31,7 +31,7 @@ type User struct { Created *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` SelfLink string `protobuf:"bytes,5,opt,name=selfLink,proto3" json:"selfLink,omitempty"` - Blogs []*Blog `protobuf:"bytes,6,rep,name=blogs,proto3" json:"blogs,omitempty"` + Blogs *Blogs `protobuf:"bytes,6,opt,name=blogs,proto3" json:"blogs,omitempty"` DisplayName string `protobuf:"bytes,7,opt,name=displayName,proto3" json:"displayName,omitempty"` About string `protobuf:"bytes,8,opt,name=about,proto3" json:"about,omitempty"` Locale *Locale `protobuf:"bytes,9,opt,name=locale,proto3" json:"locale,omitempty"` @@ -104,7 +104,7 @@ func (x *User) GetSelfLink() string { return "" } -func (x *User) GetBlogs() []*Blog { +func (x *User) GetBlogs() *Blogs { if x != nil { return x.Blogs } @@ -132,25 +132,16 @@ func (x *User) GetLocale() *Locale { return nil } -// go-zero can't import other proto -// https://go-zero.dev/docs/tutorials/proto/faq -type Blog struct { +type Blogs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Published *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=published,proto3" json:"published,omitempty"` - Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` - Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` - SelfLink string `protobuf:"bytes,8,opt,name=selfLink,proto3" json:"selfLink,omitempty"` + SelfLink string `protobuf:"bytes,1,opt,name=selfLink,proto3" json:"selfLink,omitempty"` } -func (x *Blog) Reset() { - *x = Blog{} +func (x *Blogs) Reset() { + *x = Blogs{} if protoimpl.UnsafeEnabled { mi := &file_service_user_rpc_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -158,13 +149,13 @@ func (x *Blog) Reset() { } } -func (x *Blog) String() string { +func (x *Blogs) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Blog) ProtoMessage() {} +func (*Blogs) ProtoMessage() {} -func (x *Blog) ProtoReflect() protoreflect.Message { +func (x *Blogs) ProtoReflect() protoreflect.Message { mi := &file_service_user_rpc_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -176,61 +167,12 @@ func (x *Blog) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Blog.ProtoReflect.Descriptor instead. -func (*Blog) Descriptor() ([]byte, []int) { +// Deprecated: Use Blogs.ProtoReflect.Descriptor instead. +func (*Blogs) Descriptor() ([]byte, []int) { return file_service_user_rpc_user_proto_rawDescGZIP(), []int{1} } -func (x *Blog) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Blog) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Blog) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Blog) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Blog) GetPublished() *timestamppb.Timestamp { - if x != nil { - return x.Published - } - return nil -} - -func (x *Blog) GetUpdated() *timestamppb.Timestamp { - if x != nil { - return x.Updated - } - return nil -} - -func (x *Blog) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Blog) GetSelfLink() string { +func (x *Blogs) GetSelfLink() string { if x != nil { return x.SelfLink } @@ -354,7 +296,7 @@ var file_service_user_rpc_user_proto_rawDesc = []byte{ 0x70, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, @@ -363,43 +305,29 @@ var file_service_user_rpc_user_proto_rawDesc = []byte{ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, - 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x67, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x62, 0x6f, - 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x12, - 0x24, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x52, 0x06, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, 0x12, 0x12, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, - 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x58, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, - 0x22, 0x20, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x32, 0x2e, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x1f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x67, + 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x62, + 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x62, 0x6f, 0x75, 0x74, + 0x12, 0x24, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x52, 0x06, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x23, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x67, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x58, 0x0a, 0x06, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x20, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x2e, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -417,24 +345,22 @@ func file_service_user_rpc_user_proto_rawDescGZIP() []byte { var file_service_user_rpc_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_service_user_rpc_user_proto_goTypes = []interface{}{ (*User)(nil), // 0: user.User - (*Blog)(nil), // 1: user.Blog + (*Blogs)(nil), // 1: user.Blogs (*Locale)(nil), // 2: user.Locale (*GetReq)(nil), // 3: user.GetReq (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_service_user_rpc_user_proto_depIdxs = []int32{ 4, // 0: user.User.created:type_name -> google.protobuf.Timestamp - 1, // 1: user.User.blogs:type_name -> user.Blog + 1, // 1: user.User.blogs:type_name -> user.Blogs 2, // 2: user.User.locale:type_name -> user.Locale - 4, // 3: user.Blog.published:type_name -> google.protobuf.Timestamp - 4, // 4: user.Blog.updated:type_name -> google.protobuf.Timestamp - 3, // 5: user.UserService.Get:input_type -> user.GetReq - 0, // 6: user.UserService.Get:output_type -> user.User - 6, // [6:7] is the sub-list for method output_type - 5, // [5:6] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 3, // 3: user.UserService.Get:input_type -> user.GetReq + 0, // 4: user.UserService.Get:output_type -> user.User + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_service_user_rpc_user_proto_init() } @@ -456,7 +382,7 @@ func file_service_user_rpc_user_proto_init() { } } file_service_user_rpc_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Blog); i { + switch v := v.(*Blogs); i { case 0: return &v.state case 1: diff --git a/service/user/rpc/userservice/user_service.go b/service/user/rpc/userservice/user_service.go index a53d12d..4f123b5 100644 --- a/service/user/rpc/userservice/user_service.go +++ b/service/user/rpc/userservice/user_service.go @@ -13,7 +13,7 @@ import ( ) type ( - Blog = user.Blog + Blogs = user.Blogs GetReq = user.GetReq Locale = user.Locale User = user.User