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 ListPostReq
- func (*ListPostReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostReq) GetAllFieldsKey() string
- func (x *ListPostReq) GetBackward() bool
- func (x *ListPostReq) GetLastToken() string
- func (x *ListPostReq) GetLimit() int64
- func (x *ListPostReq) GetMultiFieldsKey() *ListPostReq_SearchField
- func (x *ListPostReq) GetOffset() int64
- func (x *ListPostReq) GetOnlyOfficial() bool
- func (x *ListPostReq) GetOnlyUserId() string
- func (m *ListPostReq) GetSearchOptions() isListPostReq_SearchOptions
- func (*ListPostReq) ProtoMessage()
- func (x *ListPostReq) ProtoReflect() protoreflect.Message
- func (x *ListPostReq) Reset()
- func (x *ListPostReq) String() string
- type ListPostReq_AllFieldsKey
- type ListPostReq_MultiFieldsKey
- type ListPostReq_SearchField
- func (*ListPostReq_SearchField) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostReq_SearchField) GetTag() string
- func (x *ListPostReq_SearchField) GetText() string
- func (x *ListPostReq_SearchField) GetTitle() string
- func (*ListPostReq_SearchField) ProtoMessage()
- func (x *ListPostReq_SearchField) ProtoReflect() protoreflect.Message
- func (x *ListPostReq_SearchField) Reset()
- func (x *ListPostReq_SearchField) String() string
- type ListPostResp
- func (*ListPostResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostResp) GetPosts() []*Post
- func (x *ListPostResp) GetToken() string
- 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) GetIsOfficial() bool
- 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 SetOfficialReq
- func (*SetOfficialReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetOfficialReq) GetIsRemove() bool
- func (x *SetOfficialReq) GetPostId() string
- func (*SetOfficialReq) ProtoMessage()
- func (x *SetOfficialReq) ProtoReflect() protoreflect.Message
- func (x *SetOfficialReq) Reset()
- func (x *SetOfficialReq) String() string
- type SetOfficialResp
- 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) RetrievePost(context.Context, *RetrievePostReq) (*RetrievePostResp, error)
- func (UnimplementedPostRpcServer) SetOfficial(context.Context, *SetOfficialReq) (*SetOfficialResp, 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: "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: "SetOfficial", Handler: _PostRpc_SetOfficial_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 ListPostReq ¶
type ListPostReq struct { Offset *int64 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` Backward *bool `protobuf:"varint,3,opt,name=backward,proto3,oneof" json:"backward,omitempty"` LastToken *string `protobuf:"bytes,4,opt,name=lastToken,proto3,oneof" json:"lastToken,omitempty"` // Types that are assignable to SearchOptions: // *ListPostReq_AllFieldsKey // *ListPostReq_MultiFieldsKey SearchOptions isListPostReq_SearchOptions `protobuf_oneof:"SearchOptions"` OnlyOfficial *bool `protobuf:"varint,7,opt,name=onlyOfficial,proto3,oneof" json:"onlyOfficial,omitempty"` OnlyUserId *string `protobuf:"bytes,8,opt,name=onlyUserId,proto3,oneof" json:"onlyUserId,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) GetAllFieldsKey ¶ added in v1.2.0
func (x *ListPostReq) GetAllFieldsKey() string
func (*ListPostReq) GetBackward ¶ added in v1.2.0
func (x *ListPostReq) GetBackward() bool
func (*ListPostReq) GetLastToken ¶ added in v1.2.0
func (x *ListPostReq) GetLastToken() string
func (*ListPostReq) GetLimit ¶ added in v1.2.0
func (x *ListPostReq) GetLimit() int64
func (*ListPostReq) GetMultiFieldsKey ¶ added in v1.2.0
func (x *ListPostReq) GetMultiFieldsKey() *ListPostReq_SearchField
func (*ListPostReq) GetOffset ¶ added in v1.2.0
func (x *ListPostReq) GetOffset() int64
func (*ListPostReq) GetOnlyOfficial ¶ added in v1.2.0
func (x *ListPostReq) GetOnlyOfficial() bool
func (*ListPostReq) GetOnlyUserId ¶ added in v1.2.0
func (x *ListPostReq) GetOnlyUserId() string
func (*ListPostReq) GetSearchOptions ¶ added in v1.2.0
func (m *ListPostReq) GetSearchOptions() isListPostReq_SearchOptions
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 ListPostReq_AllFieldsKey ¶ added in v1.2.0
type ListPostReq_AllFieldsKey struct {
AllFieldsKey string `protobuf:"bytes,5,opt,name=allFieldsKey,proto3,oneof"`
}
type ListPostReq_MultiFieldsKey ¶ added in v1.2.0
type ListPostReq_MultiFieldsKey struct {
MultiFieldsKey *ListPostReq_SearchField `protobuf:"bytes,6,opt,name=multiFieldsKey,proto3,oneof"`
}
type ListPostReq_SearchField ¶ added in v1.2.0
type ListPostReq_SearchField struct { Text *string `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"` Title *string `protobuf:"bytes,2,opt,name=title,proto3,oneof" json:"title,omitempty"` Tag *string `protobuf:"bytes,3,opt,name=tag,proto3,oneof" json:"tag,omitempty"` // contains filtered or unexported fields }
func (*ListPostReq_SearchField) Descriptor
deprecated
added in
v1.2.0
func (*ListPostReq_SearchField) Descriptor() ([]byte, []int)
Deprecated: Use ListPostReq_SearchField.ProtoReflect.Descriptor instead.
func (*ListPostReq_SearchField) GetTag ¶ added in v1.2.0
func (x *ListPostReq_SearchField) GetTag() string
func (*ListPostReq_SearchField) GetText ¶ added in v1.2.0
func (x *ListPostReq_SearchField) GetText() string
func (*ListPostReq_SearchField) GetTitle ¶ added in v1.2.0
func (x *ListPostReq_SearchField) GetTitle() string
func (*ListPostReq_SearchField) ProtoMessage ¶ added in v1.2.0
func (*ListPostReq_SearchField) ProtoMessage()
func (*ListPostReq_SearchField) ProtoReflect ¶ added in v1.2.0
func (x *ListPostReq_SearchField) ProtoReflect() protoreflect.Message
func (*ListPostReq_SearchField) Reset ¶ added in v1.2.0
func (x *ListPostReq_SearchField) Reset()
func (*ListPostReq_SearchField) String ¶ added in v1.2.0
func (x *ListPostReq_SearchField) 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"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,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) GetToken ¶ added in v1.2.0
func (x *ListPostResp) GetToken() string
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"` IsOfficial bool `protobuf:"varint,10,opt,name=isOfficial,proto3" json:"isOfficial,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) GetCoverUrl ¶
func (*Post) GetCreateAt ¶
func (*Post) GetIsOfficial ¶ added in v1.2.0
func (*Post) GetUpdateAt ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type PostRpcClient ¶
type PostRpcClient interface { 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) SetOfficial(ctx context.Context, in *SetOfficialReq, opts ...grpc.CallOption) (*SetOfficialResp, 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 { 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) SetOfficial(context.Context, *SetOfficialReq) (*SetOfficialResp, 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 SetOfficialReq ¶ added in v1.2.0
type SetOfficialReq struct { PostId string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"` IsRemove bool `protobuf:"varint,2,opt,name=isRemove,proto3" json:"isRemove,omitempty"` // contains filtered or unexported fields }
func (*SetOfficialReq) Descriptor
deprecated
added in
v1.2.0
func (*SetOfficialReq) Descriptor() ([]byte, []int)
Deprecated: Use SetOfficialReq.ProtoReflect.Descriptor instead.
func (*SetOfficialReq) GetIsRemove ¶ added in v1.2.0
func (x *SetOfficialReq) GetIsRemove() bool
func (*SetOfficialReq) GetPostId ¶ added in v1.2.0
func (x *SetOfficialReq) GetPostId() string
func (*SetOfficialReq) ProtoMessage ¶ added in v1.2.0
func (*SetOfficialReq) ProtoMessage()
func (*SetOfficialReq) ProtoReflect ¶ added in v1.2.0
func (x *SetOfficialReq) ProtoReflect() protoreflect.Message
func (*SetOfficialReq) Reset ¶ added in v1.2.0
func (x *SetOfficialReq) Reset()
func (*SetOfficialReq) String ¶ added in v1.2.0
func (x *SetOfficialReq) String() string
type SetOfficialResp ¶ added in v1.2.0
type SetOfficialResp struct {
// contains filtered or unexported fields
}
func (*SetOfficialResp) Descriptor
deprecated
added in
v1.2.0
func (*SetOfficialResp) Descriptor() ([]byte, []int)
Deprecated: Use SetOfficialResp.ProtoReflect.Descriptor instead.
func (*SetOfficialResp) ProtoMessage ¶ added in v1.2.0
func (*SetOfficialResp) ProtoMessage()
func (*SetOfficialResp) ProtoReflect ¶ added in v1.2.0
func (x *SetOfficialResp) ProtoReflect() protoreflect.Message
func (*SetOfficialResp) Reset ¶ added in v1.2.0
func (x *SetOfficialResp) Reset()
func (*SetOfficialResp) String ¶ added in v1.2.0
func (x *SetOfficialResp) 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) RetrievePost ¶
func (UnimplementedPostRpcServer) RetrievePost(context.Context, *RetrievePostReq) (*RetrievePostResp, error)
func (UnimplementedPostRpcServer) SetOfficial ¶ added in v1.2.0
func (UnimplementedPostRpcServer) SetOfficial(context.Context, *SetOfficialReq) (*SetOfficialResp, 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