Documentation ¶
Index ¶
- Variables
- func RegisterPostRpcServer(s grpc.ServiceRegistrar, srv PostRpcServer)
- type CreatePostReq
- func (*CreatePostReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePostReq) GetCoverUrl() string
- func (x *CreatePostReq) GetTags() []string
- func (x *CreatePostReq) GetText() string
- func (x *CreatePostReq) GetTitle() string
- func (x *CreatePostReq) GetUserId() string
- func (*CreatePostReq) ProtoMessage()
- func (x *CreatePostReq) ProtoReflect() protoreflect.Message
- func (x *CreatePostReq) Reset()
- func (x *CreatePostReq) String() string
- type CreatePostResp
- type DeletePostReq
- type DeletePostResp
- type ListPostByUserIdReq
- func (*ListPostByUserIdReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostByUserIdReq) GetCount() int64
- func (x *ListPostByUserIdReq) GetSkip() int64
- func (x *ListPostByUserIdReq) GetStatus() int64
- func (x *ListPostByUserIdReq) GetUserId() string
- func (*ListPostByUserIdReq) ProtoMessage()
- func (x *ListPostByUserIdReq) ProtoReflect() protoreflect.Message
- func (x *ListPostByUserIdReq) Reset()
- func (x *ListPostByUserIdReq) String() string
- type ListPostByUserIdResp
- func (*ListPostByUserIdResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostByUserIdResp) GetPosts() []*Post
- func (x *ListPostByUserIdResp) GetTotal() int64
- func (*ListPostByUserIdResp) ProtoMessage()
- func (x *ListPostByUserIdResp) ProtoReflect() protoreflect.Message
- func (x *ListPostByUserIdResp) Reset()
- func (x *ListPostByUserIdResp) String() string
- type ListPostReq
- type ListPostResp
- func (*ListPostResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostResp) GetPosts() []*Post
- func (x *ListPostResp) GetTotal() int64
- func (*ListPostResp) ProtoMessage()
- func (x *ListPostResp) ProtoReflect() protoreflect.Message
- func (x *ListPostResp) Reset()
- func (x *ListPostResp) String() string
- type Post
- func (*Post) Descriptor() ([]byte, []int)deprecated
- func (x *Post) GetCoverUrl() string
- func (x *Post) GetCreateAt() int64
- func (x *Post) GetId() string
- func (x *Post) GetStatus() int64
- func (x *Post) GetTags() []string
- func (x *Post) GetText() string
- func (x *Post) GetTitle() string
- func (x *Post) GetUpdateAt() int64
- func (x *Post) GetUserId() string
- func (*Post) ProtoMessage()
- func (x *Post) ProtoReflect() protoreflect.Message
- func (x *Post) Reset()
- func (x *Post) String() string
- type PostRpcClient
- type PostRpcServer
- type RetrievePostReq
- type RetrievePostResp
- type SearchPostReq
- func (*SearchPostReq) Descriptor() ([]byte, []int)deprecated
- func (x *SearchPostReq) GetCount() int64
- func (x *SearchPostReq) GetKeyword() string
- func (x *SearchPostReq) GetSkip() int64
- func (*SearchPostReq) ProtoMessage()
- func (x *SearchPostReq) ProtoReflect() protoreflect.Message
- func (x *SearchPostReq) Reset()
- func (x *SearchPostReq) String() string
- type SearchPostResp
- func (*SearchPostResp) Descriptor() ([]byte, []int)deprecated
- func (x *SearchPostResp) GetPosts() []*Post
- func (x *SearchPostResp) GetTotal() int64
- func (*SearchPostResp) ProtoMessage()
- func (x *SearchPostResp) ProtoReflect() protoreflect.Message
- func (x *SearchPostResp) Reset()
- func (x *SearchPostResp) String() string
- type UnimplementedPostRpcServer
- func (UnimplementedPostRpcServer) CreatePost(context.Context, *CreatePostReq) (*CreatePostResp, error)
- func (UnimplementedPostRpcServer) DeletePost(context.Context, *DeletePostReq) (*DeletePostResp, error)
- func (UnimplementedPostRpcServer) ListPost(context.Context, *ListPostReq) (*ListPostResp, error)
- func (UnimplementedPostRpcServer) ListPostByUserId(context.Context, *ListPostByUserIdReq) (*ListPostByUserIdResp, error)
- func (UnimplementedPostRpcServer) RetrievePost(context.Context, *RetrievePostReq) (*RetrievePostResp, error)
- func (UnimplementedPostRpcServer) SearchPost(context.Context, *SearchPostReq) (*SearchPostResp, error)
- func (UnimplementedPostRpcServer) UpdatePost(context.Context, *UpdatePostReq) (*UpdatePostResp, error)
- type UnsafePostRpcServer
- type UpdatePostReq
- func (*UpdatePostReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePostReq) GetCoverUrl() string
- func (x *UpdatePostReq) GetId() string
- func (x *UpdatePostReq) GetTags() []string
- func (x *UpdatePostReq) GetText() string
- func (x *UpdatePostReq) GetTitle() string
- func (*UpdatePostReq) ProtoMessage()
- func (x *UpdatePostReq) ProtoReflect() protoreflect.Message
- func (x *UpdatePostReq) Reset()
- func (x *UpdatePostReq) String() string
- type UpdatePostResp
Constants ¶
This section is empty.
Variables ¶
var File_post_proto protoreflect.FileDescriptor
var PostRpc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "post.post_rpc", HandlerType: (*PostRpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SearchPost", Handler: _PostRpc_SearchPost_Handler, }, { MethodName: "CreatePost", Handler: _PostRpc_CreatePost_Handler, }, { MethodName: "RetrievePost", Handler: _PostRpc_RetrievePost_Handler, }, { MethodName: "UpdatePost", Handler: _PostRpc_UpdatePost_Handler, }, { MethodName: "DeletePost", Handler: _PostRpc_DeletePost_Handler, }, { MethodName: "ListPost", Handler: _PostRpc_ListPost_Handler, }, { MethodName: "ListPostByUserId", Handler: _PostRpc_ListPostByUserId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "post.proto", }
PostRpc_ServiceDesc is the grpc.ServiceDesc for PostRpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPostRpcServer ¶
func RegisterPostRpcServer(s grpc.ServiceRegistrar, srv PostRpcServer)
Types ¶
type CreatePostReq ¶
type CreatePostReq struct { Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` CoverUrl string `protobuf:"bytes,4,opt,name=coverUrl,proto3" json:"coverUrl,omitempty"` Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` UserId string `protobuf:"bytes,6,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
create a post
func (*CreatePostReq) Descriptor
deprecated
func (*CreatePostReq) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostReq.ProtoReflect.Descriptor instead.
func (*CreatePostReq) GetCoverUrl ¶
func (x *CreatePostReq) GetCoverUrl() string
func (*CreatePostReq) GetTags ¶
func (x *CreatePostReq) GetTags() []string
func (*CreatePostReq) GetText ¶
func (x *CreatePostReq) GetText() string
func (*CreatePostReq) GetTitle ¶
func (x *CreatePostReq) GetTitle() string
func (*CreatePostReq) GetUserId ¶
func (x *CreatePostReq) GetUserId() string
func (*CreatePostReq) ProtoMessage ¶
func (*CreatePostReq) ProtoMessage()
func (*CreatePostReq) ProtoReflect ¶
func (x *CreatePostReq) ProtoReflect() protoreflect.Message
func (*CreatePostReq) Reset ¶
func (x *CreatePostReq) Reset()
func (*CreatePostReq) String ¶
func (x *CreatePostReq) String() string
type CreatePostResp ¶
type CreatePostResp struct { PostId string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"` // contains filtered or unexported fields }
func (*CreatePostResp) Descriptor
deprecated
func (*CreatePostResp) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostResp.ProtoReflect.Descriptor instead.
func (*CreatePostResp) GetPostId ¶
func (x *CreatePostResp) GetPostId() string
func (*CreatePostResp) ProtoMessage ¶
func (*CreatePostResp) ProtoMessage()
func (*CreatePostResp) ProtoReflect ¶
func (x *CreatePostResp) ProtoReflect() protoreflect.Message
func (*CreatePostResp) Reset ¶
func (x *CreatePostResp) Reset()
func (*CreatePostResp) String ¶
func (x *CreatePostResp) String() string
type DeletePostReq ¶
type DeletePostReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
delete a post
func (*DeletePostReq) Descriptor
deprecated
func (*DeletePostReq) Descriptor() ([]byte, []int)
Deprecated: Use DeletePostReq.ProtoReflect.Descriptor instead.
func (*DeletePostReq) GetId ¶
func (x *DeletePostReq) GetId() string
func (*DeletePostReq) ProtoMessage ¶
func (*DeletePostReq) ProtoMessage()
func (*DeletePostReq) ProtoReflect ¶
func (x *DeletePostReq) ProtoReflect() protoreflect.Message
func (*DeletePostReq) Reset ¶
func (x *DeletePostReq) Reset()
func (*DeletePostReq) String ¶
func (x *DeletePostReq) String() string
type DeletePostResp ¶
type DeletePostResp struct {
// contains filtered or unexported fields
}
func (*DeletePostResp) Descriptor
deprecated
func (*DeletePostResp) Descriptor() ([]byte, []int)
Deprecated: Use DeletePostResp.ProtoReflect.Descriptor instead.
func (*DeletePostResp) ProtoMessage ¶
func (*DeletePostResp) ProtoMessage()
func (*DeletePostResp) ProtoReflect ¶
func (x *DeletePostResp) ProtoReflect() protoreflect.Message
func (*DeletePostResp) Reset ¶
func (x *DeletePostResp) Reset()
func (*DeletePostResp) String ¶
func (x *DeletePostResp) String() string
type ListPostByUserIdReq ¶
type ListPostByUserIdReq struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Status int64 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` // -1 全部 0 审核中 1 过审 2 不过审 Skip int64 `protobuf:"varint,4,opt,name=skip,proto3" json:"skip,omitempty"` Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
list posts by userId & status
func (*ListPostByUserIdReq) Descriptor
deprecated
func (*ListPostByUserIdReq) Descriptor() ([]byte, []int)
Deprecated: Use ListPostByUserIdReq.ProtoReflect.Descriptor instead.
func (*ListPostByUserIdReq) GetCount ¶
func (x *ListPostByUserIdReq) GetCount() int64
func (*ListPostByUserIdReq) GetSkip ¶
func (x *ListPostByUserIdReq) GetSkip() int64
func (*ListPostByUserIdReq) GetStatus ¶
func (x *ListPostByUserIdReq) GetStatus() int64
func (*ListPostByUserIdReq) GetUserId ¶
func (x *ListPostByUserIdReq) GetUserId() string
func (*ListPostByUserIdReq) ProtoMessage ¶
func (*ListPostByUserIdReq) ProtoMessage()
func (*ListPostByUserIdReq) ProtoReflect ¶
func (x *ListPostByUserIdReq) ProtoReflect() protoreflect.Message
func (*ListPostByUserIdReq) Reset ¶
func (x *ListPostByUserIdReq) Reset()
func (*ListPostByUserIdReq) String ¶
func (x *ListPostByUserIdReq) String() string
type ListPostByUserIdResp ¶
type ListPostByUserIdResp struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListPostByUserIdResp) Descriptor
deprecated
func (*ListPostByUserIdResp) Descriptor() ([]byte, []int)
Deprecated: Use ListPostByUserIdResp.ProtoReflect.Descriptor instead.
func (*ListPostByUserIdResp) GetPosts ¶
func (x *ListPostByUserIdResp) GetPosts() []*Post
func (*ListPostByUserIdResp) GetTotal ¶ added in v1.0.3
func (x *ListPostByUserIdResp) GetTotal() int64
func (*ListPostByUserIdResp) ProtoMessage ¶
func (*ListPostByUserIdResp) ProtoMessage()
func (*ListPostByUserIdResp) ProtoReflect ¶
func (x *ListPostByUserIdResp) ProtoReflect() protoreflect.Message
func (*ListPostByUserIdResp) Reset ¶
func (x *ListPostByUserIdResp) Reset()
func (*ListPostByUserIdResp) String ¶
func (x *ListPostByUserIdResp) String() string
type ListPostReq ¶
type ListPostReq struct { Skip int64 `protobuf:"varint,1,opt,name=skip,proto3" json:"skip,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 获取的数量 // contains filtered or unexported fields }
list posts
func (*ListPostReq) Descriptor
deprecated
func (*ListPostReq) Descriptor() ([]byte, []int)
Deprecated: Use ListPostReq.ProtoReflect.Descriptor instead.
func (*ListPostReq) GetCount ¶
func (x *ListPostReq) GetCount() int64
func (*ListPostReq) GetSkip ¶
func (x *ListPostReq) GetSkip() int64
func (*ListPostReq) ProtoMessage ¶
func (*ListPostReq) ProtoMessage()
func (*ListPostReq) ProtoReflect ¶
func (x *ListPostReq) ProtoReflect() protoreflect.Message
func (*ListPostReq) Reset ¶
func (x *ListPostReq) Reset()
func (*ListPostReq) String ¶
func (x *ListPostReq) String() string
type ListPostResp ¶
type ListPostResp struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListPostResp) Descriptor
deprecated
func (*ListPostResp) Descriptor() ([]byte, []int)
Deprecated: Use ListPostResp.ProtoReflect.Descriptor instead.
func (*ListPostResp) GetPosts ¶
func (x *ListPostResp) GetPosts() []*Post
func (*ListPostResp) GetTotal ¶ added in v1.0.3
func (x *ListPostResp) GetTotal() int64
func (*ListPostResp) ProtoMessage ¶
func (*ListPostResp) ProtoMessage()
func (*ListPostResp) ProtoReflect ¶
func (x *ListPostResp) ProtoReflect() protoreflect.Message
func (*ListPostResp) Reset ¶
func (x *ListPostResp) Reset()
func (*ListPostResp) String ¶
func (x *ListPostResp) String() string
type Post ¶
type Post struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreateAt int64 `protobuf:"varint,2,opt,name=createAt,proto3" json:"createAt,omitempty"` UpdateAt int64 `protobuf:"varint,3,opt,name=updateAt,proto3" json:"updateAt,omitempty"` Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` CoverUrl string `protobuf:"bytes,7,opt,name=coverUrl,proto3" json:"coverUrl,omitempty"` Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` UserId string `protobuf:"bytes,9,opt,name=userId,proto3" json:"userId,omitempty"` Status int64 `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) GetCoverUrl ¶
func (*Post) GetCreateAt ¶
func (*Post) GetUpdateAt ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type PostRpcClient ¶
type PostRpcClient interface { SearchPost(ctx context.Context, in *SearchPostReq, opts ...grpc.CallOption) (*SearchPostResp, error) CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostResp, error) RetrievePost(ctx context.Context, in *RetrievePostReq, opts ...grpc.CallOption) (*RetrievePostResp, error) UpdatePost(ctx context.Context, in *UpdatePostReq, opts ...grpc.CallOption) (*UpdatePostResp, error) DeletePost(ctx context.Context, in *DeletePostReq, opts ...grpc.CallOption) (*DeletePostResp, error) ListPost(ctx context.Context, in *ListPostReq, opts ...grpc.CallOption) (*ListPostResp, error) ListPostByUserId(ctx context.Context, in *ListPostByUserIdReq, opts ...grpc.CallOption) (*ListPostByUserIdResp, error) }
PostRpcClient is the client API for PostRpc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPostRpcClient ¶
func NewPostRpcClient(cc grpc.ClientConnInterface) PostRpcClient
type PostRpcServer ¶
type PostRpcServer interface { SearchPost(context.Context, *SearchPostReq) (*SearchPostResp, error) CreatePost(context.Context, *CreatePostReq) (*CreatePostResp, error) RetrievePost(context.Context, *RetrievePostReq) (*RetrievePostResp, error) UpdatePost(context.Context, *UpdatePostReq) (*UpdatePostResp, error) DeletePost(context.Context, *DeletePostReq) (*DeletePostResp, error) ListPost(context.Context, *ListPostReq) (*ListPostResp, error) ListPostByUserId(context.Context, *ListPostByUserIdReq) (*ListPostByUserIdResp, error) // contains filtered or unexported methods }
PostRpcServer is the server API for PostRpc service. All implementations must embed UnimplementedPostRpcServer for forward compatibility
type RetrievePostReq ¶
type RetrievePostReq struct { PostId string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"` // contains filtered or unexported fields }
retrieve a post
func (*RetrievePostReq) Descriptor
deprecated
func (*RetrievePostReq) Descriptor() ([]byte, []int)
Deprecated: Use RetrievePostReq.ProtoReflect.Descriptor instead.
func (*RetrievePostReq) GetPostId ¶
func (x *RetrievePostReq) GetPostId() string
func (*RetrievePostReq) ProtoMessage ¶
func (*RetrievePostReq) ProtoMessage()
func (*RetrievePostReq) ProtoReflect ¶
func (x *RetrievePostReq) ProtoReflect() protoreflect.Message
func (*RetrievePostReq) Reset ¶
func (x *RetrievePostReq) Reset()
func (*RetrievePostReq) String ¶
func (x *RetrievePostReq) String() string
type RetrievePostResp ¶
type RetrievePostResp struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*RetrievePostResp) Descriptor
deprecated
func (*RetrievePostResp) Descriptor() ([]byte, []int)
Deprecated: Use RetrievePostResp.ProtoReflect.Descriptor instead.
func (*RetrievePostResp) GetPost ¶
func (x *RetrievePostResp) GetPost() *Post
func (*RetrievePostResp) ProtoMessage ¶
func (*RetrievePostResp) ProtoMessage()
func (*RetrievePostResp) ProtoReflect ¶
func (x *RetrievePostResp) ProtoReflect() protoreflect.Message
func (*RetrievePostResp) Reset ¶
func (x *RetrievePostResp) Reset()
func (*RetrievePostResp) String ¶
func (x *RetrievePostResp) String() string
type SearchPostReq ¶
type SearchPostReq struct { Skip int64 `protobuf:"varint,1,opt,name=skip,proto3" json:"skip,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 获取的数量 Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"` // contains filtered or unexported fields }
search posts
func (*SearchPostReq) Descriptor
deprecated
func (*SearchPostReq) Descriptor() ([]byte, []int)
Deprecated: Use SearchPostReq.ProtoReflect.Descriptor instead.
func (*SearchPostReq) GetCount ¶
func (x *SearchPostReq) GetCount() int64
func (*SearchPostReq) GetKeyword ¶
func (x *SearchPostReq) GetKeyword() string
func (*SearchPostReq) GetSkip ¶
func (x *SearchPostReq) GetSkip() int64
func (*SearchPostReq) ProtoMessage ¶
func (*SearchPostReq) ProtoMessage()
func (*SearchPostReq) ProtoReflect ¶
func (x *SearchPostReq) ProtoReflect() protoreflect.Message
func (*SearchPostReq) Reset ¶
func (x *SearchPostReq) Reset()
func (*SearchPostReq) String ¶
func (x *SearchPostReq) String() string
type SearchPostResp ¶
type SearchPostResp struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*SearchPostResp) Descriptor
deprecated
func (*SearchPostResp) Descriptor() ([]byte, []int)
Deprecated: Use SearchPostResp.ProtoReflect.Descriptor instead.
func (*SearchPostResp) GetPosts ¶
func (x *SearchPostResp) GetPosts() []*Post
func (*SearchPostResp) GetTotal ¶ added in v1.0.3
func (x *SearchPostResp) GetTotal() int64
func (*SearchPostResp) ProtoMessage ¶
func (*SearchPostResp) ProtoMessage()
func (*SearchPostResp) ProtoReflect ¶
func (x *SearchPostResp) ProtoReflect() protoreflect.Message
func (*SearchPostResp) Reset ¶
func (x *SearchPostResp) Reset()
func (*SearchPostResp) String ¶
func (x *SearchPostResp) String() string
type UnimplementedPostRpcServer ¶
type UnimplementedPostRpcServer struct { }
UnimplementedPostRpcServer must be embedded to have forward compatible implementations.
func (UnimplementedPostRpcServer) CreatePost ¶
func (UnimplementedPostRpcServer) CreatePost(context.Context, *CreatePostReq) (*CreatePostResp, error)
func (UnimplementedPostRpcServer) DeletePost ¶
func (UnimplementedPostRpcServer) DeletePost(context.Context, *DeletePostReq) (*DeletePostResp, error)
func (UnimplementedPostRpcServer) ListPost ¶
func (UnimplementedPostRpcServer) ListPost(context.Context, *ListPostReq) (*ListPostResp, error)
func (UnimplementedPostRpcServer) ListPostByUserId ¶
func (UnimplementedPostRpcServer) ListPostByUserId(context.Context, *ListPostByUserIdReq) (*ListPostByUserIdResp, error)
func (UnimplementedPostRpcServer) RetrievePost ¶
func (UnimplementedPostRpcServer) RetrievePost(context.Context, *RetrievePostReq) (*RetrievePostResp, error)
func (UnimplementedPostRpcServer) SearchPost ¶
func (UnimplementedPostRpcServer) SearchPost(context.Context, *SearchPostReq) (*SearchPostResp, error)
func (UnimplementedPostRpcServer) UpdatePost ¶
func (UnimplementedPostRpcServer) UpdatePost(context.Context, *UpdatePostReq) (*UpdatePostResp, error)
type UnsafePostRpcServer ¶
type UnsafePostRpcServer interface {
// contains filtered or unexported methods
}
UnsafePostRpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostRpcServer will result in compilation errors.
type UpdatePostReq ¶
type UpdatePostReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` CoverUrl string `protobuf:"bytes,5,opt,name=coverUrl,proto3" json:"coverUrl,omitempty"` Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
update a post
func (*UpdatePostReq) Descriptor
deprecated
func (*UpdatePostReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePostReq.ProtoReflect.Descriptor instead.
func (*UpdatePostReq) GetCoverUrl ¶
func (x *UpdatePostReq) GetCoverUrl() string
func (*UpdatePostReq) GetId ¶
func (x *UpdatePostReq) GetId() string
func (*UpdatePostReq) GetTags ¶
func (x *UpdatePostReq) GetTags() []string
func (*UpdatePostReq) GetText ¶
func (x *UpdatePostReq) GetText() string
func (*UpdatePostReq) GetTitle ¶
func (x *UpdatePostReq) GetTitle() string
func (*UpdatePostReq) ProtoMessage ¶
func (*UpdatePostReq) ProtoMessage()
func (*UpdatePostReq) ProtoReflect ¶
func (x *UpdatePostReq) ProtoReflect() protoreflect.Message
func (*UpdatePostReq) Reset ¶
func (x *UpdatePostReq) Reset()
func (*UpdatePostReq) String ¶
func (x *UpdatePostReq) String() string
type UpdatePostResp ¶
type UpdatePostResp struct {
// contains filtered or unexported fields
}
func (*UpdatePostResp) Descriptor
deprecated
func (*UpdatePostResp) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePostResp.ProtoReflect.Descriptor instead.
func (*UpdatePostResp) ProtoMessage ¶
func (*UpdatePostResp) ProtoMessage()
func (*UpdatePostResp) ProtoReflect ¶
func (x *UpdatePostResp) ProtoReflect() protoreflect.Message
func (*UpdatePostResp) Reset ¶
func (x *UpdatePostResp) Reset()
func (*UpdatePostResp) String ¶
func (x *UpdatePostResp) String() string