books

package
v0.0.0-...-3122a37 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package books is a generated protocol buffer package.

It is generated from these files:

books.proto

It has these top-level messages:

Empty
Book
BookList
BookIdRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBookServiceServer

func RegisterBookServiceServer(s *grpc.Server, srv BookServiceServer)

Types

type Book

type Book struct {
	Id     int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Title  string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	Author string `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"`
}

func (*Book) Descriptor

func (*Book) Descriptor() ([]byte, []int)

func (*Book) ProtoMessage

func (*Book) ProtoMessage()

func (*Book) Reset

func (m *Book) Reset()

func (*Book) String

func (m *Book) String() string

type BookIdRequest

type BookIdRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}

func (*BookIdRequest) Descriptor

func (*BookIdRequest) Descriptor() ([]byte, []int)

func (*BookIdRequest) ProtoMessage

func (*BookIdRequest) ProtoMessage()

func (*BookIdRequest) Reset

func (m *BookIdRequest) Reset()

func (*BookIdRequest) String

func (m *BookIdRequest) String() string

type BookList

type BookList struct {
	Books []*Book `protobuf:"bytes,1,rep,name=books" json:"books,omitempty"`
}

func (*BookList) Descriptor

func (*BookList) Descriptor() ([]byte, []int)

func (*BookList) GetBooks

func (m *BookList) GetBooks() []*Book

func (*BookList) ProtoMessage

func (*BookList) ProtoMessage()

func (*BookList) Reset

func (m *BookList) Reset()

func (*BookList) String

func (m *BookList) String() string

type BookServiceClient

type BookServiceClient interface {
	List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BookList, error)
	Insert(ctx context.Context, in *Book, opts ...grpc.CallOption) (*Empty, error)
	Get(ctx context.Context, in *BookIdRequest, opts ...grpc.CallOption) (*Book, error)
	Delete(ctx context.Context, in *BookIdRequest, opts ...grpc.CallOption) (*Empty, error)
	Watch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (BookService_WatchClient, error)
}

func NewBookServiceClient

func NewBookServiceClient(cc *grpc.ClientConn) BookServiceClient

type BookServiceServer

type BookServiceServer interface {
	List(context.Context, *Empty) (*BookList, error)
	Insert(context.Context, *Book) (*Empty, error)
	Get(context.Context, *BookIdRequest) (*Book, error)
	Delete(context.Context, *BookIdRequest) (*Empty, error)
	Watch(*Empty, BookService_WatchServer) error
}

type BookService_WatchClient

type BookService_WatchClient interface {
	Recv() (*Book, error)
	grpc.ClientStream
}

type BookService_WatchServer

type BookService_WatchServer interface {
	Send(*Book) error
	grpc.ServerStream
}

type Empty

type Empty struct {
}

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

Jump to

Keyboard shortcuts

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