article_grpc

package
Version: v0.0.0-...-76ef0be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 6 Imported by: 0

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

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) Descriptor() ([]byte, []int)

func (*Article) GetContent

func (m *Article) GetContent() string

func (*Article) GetCreatedAt

func (m *Article) GetCreatedAt() *google_protobuf.Timestamp

func (*Article) GetID

func (m *Article) GetID() int64

func (*Article) GetTitle

func (m *Article) GetTitle() string

func (*Article) GetUpdatedAt

func (m *Article) GetUpdatedAt() *google_protobuf.Timestamp

func (*Article) ProtoMessage

func (*Article) ProtoMessage()

func (*Article) Reset

func (m *Article) Reset()

func (*Article) String

func (m *Article) String() string

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 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_BatchUpdateClient

type ArticleHandler_BatchUpdateClient interface {
	Send(*Article) error
	Recv() (*Article, error)
	grpc.ClientStream
}

type ArticleHandler_BatchUpdateServer

type ArticleHandler_BatchUpdateServer interface {
	Send(*Article) 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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL