Documentation ¶
Index ¶
- Variables
- func RegisterPostStorageServer(s *grpc.Server, srv PostStorageServer)
- type AddPostRequest
- type AddPostResponse
- type GetAllPostsRequest
- type GetAllPostsResponse
- func (*GetAllPostsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllPostsResponse) GetPosts() []*Post
- func (*GetAllPostsResponse) ProtoMessage()
- func (x *GetAllPostsResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllPostsResponse) Reset()
- func (x *GetAllPostsResponse) String() string
- type Post
- type PostStorageClient
- type PostStorageServer
- type UnimplementedPostStorageServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_post_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPostStorageServer ¶
func RegisterPostStorageServer(s *grpc.Server, srv PostStorageServer)
Types ¶
type AddPostRequest ¶
type AddPostRequest struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*AddPostRequest) Descriptor
deprecated
func (*AddPostRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddPostRequest.ProtoReflect.Descriptor instead.
func (*AddPostRequest) GetPost ¶
func (x *AddPostRequest) GetPost() *Post
func (*AddPostRequest) ProtoMessage ¶
func (*AddPostRequest) ProtoMessage()
func (*AddPostRequest) ProtoReflect ¶
func (x *AddPostRequest) ProtoReflect() protoreflect.Message
func (*AddPostRequest) Reset ¶
func (x *AddPostRequest) Reset()
func (*AddPostRequest) String ¶
func (x *AddPostRequest) String() string
type AddPostResponse ¶
type AddPostResponse struct {
// contains filtered or unexported fields
}
func (*AddPostResponse) Descriptor
deprecated
func (*AddPostResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddPostResponse.ProtoReflect.Descriptor instead.
func (*AddPostResponse) ProtoMessage ¶
func (*AddPostResponse) ProtoMessage()
func (*AddPostResponse) ProtoReflect ¶
func (x *AddPostResponse) ProtoReflect() protoreflect.Message
func (*AddPostResponse) Reset ¶
func (x *AddPostResponse) Reset()
func (*AddPostResponse) String ¶
func (x *AddPostResponse) String() string
type GetAllPostsRequest ¶
type GetAllPostsRequest struct {
// contains filtered or unexported fields
}
func (*GetAllPostsRequest) Descriptor
deprecated
func (*GetAllPostsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllPostsRequest.ProtoReflect.Descriptor instead.
func (*GetAllPostsRequest) ProtoMessage ¶
func (*GetAllPostsRequest) ProtoMessage()
func (*GetAllPostsRequest) ProtoReflect ¶
func (x *GetAllPostsRequest) ProtoReflect() protoreflect.Message
func (*GetAllPostsRequest) Reset ¶
func (x *GetAllPostsRequest) Reset()
func (*GetAllPostsRequest) String ¶
func (x *GetAllPostsRequest) String() string
type GetAllPostsResponse ¶
type GetAllPostsResponse struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` // contains filtered or unexported fields }
func (*GetAllPostsResponse) Descriptor
deprecated
func (*GetAllPostsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllPostsResponse.ProtoReflect.Descriptor instead.
func (*GetAllPostsResponse) GetPosts ¶
func (x *GetAllPostsResponse) GetPosts() []*Post
func (*GetAllPostsResponse) ProtoMessage ¶
func (*GetAllPostsResponse) ProtoMessage()
func (*GetAllPostsResponse) ProtoReflect ¶
func (x *GetAllPostsResponse) ProtoReflect() protoreflect.Message
func (*GetAllPostsResponse) Reset ¶
func (x *GetAllPostsResponse) Reset()
func (*GetAllPostsResponse) String ¶
func (x *GetAllPostsResponse) String() string
type Post ¶
type Post struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type PostStorageClient ¶
type PostStorageClient interface { GetAllPosts(ctx context.Context, in *GetAllPostsRequest, opts ...grpc.CallOption) (*GetAllPostsResponse, error) AddPost(ctx context.Context, in *AddPostRequest, opts ...grpc.CallOption) (*AddPostResponse, error) }
PostStorageClient is the client API for PostStorage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPostStorageClient ¶
func NewPostStorageClient(cc grpc.ClientConnInterface) PostStorageClient
type PostStorageServer ¶
type PostStorageServer interface { GetAllPosts(context.Context, *GetAllPostsRequest) (*GetAllPostsResponse, error) AddPost(context.Context, *AddPostRequest) (*AddPostResponse, error) }
PostStorageServer is the server API for PostStorage service.
type UnimplementedPostStorageServer ¶
type UnimplementedPostStorageServer struct { }
UnimplementedPostStorageServer can be embedded to have forward compatible implementations.
func (*UnimplementedPostStorageServer) AddPost ¶
func (*UnimplementedPostStorageServer) AddPost(context.Context, *AddPostRequest) (*AddPostResponse, error)
func (*UnimplementedPostStorageServer) GetAllPosts ¶
func (*UnimplementedPostStorageServer) GetAllPosts(context.Context, *GetAllPostsRequest) (*GetAllPostsResponse, error)
Click to show internal directories.
Click to hide internal directories.