Documentation ¶
Overview ¶
Package article_grpc is a generated protocol buffer package.
It is generated from these files:
article.proto
It has these top-level messages:
ErrorMessage BatchInsertResponse ListArticle DeleteResponse FetchRequest SingleRequest Article
Index ¶
- func RegisterArticleHandlerServer(s *grpc.Server, srv ArticleHandlerServer)
- type Article
- func (*Article) Descriptor() ([]byte, []int)
- func (m *Article) GetContent() string
- func (m *Article) GetCreatedAt() *google_protobuf.Timestamp
- func (m *Article) GetID() int64
- func (m *Article) GetTitle() string
- func (m *Article) GetUpdatedAt() *google_protobuf.Timestamp
- func (*Article) ProtoMessage()
- func (m *Article) Reset()
- func (m *Article) String() string
- type ArticleHandlerClient
- type ArticleHandlerServer
- type ArticleHandler_BatchInsertClient
- type ArticleHandler_BatchInsertServer
- type ArticleHandler_BatchUpdateClient
- type ArticleHandler_BatchUpdateServer
- type ArticleHandler_FetchArticleClient
- type ArticleHandler_FetchArticleServer
- type BatchInsertResponse
- type DeleteResponse
- type ErrorMessage
- type FetchRequest
- type ListArticle
- type SingleRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterArticleHandlerServer ¶
func RegisterArticleHandlerServer(s *grpc.Server, srv ArticleHandlerServer)
Types ¶
type Article ¶
type Article struct { ID int64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` Title string `protobuf:"bytes,2,opt,name=Title" json:"Title,omitempty"` Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` UpdatedAt *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=UpdatedAt" json:"UpdatedAt,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=CreatedAt" json:"CreatedAt,omitempty"` }
func (*Article) Descriptor ¶
func (*Article) GetContent ¶
func (*Article) GetCreatedAt ¶
func (m *Article) GetCreatedAt() *google_protobuf.Timestamp
func (*Article) GetUpdatedAt ¶
func (m *Article) GetUpdatedAt() *google_protobuf.Timestamp
func (*Article) ProtoMessage ¶
func (*Article) ProtoMessage()
type ArticleHandlerClient ¶
type ArticleHandlerClient interface { GetArticle(ctx context.Context, in *SingleRequest, opts ...grpc.CallOption) (*Article, error) FetchArticle(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (ArticleHandler_FetchArticleClient, error) BatchInsert(ctx context.Context, opts ...grpc.CallOption) (ArticleHandler_BatchInsertClient, error) BatchUpdate(ctx context.Context, opts ...grpc.CallOption) (ArticleHandler_BatchUpdateClient, error) GetListArticle(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListArticle, error) UpdateArticle(ctx context.Context, in *Article, opts ...grpc.CallOption) (*Article, error) Delete(ctx context.Context, in *SingleRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Store(ctx context.Context, in *Article, opts ...grpc.CallOption) (*Article, error) }
func NewArticleHandlerClient ¶
func NewArticleHandlerClient(cc *grpc.ClientConn) ArticleHandlerClient
type ArticleHandlerServer ¶
type ArticleHandlerServer interface { GetArticle(context.Context, *SingleRequest) (*Article, error) FetchArticle(*FetchRequest, ArticleHandler_FetchArticleServer) error BatchInsert(ArticleHandler_BatchInsertServer) error BatchUpdate(ArticleHandler_BatchUpdateServer) error GetListArticle(context.Context, *FetchRequest) (*ListArticle, error) UpdateArticle(context.Context, *Article) (*Article, error) Delete(context.Context, *SingleRequest) (*DeleteResponse, error) Store(context.Context, *Article) (*Article, error) }
type ArticleHandler_BatchInsertClient ¶
type ArticleHandler_BatchInsertClient interface { Send(*Article) error CloseAndRecv() (*BatchInsertResponse, error) grpc.ClientStream }
type ArticleHandler_BatchInsertServer ¶
type ArticleHandler_BatchInsertServer interface { SendAndClose(*BatchInsertResponse) error Recv() (*Article, error) grpc.ServerStream }
type ArticleHandler_FetchArticleClient ¶
type ArticleHandler_FetchArticleClient interface { Recv() (*Article, error) grpc.ClientStream }
type ArticleHandler_FetchArticleServer ¶
type ArticleHandler_FetchArticleServer interface { Send(*Article) error grpc.ServerStream }
type BatchInsertResponse ¶
type BatchInsertResponse struct { TotalSuccess int64 `protobuf:"varint,1,opt,name=TotalSuccess" json:"TotalSuccess,omitempty"` Errors []*ErrorMessage `protobuf:"bytes,2,rep,name=Errors" json:"Errors,omitempty"` }
func (*BatchInsertResponse) Descriptor ¶
func (*BatchInsertResponse) Descriptor() ([]byte, []int)
func (*BatchInsertResponse) GetErrors ¶
func (m *BatchInsertResponse) GetErrors() []*ErrorMessage
func (*BatchInsertResponse) GetTotalSuccess ¶
func (m *BatchInsertResponse) GetTotalSuccess() int64
func (*BatchInsertResponse) ProtoMessage ¶
func (*BatchInsertResponse) ProtoMessage()
func (*BatchInsertResponse) Reset ¶
func (m *BatchInsertResponse) Reset()
func (*BatchInsertResponse) String ¶
func (m *BatchInsertResponse) String() string
type DeleteResponse ¶
type DeleteResponse struct { Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code" json:"code,omitempty"` }
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) GetCode ¶
func (m *DeleteResponse) GetCode() int32
func (*DeleteResponse) GetStatus ¶
func (m *DeleteResponse) GetStatus() string
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
type ErrorMessage ¶
type ErrorMessage struct {
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*ErrorMessage) Descriptor ¶
func (*ErrorMessage) Descriptor() ([]byte, []int)
func (*ErrorMessage) GetMessage ¶
func (m *ErrorMessage) GetMessage() string
func (*ErrorMessage) ProtoMessage ¶
func (*ErrorMessage) ProtoMessage()
func (*ErrorMessage) Reset ¶
func (m *ErrorMessage) Reset()
func (*ErrorMessage) String ¶
func (m *ErrorMessage) String() string
type FetchRequest ¶
type FetchRequest struct { Num int64 `protobuf:"varint,1,opt,name=num" json:"num,omitempty"` Cursor string `protobuf:"bytes,2,opt,name=cursor" json:"cursor,omitempty"` }
func (*FetchRequest) Descriptor ¶
func (*FetchRequest) Descriptor() ([]byte, []int)
func (*FetchRequest) GetCursor ¶
func (m *FetchRequest) GetCursor() string
func (*FetchRequest) GetNum ¶
func (m *FetchRequest) GetNum() int64
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) Reset ¶
func (m *FetchRequest) Reset()
func (*FetchRequest) String ¶
func (m *FetchRequest) String() string
type ListArticle ¶
type ListArticle struct { Artilces []*Article `protobuf:"bytes,1,rep,name=Artilces" json:"Artilces,omitempty"` Cursor string `protobuf:"bytes,2,opt,name=Cursor" json:"Cursor,omitempty"` }
func (*ListArticle) Descriptor ¶
func (*ListArticle) Descriptor() ([]byte, []int)
func (*ListArticle) GetArtilces ¶
func (m *ListArticle) GetArtilces() []*Article
func (*ListArticle) GetCursor ¶
func (m *ListArticle) GetCursor() string
func (*ListArticle) ProtoMessage ¶
func (*ListArticle) ProtoMessage()
func (*ListArticle) Reset ¶
func (m *ListArticle) Reset()
func (*ListArticle) String ¶
func (m *ListArticle) String() string
type SingleRequest ¶
type SingleRequest struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*SingleRequest) Descriptor ¶
func (*SingleRequest) Descriptor() ([]byte, []int)
func (*SingleRequest) GetId ¶
func (m *SingleRequest) GetId() int64
func (*SingleRequest) ProtoMessage ¶
func (*SingleRequest) ProtoMessage()
func (*SingleRequest) Reset ¶
func (m *SingleRequest) Reset()
func (*SingleRequest) String ¶
func (m *SingleRequest) String() string
Click to show internal directories.
Click to hide internal directories.