Documentation ¶
Index ¶
- func RegisterPostsServer(s *grpc.Server, srv PostsServer)
- type Category
- func (*Category) Descriptor() ([]byte, []int)
- func (m *Category) GetId() int32
- func (m *Category) GetTitle() string
- func (*Category) ProtoMessage()
- func (m *Category) Reset()
- func (m *Category) String() string
- func (m *Category) XXX_DiscardUnknown()
- func (m *Category) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Category) XXX_Merge(src proto.Message)
- func (m *Category) XXX_Size() int
- func (m *Category) XXX_Unmarshal(b []byte) error
- type CategoryRequest
- func (*CategoryRequest) Descriptor() ([]byte, []int)
- func (*CategoryRequest) ProtoMessage()
- func (m *CategoryRequest) Reset()
- func (m *CategoryRequest) String() string
- func (m *CategoryRequest) XXX_DiscardUnknown()
- func (m *CategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CategoryRequest) XXX_Merge(src proto.Message)
- func (m *CategoryRequest) XXX_Size() int
- func (m *CategoryRequest) XXX_Unmarshal(b []byte) error
- type CategoryResponse
- func (*CategoryResponse) Descriptor() ([]byte, []int)
- func (m *CategoryResponse) GetCategories() []*Category
- func (m *CategoryResponse) GetResult() bool
- func (*CategoryResponse) ProtoMessage()
- func (m *CategoryResponse) Reset()
- func (m *CategoryResponse) String() string
- func (m *CategoryResponse) XXX_DiscardUnknown()
- func (m *CategoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CategoryResponse) XXX_Merge(src proto.Message)
- func (m *CategoryResponse) XXX_Size() int
- func (m *CategoryResponse) XXX_Unmarshal(b []byte) error
- type Post
- func (*Post) Descriptor() ([]byte, []int)
- func (m *Post) GetCategory() int32
- func (m *Post) GetCreated() string
- func (m *Post) GetId() int32
- func (m *Post) GetText() 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 PostRequest
- func (*PostRequest) Descriptor() ([]byte, []int)
- func (m *PostRequest) GetCategory() int32
- func (*PostRequest) ProtoMessage()
- func (m *PostRequest) Reset()
- func (m *PostRequest) String() string
- func (m *PostRequest) XXX_DiscardUnknown()
- func (m *PostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostRequest) XXX_Merge(src proto.Message)
- func (m *PostRequest) XXX_Size() int
- func (m *PostRequest) XXX_Unmarshal(b []byte) error
- type PostResponse
- func (*PostResponse) Descriptor() ([]byte, []int)
- func (m *PostResponse) GetPosts() []*Post
- func (m *PostResponse) GetResult() bool
- func (*PostResponse) ProtoMessage()
- func (m *PostResponse) Reset()
- func (m *PostResponse) String() string
- func (m *PostResponse) XXX_DiscardUnknown()
- func (m *PostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostResponse) XXX_Merge(src proto.Message)
- func (m *PostResponse) XXX_Size() int
- func (m *PostResponse) XXX_Unmarshal(b []byte) error
- type PostsClient
- type PostsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPostsServer ¶
func RegisterPostsServer(s *grpc.Server, srv PostsServer)
Types ¶
type Category ¶
type Category struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Category) Descriptor ¶
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) XXX_DiscardUnknown ¶
func (m *Category) XXX_DiscardUnknown()
func (*Category) XXX_Marshal ¶
func (*Category) XXX_Unmarshal ¶
type CategoryRequest ¶
type CategoryRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CategoryRequest) Descriptor ¶
func (*CategoryRequest) Descriptor() ([]byte, []int)
func (*CategoryRequest) ProtoMessage ¶
func (*CategoryRequest) ProtoMessage()
func (*CategoryRequest) Reset ¶
func (m *CategoryRequest) Reset()
func (*CategoryRequest) String ¶
func (m *CategoryRequest) String() string
func (*CategoryRequest) XXX_DiscardUnknown ¶
func (m *CategoryRequest) XXX_DiscardUnknown()
func (*CategoryRequest) XXX_Marshal ¶
func (m *CategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CategoryRequest) XXX_Merge ¶
func (m *CategoryRequest) XXX_Merge(src proto.Message)
func (*CategoryRequest) XXX_Size ¶
func (m *CategoryRequest) XXX_Size() int
func (*CategoryRequest) XXX_Unmarshal ¶
func (m *CategoryRequest) XXX_Unmarshal(b []byte) error
type CategoryResponse ¶
type CategoryResponse struct { Categories []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` Result bool `protobuf:"varint,2,opt,name=Result,proto3" json:"Result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CategoryResponse) Descriptor ¶
func (*CategoryResponse) Descriptor() ([]byte, []int)
func (*CategoryResponse) GetCategories ¶
func (m *CategoryResponse) GetCategories() []*Category
func (*CategoryResponse) GetResult ¶
func (m *CategoryResponse) GetResult() bool
func (*CategoryResponse) ProtoMessage ¶
func (*CategoryResponse) ProtoMessage()
func (*CategoryResponse) Reset ¶
func (m *CategoryResponse) Reset()
func (*CategoryResponse) String ¶
func (m *CategoryResponse) String() string
func (*CategoryResponse) XXX_DiscardUnknown ¶
func (m *CategoryResponse) XXX_DiscardUnknown()
func (*CategoryResponse) XXX_Marshal ¶
func (m *CategoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CategoryResponse) XXX_Merge ¶
func (m *CategoryResponse) XXX_Merge(src proto.Message)
func (*CategoryResponse) XXX_Size ¶
func (m *CategoryResponse) XXX_Size() int
func (*CategoryResponse) XXX_Unmarshal ¶
func (m *CategoryResponse) XXX_Unmarshal(b []byte) error
type Post ¶
type Post struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` Category int32 `protobuf:"varint,4,opt,name=category,proto3" json:"category,omitempty"` Created string `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Post) Descriptor ¶
func (*Post) GetCategory ¶
func (*Post) GetCreated ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) XXX_DiscardUnknown ¶
func (m *Post) XXX_DiscardUnknown()
func (*Post) XXX_Unmarshal ¶
type PostRequest ¶
type PostRequest struct { Category int32 `protobuf:"varint,1,opt,name=Category,proto3" json:"Category,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostRequest) Descriptor ¶
func (*PostRequest) Descriptor() ([]byte, []int)
func (*PostRequest) GetCategory ¶
func (m *PostRequest) GetCategory() int32
func (*PostRequest) ProtoMessage ¶
func (*PostRequest) ProtoMessage()
func (*PostRequest) Reset ¶
func (m *PostRequest) Reset()
func (*PostRequest) String ¶
func (m *PostRequest) String() string
func (*PostRequest) XXX_DiscardUnknown ¶
func (m *PostRequest) XXX_DiscardUnknown()
func (*PostRequest) XXX_Marshal ¶
func (m *PostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PostRequest) XXX_Merge ¶
func (m *PostRequest) XXX_Merge(src proto.Message)
func (*PostRequest) XXX_Size ¶
func (m *PostRequest) XXX_Size() int
func (*PostRequest) XXX_Unmarshal ¶
func (m *PostRequest) XXX_Unmarshal(b []byte) error
type PostResponse ¶
type PostResponse struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Result bool `protobuf:"varint,2,opt,name=Result,proto3" json:"Result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostResponse) Descriptor ¶
func (*PostResponse) Descriptor() ([]byte, []int)
func (*PostResponse) GetPosts ¶
func (m *PostResponse) GetPosts() []*Post
func (*PostResponse) GetResult ¶
func (m *PostResponse) GetResult() bool
func (*PostResponse) ProtoMessage ¶
func (*PostResponse) ProtoMessage()
func (*PostResponse) Reset ¶
func (m *PostResponse) Reset()
func (*PostResponse) String ¶
func (m *PostResponse) String() string
func (*PostResponse) XXX_DiscardUnknown ¶
func (m *PostResponse) XXX_DiscardUnknown()
func (*PostResponse) XXX_Marshal ¶
func (m *PostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PostResponse) XXX_Merge ¶
func (m *PostResponse) XXX_Merge(src proto.Message)
func (*PostResponse) XXX_Size ¶
func (m *PostResponse) XXX_Size() int
func (*PostResponse) XXX_Unmarshal ¶
func (m *PostResponse) XXX_Unmarshal(b []byte) error
type PostsClient ¶
type PostsClient interface { GetCategories(ctx context.Context, in *CategoryRequest, opts ...grpc.CallOption) (*CategoryResponse, error) GetPosts(ctx context.Context, in *PostRequest, opts ...grpc.CallOption) (*PostResponse, error) }
PostsClient is the client API for Posts service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPostsClient ¶
func NewPostsClient(cc *grpc.ClientConn) PostsClient
type PostsServer ¶
type PostsServer interface { GetCategories(context.Context, *CategoryRequest) (*CategoryResponse, error) GetPosts(context.Context, *PostRequest) (*PostResponse, error) }
PostsServer is the server API for Posts service.
Click to show internal directories.
Click to hide internal directories.