Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBlogServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBlogServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlogServiceClient) error
- func RegisterBlogServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBlogServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlogServiceServer) error
- func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
- type BlogServiceClient
- type BlogServiceServer
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)deprecated
- func (x *Comment) GetContent() string
- func (x *Comment) GetCreatedAt() *timestamppb.Timestamp
- func (x *Comment) GetId() uint64
- func (x *Comment) GetPost() *Post
- func (x *Comment) GetPostId() uint64
- func (x *Comment) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Comment) GetUser() *User
- func (x *Comment) GetUserId() uint64
- func (*Comment) ProtoMessage()
- func (x *Comment) ProtoReflect() protoreflect.Message
- func (x *Comment) Reset()
- func (x *Comment) String() string
- type CreateCommentRequest
- func (*CreateCommentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCommentRequest) GetComment() *Comment
- func (*CreateCommentRequest) ProtoMessage()
- func (x *CreateCommentRequest) ProtoReflect() protoreflect.Message
- func (x *CreateCommentRequest) Reset()
- func (x *CreateCommentRequest) String() string
- type CreateCommentResponse
- func (*CreateCommentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCommentResponse) GetComment() *Comment
- func (*CreateCommentResponse) ProtoMessage()
- func (x *CreateCommentResponse) ProtoReflect() protoreflect.Message
- func (x *CreateCommentResponse) Reset()
- func (x *CreateCommentResponse) String() string
- type CreatePostRequest
- type CreatePostResponse
- type DeleteCommentRequest
- func (*DeleteCommentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCommentRequest) GetId() uint64
- func (*DeleteCommentRequest) ProtoMessage()
- func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteCommentRequest) Reset()
- func (x *DeleteCommentRequest) String() string
- type DeleteCommentResponse
- func (*DeleteCommentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCommentResponse) GetSuccess() bool
- func (*DeleteCommentResponse) ProtoMessage()
- func (x *DeleteCommentResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteCommentResponse) Reset()
- func (x *DeleteCommentResponse) String() string
- type DeletePostRequest
- type DeletePostResponse
- func (*DeletePostResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeletePostResponse) GetSuccess() bool
- func (*DeletePostResponse) ProtoMessage()
- func (x *DeletePostResponse) ProtoReflect() protoreflect.Message
- func (x *DeletePostResponse) Reset()
- func (x *DeletePostResponse) String() string
- type GetPostRequest
- type GetPostResponse
- type ListCommentsByPostIDRequest
- func (*ListCommentsByPostIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListCommentsByPostIDRequest) GetLimit() uint32
- func (x *ListCommentsByPostIDRequest) GetOffset() uint32
- func (x *ListCommentsByPostIDRequest) GetPostId() uint64
- func (*ListCommentsByPostIDRequest) ProtoMessage()
- func (x *ListCommentsByPostIDRequest) ProtoReflect() protoreflect.Message
- func (x *ListCommentsByPostIDRequest) Reset()
- func (x *ListCommentsByPostIDRequest) String() string
- type ListCommentsByPostIDResponse
- func (*ListCommentsByPostIDResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListCommentsByPostIDResponse) GetComments() []*Comment
- func (x *ListCommentsByPostIDResponse) GetTotal() uint64
- func (*ListCommentsByPostIDResponse) ProtoMessage()
- func (x *ListCommentsByPostIDResponse) ProtoReflect() protoreflect.Message
- func (x *ListCommentsByPostIDResponse) Reset()
- func (x *ListCommentsByPostIDResponse) String() string
- type ListPostsRequest
- func (*ListPostsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostsRequest) GetLimit() uint32
- func (x *ListPostsRequest) GetOffset() uint32
- func (*ListPostsRequest) ProtoMessage()
- func (x *ListPostsRequest) ProtoReflect() protoreflect.Message
- func (x *ListPostsRequest) Reset()
- func (x *ListPostsRequest) String() string
- type ListPostsResponse
- func (*ListPostsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPostsResponse) GetPosts() []*Post
- func (x *ListPostsResponse) GetTotal() uint64
- func (*ListPostsResponse) ProtoMessage()
- func (x *ListPostsResponse) ProtoReflect() protoreflect.Message
- func (x *ListPostsResponse) Reset()
- func (x *ListPostsResponse) String() string
- type Post
- func (*Post) Descriptor() ([]byte, []int)deprecated
- func (x *Post) GetCommentsCount() uint32
- func (x *Post) GetContent() string
- func (x *Post) GetCreatedAt() *timestamppb.Timestamp
- func (x *Post) GetId() uint64
- func (x *Post) GetTitle() string
- func (x *Post) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Post) GetUser() *User
- func (x *Post) GetUserId() uint64
- func (*Post) ProtoMessage()
- func (x *Post) ProtoReflect() protoreflect.Message
- func (x *Post) Reset()
- func (x *Post) String() string
- type SignInRequest
- func (*SignInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignInRequest) GetEmail() string
- func (x *SignInRequest) GetPassword() string
- func (m *SignInRequest) GetRequest() isSignInRequest_Request
- func (x *SignInRequest) GetUsername() string
- func (*SignInRequest) ProtoMessage()
- func (x *SignInRequest) ProtoReflect() protoreflect.Message
- func (x *SignInRequest) Reset()
- func (x *SignInRequest) String() string
- type SignInRequest_Email
- type SignInRequest_Username
- type SignInResponse
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetPassword() string
- func (x *SignUpRequest) GetUsername() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- type SignUpResponse
- type UnimplementedBlogServiceServer
- func (UnimplementedBlogServiceServer) CreateComment(context.Context, *CreateCommentRequest) (*CreateCommentResponse, error)
- func (UnimplementedBlogServiceServer) CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error)
- func (UnimplementedBlogServiceServer) DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error)
- func (UnimplementedBlogServiceServer) DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error)
- func (UnimplementedBlogServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
- func (UnimplementedBlogServiceServer) ListCommentsByPostID(context.Context, *ListCommentsByPostIDRequest) (*ListCommentsByPostIDResponse, error)
- func (UnimplementedBlogServiceServer) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error)
- func (UnimplementedBlogServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
- func (UnimplementedBlogServiceServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
- func (UnimplementedBlogServiceServer) UpdateComment(context.Context, *UpdateCommentRequest) (*UpdateCommentResponse, error)
- func (UnimplementedBlogServiceServer) UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error)
- type UnsafeBlogServiceServer
- type UpdateCommentRequest
- func (*UpdateCommentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateCommentRequest) GetComment() *Comment
- func (*UpdateCommentRequest) ProtoMessage()
- func (x *UpdateCommentRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateCommentRequest) Reset()
- func (x *UpdateCommentRequest) String() string
- type UpdateCommentResponse
- func (*UpdateCommentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateCommentResponse) GetSuccess() bool
- func (*UpdateCommentResponse) ProtoMessage()
- func (x *UpdateCommentResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateCommentResponse) Reset()
- func (x *UpdateCommentResponse) String() string
- type UpdatePostRequest
- type UpdatePostResponse
- func (*UpdatePostResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePostResponse) GetSuccess() bool
- func (*UpdatePostResponse) ProtoMessage()
- func (x *UpdatePostResponse) ProtoReflect() protoreflect.Message
- func (x *UpdatePostResponse) Reset()
- func (x *UpdatePostResponse) String() string
- type User
Constants ¶
This section is empty.
Variables ¶
var BlogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.protobuf.blog.v1.BlogService", HandlerType: (*BlogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SignUp", Handler: _BlogService_SignUp_Handler, }, { MethodName: "SignIn", Handler: _BlogService_SignIn_Handler, }, { MethodName: "CreatePost", Handler: _BlogService_CreatePost_Handler, }, { MethodName: "GetPost", Handler: _BlogService_GetPost_Handler, }, { MethodName: "ListPosts", Handler: _BlogService_ListPosts_Handler, }, { MethodName: "UpdatePost", Handler: _BlogService_UpdatePost_Handler, }, { MethodName: "DeletePost", Handler: _BlogService_DeletePost_Handler, }, { MethodName: "CreateComment", Handler: _BlogService_CreateComment_Handler, }, { MethodName: "DeleteComment", Handler: _BlogService_DeleteComment_Handler, }, { MethodName: "UpdateComment", Handler: _BlogService_UpdateComment_Handler, }, { MethodName: "ListCommentsByPostID", Handler: _BlogService_ListCommentsByPostID_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/protobuf/blog/v1/blog.proto", }
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)
var File_api_protobuf_blog_v1_blog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlogServiceHandler ¶
func RegisterBlogServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBlogServiceHandler registers the http handlers for service BlogService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBlogServiceHandlerClient ¶
func RegisterBlogServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlogServiceClient) error
RegisterBlogServiceHandlerClient registers the http handlers for service BlogService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlogServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlogServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BlogServiceClient" to call the correct interceptors.
func RegisterBlogServiceHandlerFromEndpoint ¶
func RegisterBlogServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBlogServiceHandlerFromEndpoint is same as RegisterBlogServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBlogServiceHandlerServer ¶
func RegisterBlogServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlogServiceServer) error
RegisterBlogServiceHandlerServer registers the http handlers for service BlogService to "mux". UnaryRPC :call BlogServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlogServiceHandlerFromEndpoint instead.
func RegisterBlogServiceServer ¶
func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
Types ¶
type BlogServiceClient ¶
type BlogServiceClient interface { SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error) CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error) UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*UpdatePostResponse, error) DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error) CreateComment(ctx context.Context, in *CreateCommentRequest, opts ...grpc.CallOption) (*CreateCommentResponse, error) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*DeleteCommentResponse, error) UpdateComment(ctx context.Context, in *UpdateCommentRequest, opts ...grpc.CallOption) (*UpdateCommentResponse, error) ListCommentsByPostID(ctx context.Context, in *ListCommentsByPostIDRequest, opts ...grpc.CallOption) (*ListCommentsByPostIDResponse, error) }
BlogServiceClient is the client API for BlogService 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 NewBlogServiceClient ¶
func NewBlogServiceClient(cc grpc.ClientConnInterface) BlogServiceClient
type BlogServiceServer ¶
type BlogServiceServer interface { SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error) SignIn(context.Context, *SignInRequest) (*SignInResponse, error) CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error) UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error) DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error) CreateComment(context.Context, *CreateCommentRequest) (*CreateCommentResponse, error) DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error) UpdateComment(context.Context, *UpdateCommentRequest) (*UpdateCommentResponse, error) ListCommentsByPostID(context.Context, *ListCommentsByPostIDRequest) (*ListCommentsByPostIDResponse, error) // contains filtered or unexported methods }
BlogServiceServer is the server API for BlogService service. All implementations must embed UnimplementedBlogServiceServer for forward compatibility
type Comment ¶
type Comment struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` PostId uint64 `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` UserId uint64 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Post *Post `protobuf:"bytes,7,opt,name=post,proto3" json:"post,omitempty"` User *User `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*Comment) Descriptor
deprecated
func (*Comment) GetContent ¶
func (*Comment) GetCreatedAt ¶
func (x *Comment) GetCreatedAt() *timestamppb.Timestamp
func (*Comment) GetUpdatedAt ¶
func (x *Comment) GetUpdatedAt() *timestamppb.Timestamp
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
func (*Comment) ProtoReflect ¶
func (x *Comment) ProtoReflect() protoreflect.Message
type CreateCommentRequest ¶
type CreateCommentRequest struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*CreateCommentRequest) Descriptor
deprecated
func (*CreateCommentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCommentRequest.ProtoReflect.Descriptor instead.
func (*CreateCommentRequest) GetComment ¶
func (x *CreateCommentRequest) GetComment() *Comment
func (*CreateCommentRequest) ProtoMessage ¶
func (*CreateCommentRequest) ProtoMessage()
func (*CreateCommentRequest) ProtoReflect ¶
func (x *CreateCommentRequest) ProtoReflect() protoreflect.Message
func (*CreateCommentRequest) Reset ¶
func (x *CreateCommentRequest) Reset()
func (*CreateCommentRequest) String ¶
func (x *CreateCommentRequest) String() string
type CreateCommentResponse ¶
type CreateCommentResponse struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*CreateCommentResponse) Descriptor
deprecated
func (*CreateCommentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateCommentResponse.ProtoReflect.Descriptor instead.
func (*CreateCommentResponse) GetComment ¶
func (x *CreateCommentResponse) GetComment() *Comment
func (*CreateCommentResponse) ProtoMessage ¶
func (*CreateCommentResponse) ProtoMessage()
func (*CreateCommentResponse) ProtoReflect ¶
func (x *CreateCommentResponse) ProtoReflect() protoreflect.Message
func (*CreateCommentResponse) Reset ¶
func (x *CreateCommentResponse) Reset()
func (*CreateCommentResponse) String ¶
func (x *CreateCommentResponse) String() string
type CreatePostRequest ¶
type CreatePostRequest struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*CreatePostRequest) Descriptor
deprecated
func (*CreatePostRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostRequest.ProtoReflect.Descriptor instead.
func (*CreatePostRequest) GetPost ¶
func (x *CreatePostRequest) GetPost() *Post
func (*CreatePostRequest) ProtoMessage ¶
func (*CreatePostRequest) ProtoMessage()
func (*CreatePostRequest) ProtoReflect ¶
func (x *CreatePostRequest) ProtoReflect() protoreflect.Message
func (*CreatePostRequest) Reset ¶
func (x *CreatePostRequest) Reset()
func (*CreatePostRequest) String ¶
func (x *CreatePostRequest) String() string
type CreatePostResponse ¶
type CreatePostResponse struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*CreatePostResponse) Descriptor
deprecated
func (*CreatePostResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostResponse.ProtoReflect.Descriptor instead.
func (*CreatePostResponse) GetPost ¶
func (x *CreatePostResponse) GetPost() *Post
func (*CreatePostResponse) ProtoMessage ¶
func (*CreatePostResponse) ProtoMessage()
func (*CreatePostResponse) ProtoReflect ¶
func (x *CreatePostResponse) ProtoReflect() protoreflect.Message
func (*CreatePostResponse) Reset ¶
func (x *CreatePostResponse) Reset()
func (*CreatePostResponse) String ¶
func (x *CreatePostResponse) String() string
type DeleteCommentRequest ¶
type DeleteCommentRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteCommentRequest) Descriptor
deprecated
func (*DeleteCommentRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead.
func (*DeleteCommentRequest) GetId ¶
func (x *DeleteCommentRequest) GetId() uint64
func (*DeleteCommentRequest) ProtoMessage ¶
func (*DeleteCommentRequest) ProtoMessage()
func (*DeleteCommentRequest) ProtoReflect ¶
func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message
func (*DeleteCommentRequest) Reset ¶
func (x *DeleteCommentRequest) Reset()
func (*DeleteCommentRequest) String ¶
func (x *DeleteCommentRequest) String() string
type DeleteCommentResponse ¶
type DeleteCommentResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*DeleteCommentResponse) Descriptor
deprecated
func (*DeleteCommentResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCommentResponse.ProtoReflect.Descriptor instead.
func (*DeleteCommentResponse) GetSuccess ¶
func (x *DeleteCommentResponse) GetSuccess() bool
func (*DeleteCommentResponse) ProtoMessage ¶
func (*DeleteCommentResponse) ProtoMessage()
func (*DeleteCommentResponse) ProtoReflect ¶
func (x *DeleteCommentResponse) ProtoReflect() protoreflect.Message
func (*DeleteCommentResponse) Reset ¶
func (x *DeleteCommentResponse) Reset()
func (*DeleteCommentResponse) String ¶
func (x *DeleteCommentResponse) String() string
type DeletePostRequest ¶
type DeletePostRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeletePostRequest) Descriptor
deprecated
func (*DeletePostRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.
func (*DeletePostRequest) GetId ¶
func (x *DeletePostRequest) GetId() uint64
func (*DeletePostRequest) ProtoMessage ¶
func (*DeletePostRequest) ProtoMessage()
func (*DeletePostRequest) ProtoReflect ¶
func (x *DeletePostRequest) ProtoReflect() protoreflect.Message
func (*DeletePostRequest) Reset ¶
func (x *DeletePostRequest) Reset()
func (*DeletePostRequest) String ¶
func (x *DeletePostRequest) String() string
type DeletePostResponse ¶
type DeletePostResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*DeletePostResponse) Descriptor
deprecated
func (*DeletePostResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeletePostResponse.ProtoReflect.Descriptor instead.
func (*DeletePostResponse) GetSuccess ¶
func (x *DeletePostResponse) GetSuccess() bool
func (*DeletePostResponse) ProtoMessage ¶
func (*DeletePostResponse) ProtoMessage()
func (*DeletePostResponse) ProtoReflect ¶
func (x *DeletePostResponse) ProtoReflect() protoreflect.Message
func (*DeletePostResponse) Reset ¶
func (x *DeletePostResponse) Reset()
func (*DeletePostResponse) String ¶
func (x *DeletePostResponse) String() string
type GetPostRequest ¶
type GetPostRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPostRequest) Descriptor
deprecated
func (*GetPostRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) GetId ¶
func (x *GetPostRequest) GetId() uint64
func (*GetPostRequest) ProtoMessage ¶
func (*GetPostRequest) ProtoMessage()
func (*GetPostRequest) ProtoReflect ¶
func (x *GetPostRequest) ProtoReflect() protoreflect.Message
func (*GetPostRequest) Reset ¶
func (x *GetPostRequest) Reset()
func (*GetPostRequest) String ¶
func (x *GetPostRequest) String() string
type GetPostResponse ¶
type GetPostResponse struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*GetPostResponse) Descriptor
deprecated
func (*GetPostResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) GetPost ¶
func (x *GetPostResponse) GetPost() *Post
func (*GetPostResponse) ProtoMessage ¶
func (*GetPostResponse) ProtoMessage()
func (*GetPostResponse) ProtoReflect ¶
func (x *GetPostResponse) ProtoReflect() protoreflect.Message
func (*GetPostResponse) Reset ¶
func (x *GetPostResponse) Reset()
func (*GetPostResponse) String ¶
func (x *GetPostResponse) String() string
type ListCommentsByPostIDRequest ¶
type ListCommentsByPostIDRequest struct { PostId uint64 `protobuf:"varint,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*ListCommentsByPostIDRequest) Descriptor
deprecated
func (*ListCommentsByPostIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListCommentsByPostIDRequest.ProtoReflect.Descriptor instead.
func (*ListCommentsByPostIDRequest) GetLimit ¶
func (x *ListCommentsByPostIDRequest) GetLimit() uint32
func (*ListCommentsByPostIDRequest) GetOffset ¶
func (x *ListCommentsByPostIDRequest) GetOffset() uint32
func (*ListCommentsByPostIDRequest) GetPostId ¶
func (x *ListCommentsByPostIDRequest) GetPostId() uint64
func (*ListCommentsByPostIDRequest) ProtoMessage ¶
func (*ListCommentsByPostIDRequest) ProtoMessage()
func (*ListCommentsByPostIDRequest) ProtoReflect ¶
func (x *ListCommentsByPostIDRequest) ProtoReflect() protoreflect.Message
func (*ListCommentsByPostIDRequest) Reset ¶
func (x *ListCommentsByPostIDRequest) Reset()
func (*ListCommentsByPostIDRequest) String ¶
func (x *ListCommentsByPostIDRequest) String() string
type ListCommentsByPostIDResponse ¶
type ListCommentsByPostIDResponse struct { Comments []*Comment `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments,omitempty"` Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListCommentsByPostIDResponse) Descriptor
deprecated
func (*ListCommentsByPostIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListCommentsByPostIDResponse.ProtoReflect.Descriptor instead.
func (*ListCommentsByPostIDResponse) GetComments ¶
func (x *ListCommentsByPostIDResponse) GetComments() []*Comment
func (*ListCommentsByPostIDResponse) GetTotal ¶
func (x *ListCommentsByPostIDResponse) GetTotal() uint64
func (*ListCommentsByPostIDResponse) ProtoMessage ¶
func (*ListCommentsByPostIDResponse) ProtoMessage()
func (*ListCommentsByPostIDResponse) ProtoReflect ¶
func (x *ListCommentsByPostIDResponse) ProtoReflect() protoreflect.Message
func (*ListCommentsByPostIDResponse) Reset ¶
func (x *ListCommentsByPostIDResponse) Reset()
func (*ListCommentsByPostIDResponse) String ¶
func (x *ListCommentsByPostIDResponse) String() string
type ListPostsRequest ¶
type ListPostsRequest struct { Offset uint32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*ListPostsRequest) Descriptor
deprecated
func (*ListPostsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPostsRequest.ProtoReflect.Descriptor instead.
func (*ListPostsRequest) GetLimit ¶
func (x *ListPostsRequest) GetLimit() uint32
func (*ListPostsRequest) GetOffset ¶
func (x *ListPostsRequest) GetOffset() uint32
func (*ListPostsRequest) ProtoMessage ¶
func (*ListPostsRequest) ProtoMessage()
func (*ListPostsRequest) ProtoReflect ¶
func (x *ListPostsRequest) ProtoReflect() protoreflect.Message
func (*ListPostsRequest) Reset ¶
func (x *ListPostsRequest) Reset()
func (*ListPostsRequest) String ¶
func (x *ListPostsRequest) String() string
type ListPostsResponse ¶
type ListPostsResponse struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListPostsResponse) Descriptor
deprecated
func (*ListPostsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPostsResponse.ProtoReflect.Descriptor instead.
func (*ListPostsResponse) GetPosts ¶
func (x *ListPostsResponse) GetPosts() []*Post
func (*ListPostsResponse) GetTotal ¶
func (x *ListPostsResponse) GetTotal() uint64
func (*ListPostsResponse) ProtoMessage ¶
func (*ListPostsResponse) ProtoMessage()
func (*ListPostsResponse) ProtoReflect ¶
func (x *ListPostsResponse) ProtoReflect() protoreflect.Message
func (*ListPostsResponse) Reset ¶
func (x *ListPostsResponse) Reset()
func (*ListPostsResponse) String ¶
func (x *ListPostsResponse) String() string
type Post ¶
type Post struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` UserId uint64 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` CommentsCount uint32 `protobuf:"varint,5,opt,name=comments_count,json=commentsCount,proto3" json:"comments_count,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` User *User `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) GetCommentsCount ¶
func (*Post) GetContent ¶
func (*Post) GetCreatedAt ¶
func (x *Post) GetCreatedAt() *timestamppb.Timestamp
func (*Post) GetUpdatedAt ¶
func (x *Post) GetUpdatedAt() *timestamppb.Timestamp
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type SignInRequest ¶
type SignInRequest struct { // Types that are assignable to Request: // // *SignInRequest_Username // *SignInRequest_Email Request isSignInRequest_Request `protobuf_oneof:"request"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SignInRequest) Descriptor
deprecated
func (*SignInRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
func (*SignInRequest) GetEmail ¶
func (x *SignInRequest) GetEmail() string
func (*SignInRequest) GetPassword ¶
func (x *SignInRequest) GetPassword() string
func (*SignInRequest) GetRequest ¶
func (m *SignInRequest) GetRequest() isSignInRequest_Request
func (*SignInRequest) GetUsername ¶
func (x *SignInRequest) GetUsername() string
func (*SignInRequest) ProtoMessage ¶
func (*SignInRequest) ProtoMessage()
func (*SignInRequest) ProtoReflect ¶
func (x *SignInRequest) ProtoReflect() protoreflect.Message
func (*SignInRequest) Reset ¶
func (x *SignInRequest) Reset()
func (*SignInRequest) String ¶
func (x *SignInRequest) String() string
type SignInRequest_Email ¶
type SignInRequest_Email struct {
Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"`
}
type SignInRequest_Username ¶
type SignInRequest_Username struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3,oneof"`
}
type SignInResponse ¶
type SignInResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*SignInResponse) Descriptor
deprecated
func (*SignInResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.
func (*SignInResponse) GetToken ¶
func (x *SignInResponse) GetToken() string
func (*SignInResponse) ProtoMessage ¶
func (*SignInResponse) ProtoMessage()
func (*SignInResponse) ProtoReflect ¶
func (x *SignInResponse) ProtoReflect() protoreflect.Message
func (*SignInResponse) Reset ¶
func (x *SignInResponse) Reset()
func (*SignInResponse) String ¶
func (x *SignInResponse) String() string
type SignUpRequest ¶
type SignUpRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SignUpRequest) Descriptor
deprecated
func (*SignUpRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
func (*SignUpRequest) GetEmail ¶
func (x *SignUpRequest) GetEmail() string
func (*SignUpRequest) GetPassword ¶
func (x *SignUpRequest) GetPassword() string
func (*SignUpRequest) GetUsername ¶
func (x *SignUpRequest) GetUsername() string
func (*SignUpRequest) ProtoMessage ¶
func (*SignUpRequest) ProtoMessage()
func (*SignUpRequest) ProtoReflect ¶
func (x *SignUpRequest) ProtoReflect() protoreflect.Message
func (*SignUpRequest) Reset ¶
func (x *SignUpRequest) Reset()
func (*SignUpRequest) String ¶
func (x *SignUpRequest) String() string
type SignUpResponse ¶
type SignUpResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*SignUpResponse) Descriptor
deprecated
func (*SignUpResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.
func (*SignUpResponse) GetToken ¶
func (x *SignUpResponse) GetToken() string
func (*SignUpResponse) ProtoMessage ¶
func (*SignUpResponse) ProtoMessage()
func (*SignUpResponse) ProtoReflect ¶
func (x *SignUpResponse) ProtoReflect() protoreflect.Message
func (*SignUpResponse) Reset ¶
func (x *SignUpResponse) Reset()
func (*SignUpResponse) String ¶
func (x *SignUpResponse) String() string
type UnimplementedBlogServiceServer ¶
type UnimplementedBlogServiceServer struct { }
UnimplementedBlogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlogServiceServer) CreateComment ¶
func (UnimplementedBlogServiceServer) CreateComment(context.Context, *CreateCommentRequest) (*CreateCommentResponse, error)
func (UnimplementedBlogServiceServer) CreatePost ¶
func (UnimplementedBlogServiceServer) CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error)
func (UnimplementedBlogServiceServer) DeleteComment ¶
func (UnimplementedBlogServiceServer) DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error)
func (UnimplementedBlogServiceServer) DeletePost ¶
func (UnimplementedBlogServiceServer) DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error)
func (UnimplementedBlogServiceServer) GetPost ¶
func (UnimplementedBlogServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
func (UnimplementedBlogServiceServer) ListCommentsByPostID ¶
func (UnimplementedBlogServiceServer) ListCommentsByPostID(context.Context, *ListCommentsByPostIDRequest) (*ListCommentsByPostIDResponse, error)
func (UnimplementedBlogServiceServer) ListPosts ¶
func (UnimplementedBlogServiceServer) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error)
func (UnimplementedBlogServiceServer) SignIn ¶
func (UnimplementedBlogServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
func (UnimplementedBlogServiceServer) SignUp ¶
func (UnimplementedBlogServiceServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
func (UnimplementedBlogServiceServer) UpdateComment ¶
func (UnimplementedBlogServiceServer) UpdateComment(context.Context, *UpdateCommentRequest) (*UpdateCommentResponse, error)
func (UnimplementedBlogServiceServer) UpdatePost ¶
func (UnimplementedBlogServiceServer) UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error)
type UnsafeBlogServiceServer ¶
type UnsafeBlogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBlogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlogServiceServer will result in compilation errors.
type UpdateCommentRequest ¶
type UpdateCommentRequest struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*UpdateCommentRequest) Descriptor
deprecated
func (*UpdateCommentRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCommentRequest.ProtoReflect.Descriptor instead.
func (*UpdateCommentRequest) GetComment ¶
func (x *UpdateCommentRequest) GetComment() *Comment
func (*UpdateCommentRequest) ProtoMessage ¶
func (*UpdateCommentRequest) ProtoMessage()
func (*UpdateCommentRequest) ProtoReflect ¶
func (x *UpdateCommentRequest) ProtoReflect() protoreflect.Message
func (*UpdateCommentRequest) Reset ¶
func (x *UpdateCommentRequest) Reset()
func (*UpdateCommentRequest) String ¶
func (x *UpdateCommentRequest) String() string
type UpdateCommentResponse ¶
type UpdateCommentResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UpdateCommentResponse) Descriptor
deprecated
func (*UpdateCommentResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCommentResponse.ProtoReflect.Descriptor instead.
func (*UpdateCommentResponse) GetSuccess ¶
func (x *UpdateCommentResponse) GetSuccess() bool
func (*UpdateCommentResponse) ProtoMessage ¶
func (*UpdateCommentResponse) ProtoMessage()
func (*UpdateCommentResponse) ProtoReflect ¶
func (x *UpdateCommentResponse) ProtoReflect() protoreflect.Message
func (*UpdateCommentResponse) Reset ¶
func (x *UpdateCommentResponse) Reset()
func (*UpdateCommentResponse) String ¶
func (x *UpdateCommentResponse) String() string
type UpdatePostRequest ¶
type UpdatePostRequest struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*UpdatePostRequest) Descriptor
deprecated
func (*UpdatePostRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.
func (*UpdatePostRequest) GetPost ¶
func (x *UpdatePostRequest) GetPost() *Post
func (*UpdatePostRequest) ProtoMessage ¶
func (*UpdatePostRequest) ProtoMessage()
func (*UpdatePostRequest) ProtoReflect ¶
func (x *UpdatePostRequest) ProtoReflect() protoreflect.Message
func (*UpdatePostRequest) Reset ¶
func (x *UpdatePostRequest) Reset()
func (*UpdatePostRequest) String ¶
func (x *UpdatePostRequest) String() string
type UpdatePostResponse ¶
type UpdatePostResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UpdatePostResponse) Descriptor
deprecated
func (*UpdatePostResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePostResponse.ProtoReflect.Descriptor instead.
func (*UpdatePostResponse) GetSuccess ¶
func (x *UpdatePostResponse) GetSuccess() bool
func (*UpdatePostResponse) ProtoMessage ¶
func (*UpdatePostResponse) ProtoMessage()
func (*UpdatePostResponse) ProtoReflect ¶
func (x *UpdatePostResponse) ProtoReflect() protoreflect.Message
func (*UpdatePostResponse) Reset ¶
func (x *UpdatePostResponse) Reset()
func (*UpdatePostResponse) String ¶
func (x *UpdatePostResponse) String() string
type User ¶
type User struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message