Documentation ¶
Overview ¶
Package posts is a generated protocol buffer package.
It is generated from these files:
posts/posts.proto
It has these top-level messages:
Post GetAllPostsRequest GetAllPostsResponse GetPostRequest GetPostResponse CreatePostRequest CreatePostResponse UpdatePostRequest UpdatePostResponse DeletePostRequest DeletePostResponse
Index ¶
- func RegisterPostsServer(s *grpc.Server, srv PostsServer)
- type CreatePostRequest
- func (*CreatePostRequest) Descriptor() ([]byte, []int)
- func (m *CreatePostRequest) GetContent() string
- func (m *CreatePostRequest) GetTitle() string
- func (m *CreatePostRequest) GetUserId() uint32
- func (*CreatePostRequest) ProtoMessage()
- func (m *CreatePostRequest) Reset()
- func (m *CreatePostRequest) String() string
- type CreatePostResponse
- type DeletePostRequest
- type DeletePostResponse
- type GetAllPostsRequest
- type GetAllPostsResponse
- type GetPostRequest
- type GetPostResponse
- type Post
- type PostsClient
- type PostsServer
- type UpdatePostRequest
- type UpdatePostResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPostsServer ¶
func RegisterPostsServer(s *grpc.Server, srv PostsServer)
Types ¶
type CreatePostRequest ¶
type CreatePostRequest struct { UserId uint32 `protobuf:"varint,1,opt,name=userId" json:"userId,omitempty"` Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"` Content string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` }
func (*CreatePostRequest) Descriptor ¶
func (*CreatePostRequest) Descriptor() ([]byte, []int)
func (*CreatePostRequest) GetContent ¶
func (m *CreatePostRequest) GetContent() string
func (*CreatePostRequest) GetTitle ¶
func (m *CreatePostRequest) GetTitle() string
func (*CreatePostRequest) GetUserId ¶
func (m *CreatePostRequest) GetUserId() uint32
func (*CreatePostRequest) ProtoMessage ¶
func (*CreatePostRequest) ProtoMessage()
func (*CreatePostRequest) Reset ¶
func (m *CreatePostRequest) Reset()
func (*CreatePostRequest) String ¶
func (m *CreatePostRequest) String() string
type CreatePostResponse ¶
type CreatePostResponse struct {
Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}
func (*CreatePostResponse) Descriptor ¶
func (*CreatePostResponse) Descriptor() ([]byte, []int)
func (*CreatePostResponse) GetOk ¶
func (m *CreatePostResponse) GetOk() bool
func (*CreatePostResponse) ProtoMessage ¶
func (*CreatePostResponse) ProtoMessage()
func (*CreatePostResponse) Reset ¶
func (m *CreatePostResponse) Reset()
func (*CreatePostResponse) String ¶
func (m *CreatePostResponse) String() string
type DeletePostRequest ¶
type DeletePostRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*DeletePostRequest) Descriptor ¶
func (*DeletePostRequest) Descriptor() ([]byte, []int)
func (*DeletePostRequest) GetId ¶
func (m *DeletePostRequest) GetId() uint32
func (*DeletePostRequest) ProtoMessage ¶
func (*DeletePostRequest) ProtoMessage()
func (*DeletePostRequest) Reset ¶
func (m *DeletePostRequest) Reset()
func (*DeletePostRequest) String ¶
func (m *DeletePostRequest) String() string
type DeletePostResponse ¶
type DeletePostResponse struct {
Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}
func (*DeletePostResponse) Descriptor ¶
func (*DeletePostResponse) Descriptor() ([]byte, []int)
func (*DeletePostResponse) GetOk ¶
func (m *DeletePostResponse) GetOk() bool
func (*DeletePostResponse) ProtoMessage ¶
func (*DeletePostResponse) ProtoMessage()
func (*DeletePostResponse) Reset ¶
func (m *DeletePostResponse) Reset()
func (*DeletePostResponse) String ¶
func (m *DeletePostResponse) String() string
type GetAllPostsRequest ¶
type GetAllPostsRequest struct { }
func (*GetAllPostsRequest) Descriptor ¶
func (*GetAllPostsRequest) Descriptor() ([]byte, []int)
func (*GetAllPostsRequest) ProtoMessage ¶
func (*GetAllPostsRequest) ProtoMessage()
func (*GetAllPostsRequest) Reset ¶
func (m *GetAllPostsRequest) Reset()
func (*GetAllPostsRequest) String ¶
func (m *GetAllPostsRequest) String() string
type GetAllPostsResponse ¶
type GetAllPostsResponse struct {
Posts []*Post `protobuf:"bytes,1,rep,name=posts" json:"posts,omitempty"`
}
func (*GetAllPostsResponse) Descriptor ¶
func (*GetAllPostsResponse) Descriptor() ([]byte, []int)
func (*GetAllPostsResponse) GetPosts ¶
func (m *GetAllPostsResponse) GetPosts() []*Post
func (*GetAllPostsResponse) ProtoMessage ¶
func (*GetAllPostsResponse) ProtoMessage()
func (*GetAllPostsResponse) Reset ¶
func (m *GetAllPostsResponse) Reset()
func (*GetAllPostsResponse) String ¶
func (m *GetAllPostsResponse) String() string
type GetPostRequest ¶
type GetPostRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*GetPostRequest) Descriptor ¶
func (*GetPostRequest) Descriptor() ([]byte, []int)
func (*GetPostRequest) GetId ¶
func (m *GetPostRequest) GetId() uint32
func (*GetPostRequest) ProtoMessage ¶
func (*GetPostRequest) ProtoMessage()
func (*GetPostRequest) Reset ¶
func (m *GetPostRequest) Reset()
func (*GetPostRequest) String ¶
func (m *GetPostRequest) String() string
type GetPostResponse ¶
type GetPostResponse struct {
Post *Post `protobuf:"bytes,1,opt,name=post" json:"post,omitempty"`
}
func (*GetPostResponse) Descriptor ¶
func (*GetPostResponse) Descriptor() ([]byte, []int)
func (*GetPostResponse) GetPost ¶
func (m *GetPostResponse) GetPost() *Post
func (*GetPostResponse) ProtoMessage ¶
func (*GetPostResponse) ProtoMessage()
func (*GetPostResponse) Reset ¶
func (m *GetPostResponse) Reset()
func (*GetPostResponse) String ¶
func (m *GetPostResponse) String() string
type Post ¶
type Post struct { Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` UserId uint32 `protobuf:"varint,2,opt,name=userId" json:"userId,omitempty"` Title string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"` Content string `protobuf:"bytes,4,opt,name=content" json:"content,omitempty"` }
func (*Post) Descriptor ¶
func (*Post) GetContent ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
type PostsClient ¶
type PostsClient interface { GetAllPosts(ctx context.Context, in *GetAllPostsRequest, opts ...grpc.CallOption) (*GetAllPostsResponse, error) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error) UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*UpdatePostResponse, error) DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error) }
func NewPostsClient ¶
func NewPostsClient(cc *grpc.ClientConn) PostsClient
type PostsServer ¶
type PostsServer interface { GetAllPosts(context.Context, *GetAllPostsRequest) (*GetAllPostsResponse, error) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error) UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error) DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error) }
type UpdatePostRequest ¶
type UpdatePostRequest struct {
Post *Post `protobuf:"bytes,1,opt,name=post" json:"post,omitempty"`
}
func (*UpdatePostRequest) Descriptor ¶
func (*UpdatePostRequest) Descriptor() ([]byte, []int)
func (*UpdatePostRequest) GetPost ¶
func (m *UpdatePostRequest) GetPost() *Post
func (*UpdatePostRequest) ProtoMessage ¶
func (*UpdatePostRequest) ProtoMessage()
func (*UpdatePostRequest) Reset ¶
func (m *UpdatePostRequest) Reset()
func (*UpdatePostRequest) String ¶
func (m *UpdatePostRequest) String() string
type UpdatePostResponse ¶
type UpdatePostResponse struct {
Post *Post `protobuf:"bytes,1,opt,name=post" json:"post,omitempty"`
}
func (*UpdatePostResponse) Descriptor ¶
func (*UpdatePostResponse) Descriptor() ([]byte, []int)
func (*UpdatePostResponse) GetPost ¶
func (m *UpdatePostResponse) GetPost() *Post
func (*UpdatePostResponse) ProtoMessage ¶
func (*UpdatePostResponse) ProtoMessage()
func (*UpdatePostResponse) Reset ¶
func (m *UpdatePostResponse) Reset()
func (*UpdatePostResponse) String ¶
func (m *UpdatePostResponse) String() string
Click to show internal directories.
Click to hide internal directories.