Documentation ¶
Index ¶
- func RegisterBlogServer(s *grpc.Server, srv BlogServer)
- type BlogClient
- type BlogServer
- type Post
- func (*Post) Descriptor() ([]byte, []int)
- func (m *Post) GetBody() string
- func (m *Post) GetId() string
- func (m *Post) GetTitle() string
- func (*Post) ProtoMessage()
- func (m *Post) Reset()
- func (m *Post) String() string
- func (m *Post) XXX_DiscardUnknown()
- func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Post) XXX_Merge(src proto.Message)
- func (m *Post) XXX_Size() int
- func (m *Post) XXX_Unmarshal(b []byte) error
- type PostList
- func (*PostList) Descriptor() ([]byte, []int)
- func (m *PostList) GetPosts() []*Post
- func (*PostList) ProtoMessage()
- func (m *PostList) Reset()
- func (m *PostList) String() string
- func (m *PostList) XXX_DiscardUnknown()
- func (m *PostList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostList) XXX_Merge(src proto.Message)
- func (m *PostList) XXX_Size() int
- func (m *PostList) XXX_Unmarshal(b []byte) error
- type PostQuery
- func (*PostQuery) Descriptor() ([]byte, []int)
- func (m *PostQuery) GetId() string
- func (*PostQuery) ProtoMessage()
- func (m *PostQuery) Reset()
- func (m *PostQuery) String() string
- func (m *PostQuery) XXX_DiscardUnknown()
- func (m *PostQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostQuery) XXX_Merge(src proto.Message)
- func (m *PostQuery) XXX_Size() int
- func (m *PostQuery) XXX_Unmarshal(b []byte) error
- type UnimplementedBlogServer
- func (*UnimplementedBlogServer) CreatePost(ctx context.Context, req *Post) (*Post, error)
- func (*UnimplementedBlogServer) DeletePost(ctx context.Context, req *PostQuery) (*empty.Empty, error)
- func (*UnimplementedBlogServer) GetPost(ctx context.Context, req *PostQuery) (*Post, error)
- func (*UnimplementedBlogServer) ListAllPosts(ctx context.Context, req *empty.Empty) (*PostList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBlogServer ¶
func RegisterBlogServer(s *grpc.Server, srv BlogServer)
Types ¶
type BlogClient ¶
type BlogClient interface { ListAllPosts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PostList, error) GetPost(ctx context.Context, in *PostQuery, opts ...grpc.CallOption) (*Post, error) CreatePost(ctx context.Context, in *Post, opts ...grpc.CallOption) (*Post, error) DeletePost(ctx context.Context, in *PostQuery, opts ...grpc.CallOption) (*empty.Empty, error) }
BlogClient is the client API for Blog service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBlogClient ¶
func NewBlogClient(cc *grpc.ClientConn) BlogClient
type BlogServer ¶
type BlogServer interface { ListAllPosts(context.Context, *empty.Empty) (*PostList, error) GetPost(context.Context, *PostQuery) (*Post, error) CreatePost(context.Context, *Post) (*Post, error) DeletePost(context.Context, *PostQuery) (*empty.Empty, error) }
BlogServer is the server API for Blog service.
type Post ¶
type Post struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Post) Descriptor ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) XXX_DiscardUnknown ¶
func (m *Post) XXX_DiscardUnknown()
func (*Post) XXX_Unmarshal ¶
type PostList ¶
type PostList struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostList) Descriptor ¶
func (*PostList) ProtoMessage ¶
func (*PostList) ProtoMessage()
func (*PostList) XXX_DiscardUnknown ¶
func (m *PostList) XXX_DiscardUnknown()
func (*PostList) XXX_Marshal ¶
func (*PostList) XXX_Unmarshal ¶
type PostQuery ¶
type PostQuery struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostQuery) Descriptor ¶
func (*PostQuery) ProtoMessage ¶
func (*PostQuery) ProtoMessage()
func (*PostQuery) XXX_DiscardUnknown ¶
func (m *PostQuery) XXX_DiscardUnknown()
func (*PostQuery) XXX_Marshal ¶
func (*PostQuery) XXX_Unmarshal ¶
type UnimplementedBlogServer ¶
type UnimplementedBlogServer struct { }
UnimplementedBlogServer can be embedded to have forward compatible implementations.
func (*UnimplementedBlogServer) CreatePost ¶
func (*UnimplementedBlogServer) DeletePost ¶
func (*UnimplementedBlogServer) ListAllPosts ¶
Click to show internal directories.
Click to hide internal directories.