|
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: google/example/library/v1/library.proto
-
- package library // import "google.golang.org/genproto/googleapis/example/library/v1"
-
- import proto "github.com/golang/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import empty "github.com/golang/protobuf/ptypes/empty"
- import _ "google.golang.org/genproto/googleapis/api/annotations"
-
- import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
- )
-
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
- // A single book in the library.
- type Book struct {
- // The resource name of the book.
- // Book names have the form `shelves/{shelf_id}/books/{book_id}`.
- // The name is ignored when creating a book.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The name of the book author.
- Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
- // The title of the book.
- Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
- // Value indicating whether the book has been read.
- Read bool `protobuf:"varint,4,opt,name=read,proto3" json:"read,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *Book) Reset() { *m = Book{} }
- func (m *Book) String() string { return proto.CompactTextString(m) }
- func (*Book) ProtoMessage() {}
- func (*Book) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{0}
- }
- func (m *Book) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Book.Unmarshal(m, b)
- }
- func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Book.Marshal(b, m, deterministic)
- }
- func (dst *Book) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Book.Merge(dst, src)
- }
- func (m *Book) XXX_Size() int {
- return xxx_messageInfo_Book.Size(m)
- }
- func (m *Book) XXX_DiscardUnknown() {
- xxx_messageInfo_Book.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_Book proto.InternalMessageInfo
-
- func (m *Book) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *Book) GetAuthor() string {
- if m != nil {
- return m.Author
- }
- return ""
- }
-
- func (m *Book) GetTitle() string {
- if m != nil {
- return m.Title
- }
- return ""
- }
-
- func (m *Book) GetRead() bool {
- if m != nil {
- return m.Read
- }
- return false
- }
-
- // A Shelf contains a collection of books with a theme.
- type Shelf struct {
- // The resource name of the shelf.
- // Shelf names have the form `shelves/{shelf_id}`.
- // The name is ignored when creating a shelf.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The theme of the shelf
- Theme string `protobuf:"bytes,2,opt,name=theme,proto3" json:"theme,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *Shelf) Reset() { *m = Shelf{} }
- func (m *Shelf) String() string { return proto.CompactTextString(m) }
- func (*Shelf) ProtoMessage() {}
- func (*Shelf) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{1}
- }
- func (m *Shelf) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Shelf.Unmarshal(m, b)
- }
- func (m *Shelf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Shelf.Marshal(b, m, deterministic)
- }
- func (dst *Shelf) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Shelf.Merge(dst, src)
- }
- func (m *Shelf) XXX_Size() int {
- return xxx_messageInfo_Shelf.Size(m)
- }
- func (m *Shelf) XXX_DiscardUnknown() {
- xxx_messageInfo_Shelf.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_Shelf proto.InternalMessageInfo
-
- func (m *Shelf) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *Shelf) GetTheme() string {
- if m != nil {
- return m.Theme
- }
- return ""
- }
-
- // Request message for LibraryService.CreateShelf.
- type CreateShelfRequest struct {
- // The shelf to create.
- Shelf *Shelf `protobuf:"bytes,1,opt,name=shelf,proto3" json:"shelf,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *CreateShelfRequest) Reset() { *m = CreateShelfRequest{} }
- func (m *CreateShelfRequest) String() string { return proto.CompactTextString(m) }
- func (*CreateShelfRequest) ProtoMessage() {}
- func (*CreateShelfRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{2}
- }
- func (m *CreateShelfRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CreateShelfRequest.Unmarshal(m, b)
- }
- func (m *CreateShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CreateShelfRequest.Marshal(b, m, deterministic)
- }
- func (dst *CreateShelfRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CreateShelfRequest.Merge(dst, src)
- }
- func (m *CreateShelfRequest) XXX_Size() int {
- return xxx_messageInfo_CreateShelfRequest.Size(m)
- }
- func (m *CreateShelfRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_CreateShelfRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_CreateShelfRequest proto.InternalMessageInfo
-
- func (m *CreateShelfRequest) GetShelf() *Shelf {
- if m != nil {
- return m.Shelf
- }
- return nil
- }
-
- // Request message for LibraryService.GetShelf.
- type GetShelfRequest struct {
- // The name of the shelf to retrieve.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *GetShelfRequest) Reset() { *m = GetShelfRequest{} }
- func (m *GetShelfRequest) String() string { return proto.CompactTextString(m) }
- func (*GetShelfRequest) ProtoMessage() {}
- func (*GetShelfRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{3}
- }
- func (m *GetShelfRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetShelfRequest.Unmarshal(m, b)
- }
- func (m *GetShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetShelfRequest.Marshal(b, m, deterministic)
- }
- func (dst *GetShelfRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetShelfRequest.Merge(dst, src)
- }
- func (m *GetShelfRequest) XXX_Size() int {
- return xxx_messageInfo_GetShelfRequest.Size(m)
- }
- func (m *GetShelfRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_GetShelfRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_GetShelfRequest proto.InternalMessageInfo
-
- func (m *GetShelfRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- // Request message for LibraryService.ListShelves.
- type ListShelvesRequest struct {
- // Requested page size. Server may return fewer shelves than requested.
- // If unspecified, server will pick an appropriate default.
- PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- // A token identifying a page of results the server should return.
- // Typically, this is the value of
- // [ListShelvesResponse.next_page_token][google.example.library.v1.ListShelvesResponse.next_page_token]
- // returned from the previous call to `ListShelves` method.
- PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *ListShelvesRequest) Reset() { *m = ListShelvesRequest{} }
- func (m *ListShelvesRequest) String() string { return proto.CompactTextString(m) }
- func (*ListShelvesRequest) ProtoMessage() {}
- func (*ListShelvesRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{4}
- }
- func (m *ListShelvesRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListShelvesRequest.Unmarshal(m, b)
- }
- func (m *ListShelvesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListShelvesRequest.Marshal(b, m, deterministic)
- }
- func (dst *ListShelvesRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListShelvesRequest.Merge(dst, src)
- }
- func (m *ListShelvesRequest) XXX_Size() int {
- return xxx_messageInfo_ListShelvesRequest.Size(m)
- }
- func (m *ListShelvesRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ListShelvesRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_ListShelvesRequest proto.InternalMessageInfo
-
- func (m *ListShelvesRequest) GetPageSize() int32 {
- if m != nil {
- return m.PageSize
- }
- return 0
- }
-
- func (m *ListShelvesRequest) GetPageToken() string {
- if m != nil {
- return m.PageToken
- }
- return ""
- }
-
- // Response message for LibraryService.ListShelves.
- type ListShelvesResponse struct {
- // The list of shelves.
- Shelves []*Shelf `protobuf:"bytes,1,rep,name=shelves,proto3" json:"shelves,omitempty"`
- // A token to retrieve next page of results.
- // Pass this value in the
- // [ListShelvesRequest.page_token][google.example.library.v1.ListShelvesRequest.page_token]
- // field in the subsequent call to `ListShelves` method to retrieve the next
- // page of results.
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *ListShelvesResponse) Reset() { *m = ListShelvesResponse{} }
- func (m *ListShelvesResponse) String() string { return proto.CompactTextString(m) }
- func (*ListShelvesResponse) ProtoMessage() {}
- func (*ListShelvesResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{5}
- }
- func (m *ListShelvesResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListShelvesResponse.Unmarshal(m, b)
- }
- func (m *ListShelvesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListShelvesResponse.Marshal(b, m, deterministic)
- }
- func (dst *ListShelvesResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListShelvesResponse.Merge(dst, src)
- }
- func (m *ListShelvesResponse) XXX_Size() int {
- return xxx_messageInfo_ListShelvesResponse.Size(m)
- }
- func (m *ListShelvesResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ListShelvesResponse.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_ListShelvesResponse proto.InternalMessageInfo
-
- func (m *ListShelvesResponse) GetShelves() []*Shelf {
- if m != nil {
- return m.Shelves
- }
- return nil
- }
-
- func (m *ListShelvesResponse) GetNextPageToken() string {
- if m != nil {
- return m.NextPageToken
- }
- return ""
- }
-
- // Request message for LibraryService.DeleteShelf.
- type DeleteShelfRequest struct {
- // The name of the shelf to delete.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *DeleteShelfRequest) Reset() { *m = DeleteShelfRequest{} }
- func (m *DeleteShelfRequest) String() string { return proto.CompactTextString(m) }
- func (*DeleteShelfRequest) ProtoMessage() {}
- func (*DeleteShelfRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{6}
- }
- func (m *DeleteShelfRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteShelfRequest.Unmarshal(m, b)
- }
- func (m *DeleteShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteShelfRequest.Marshal(b, m, deterministic)
- }
- func (dst *DeleteShelfRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteShelfRequest.Merge(dst, src)
- }
- func (m *DeleteShelfRequest) XXX_Size() int {
- return xxx_messageInfo_DeleteShelfRequest.Size(m)
- }
- func (m *DeleteShelfRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteShelfRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_DeleteShelfRequest proto.InternalMessageInfo
-
- func (m *DeleteShelfRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- // Describes the shelf being removed (other_shelf_name) and updated
- // (name) in this merge.
- type MergeShelvesRequest struct {
- // The name of the shelf we're adding books to.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The name of the shelf we're removing books from and deleting.
- OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName,proto3" json:"other_shelf_name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *MergeShelvesRequest) Reset() { *m = MergeShelvesRequest{} }
- func (m *MergeShelvesRequest) String() string { return proto.CompactTextString(m) }
- func (*MergeShelvesRequest) ProtoMessage() {}
- func (*MergeShelvesRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{7}
- }
- func (m *MergeShelvesRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_MergeShelvesRequest.Unmarshal(m, b)
- }
- func (m *MergeShelvesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_MergeShelvesRequest.Marshal(b, m, deterministic)
- }
- func (dst *MergeShelvesRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_MergeShelvesRequest.Merge(dst, src)
- }
- func (m *MergeShelvesRequest) XXX_Size() int {
- return xxx_messageInfo_MergeShelvesRequest.Size(m)
- }
- func (m *MergeShelvesRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_MergeShelvesRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_MergeShelvesRequest proto.InternalMessageInfo
-
- func (m *MergeShelvesRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *MergeShelvesRequest) GetOtherShelfName() string {
- if m != nil {
- return m.OtherShelfName
- }
- return ""
- }
-
- // Request message for LibraryService.CreateBook.
- type CreateBookRequest struct {
- // The name of the shelf in which the book is created.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The book to create.
- Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *CreateBookRequest) Reset() { *m = CreateBookRequest{} }
- func (m *CreateBookRequest) String() string { return proto.CompactTextString(m) }
- func (*CreateBookRequest) ProtoMessage() {}
- func (*CreateBookRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{8}
- }
- func (m *CreateBookRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CreateBookRequest.Unmarshal(m, b)
- }
- func (m *CreateBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CreateBookRequest.Marshal(b, m, deterministic)
- }
- func (dst *CreateBookRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CreateBookRequest.Merge(dst, src)
- }
- func (m *CreateBookRequest) XXX_Size() int {
- return xxx_messageInfo_CreateBookRequest.Size(m)
- }
- func (m *CreateBookRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_CreateBookRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_CreateBookRequest proto.InternalMessageInfo
-
- func (m *CreateBookRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *CreateBookRequest) GetBook() *Book {
- if m != nil {
- return m.Book
- }
- return nil
- }
-
- // Request message for LibraryService.GetBook.
- type GetBookRequest struct {
- // The name of the book to retrieve.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *GetBookRequest) Reset() { *m = GetBookRequest{} }
- func (m *GetBookRequest) String() string { return proto.CompactTextString(m) }
- func (*GetBookRequest) ProtoMessage() {}
- func (*GetBookRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{9}
- }
- func (m *GetBookRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetBookRequest.Unmarshal(m, b)
- }
- func (m *GetBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetBookRequest.Marshal(b, m, deterministic)
- }
- func (dst *GetBookRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetBookRequest.Merge(dst, src)
- }
- func (m *GetBookRequest) XXX_Size() int {
- return xxx_messageInfo_GetBookRequest.Size(m)
- }
- func (m *GetBookRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_GetBookRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_GetBookRequest proto.InternalMessageInfo
-
- func (m *GetBookRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- // Request message for LibraryService.ListBooks.
- type ListBooksRequest struct {
- // The name of the shelf whose books we'd like to list.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // Requested page size. Server may return fewer books than requested.
- // If unspecified, server will pick an appropriate default.
- PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- // A token identifying a page of results the server should return.
- // Typically, this is the value of
- // [ListBooksResponse.next_page_token][google.example.library.v1.ListBooksResponse.next_page_token].
- // returned from the previous call to `ListBooks` method.
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *ListBooksRequest) Reset() { *m = ListBooksRequest{} }
- func (m *ListBooksRequest) String() string { return proto.CompactTextString(m) }
- func (*ListBooksRequest) ProtoMessage() {}
- func (*ListBooksRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{10}
- }
- func (m *ListBooksRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListBooksRequest.Unmarshal(m, b)
- }
- func (m *ListBooksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListBooksRequest.Marshal(b, m, deterministic)
- }
- func (dst *ListBooksRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListBooksRequest.Merge(dst, src)
- }
- func (m *ListBooksRequest) XXX_Size() int {
- return xxx_messageInfo_ListBooksRequest.Size(m)
- }
- func (m *ListBooksRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ListBooksRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_ListBooksRequest proto.InternalMessageInfo
-
- func (m *ListBooksRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *ListBooksRequest) GetPageSize() int32 {
- if m != nil {
- return m.PageSize
- }
- return 0
- }
-
- func (m *ListBooksRequest) GetPageToken() string {
- if m != nil {
- return m.PageToken
- }
- return ""
- }
-
- // Response message for LibraryService.ListBooks.
- type ListBooksResponse struct {
- // The list of books.
- Books []*Book `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"`
- // A token to retrieve next page of results.
- // Pass this value in the
- // [ListBooksRequest.page_token][google.example.library.v1.ListBooksRequest.page_token]
- // field in the subsequent call to `ListBooks` method to retrieve the next
- // page of results.
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *ListBooksResponse) Reset() { *m = ListBooksResponse{} }
- func (m *ListBooksResponse) String() string { return proto.CompactTextString(m) }
- func (*ListBooksResponse) ProtoMessage() {}
- func (*ListBooksResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{11}
- }
- func (m *ListBooksResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListBooksResponse.Unmarshal(m, b)
- }
- func (m *ListBooksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListBooksResponse.Marshal(b, m, deterministic)
- }
- func (dst *ListBooksResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListBooksResponse.Merge(dst, src)
- }
- func (m *ListBooksResponse) XXX_Size() int {
- return xxx_messageInfo_ListBooksResponse.Size(m)
- }
- func (m *ListBooksResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ListBooksResponse.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_ListBooksResponse proto.InternalMessageInfo
-
- func (m *ListBooksResponse) GetBooks() []*Book {
- if m != nil {
- return m.Books
- }
- return nil
- }
-
- func (m *ListBooksResponse) GetNextPageToken() string {
- if m != nil {
- return m.NextPageToken
- }
- return ""
- }
-
- // Request message for LibraryService.UpdateBook.
- type UpdateBookRequest struct {
- // The name of the book to update.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The book to update with. The name must match or be empty.
- Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *UpdateBookRequest) Reset() { *m = UpdateBookRequest{} }
- func (m *UpdateBookRequest) String() string { return proto.CompactTextString(m) }
- func (*UpdateBookRequest) ProtoMessage() {}
- func (*UpdateBookRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{12}
- }
- func (m *UpdateBookRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UpdateBookRequest.Unmarshal(m, b)
- }
- func (m *UpdateBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UpdateBookRequest.Marshal(b, m, deterministic)
- }
- func (dst *UpdateBookRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UpdateBookRequest.Merge(dst, src)
- }
- func (m *UpdateBookRequest) XXX_Size() int {
- return xxx_messageInfo_UpdateBookRequest.Size(m)
- }
- func (m *UpdateBookRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_UpdateBookRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_UpdateBookRequest proto.InternalMessageInfo
-
- func (m *UpdateBookRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *UpdateBookRequest) GetBook() *Book {
- if m != nil {
- return m.Book
- }
- return nil
- }
-
- // Request message for LibraryService.DeleteBook.
- type DeleteBookRequest struct {
- // The name of the book to delete.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *DeleteBookRequest) Reset() { *m = DeleteBookRequest{} }
- func (m *DeleteBookRequest) String() string { return proto.CompactTextString(m) }
- func (*DeleteBookRequest) ProtoMessage() {}
- func (*DeleteBookRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{13}
- }
- func (m *DeleteBookRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteBookRequest.Unmarshal(m, b)
- }
- func (m *DeleteBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteBookRequest.Marshal(b, m, deterministic)
- }
- func (dst *DeleteBookRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteBookRequest.Merge(dst, src)
- }
- func (m *DeleteBookRequest) XXX_Size() int {
- return xxx_messageInfo_DeleteBookRequest.Size(m)
- }
- func (m *DeleteBookRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteBookRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_DeleteBookRequest proto.InternalMessageInfo
-
- func (m *DeleteBookRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- // Describes what book to move (name) and what shelf we're moving it
- // to (other_shelf_name).
- type MoveBookRequest struct {
- // The name of the book to move.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The name of the destination shelf.
- OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName,proto3" json:"other_shelf_name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *MoveBookRequest) Reset() { *m = MoveBookRequest{} }
- func (m *MoveBookRequest) String() string { return proto.CompactTextString(m) }
- func (*MoveBookRequest) ProtoMessage() {}
- func (*MoveBookRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_library_b70933aae91bc85e, []int{14}
- }
- func (m *MoveBookRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_MoveBookRequest.Unmarshal(m, b)
- }
- func (m *MoveBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_MoveBookRequest.Marshal(b, m, deterministic)
- }
- func (dst *MoveBookRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_MoveBookRequest.Merge(dst, src)
- }
- func (m *MoveBookRequest) XXX_Size() int {
- return xxx_messageInfo_MoveBookRequest.Size(m)
- }
- func (m *MoveBookRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_MoveBookRequest.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_MoveBookRequest proto.InternalMessageInfo
-
- func (m *MoveBookRequest) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
-
- func (m *MoveBookRequest) GetOtherShelfName() string {
- if m != nil {
- return m.OtherShelfName
- }
- return ""
- }
-
- func init() {
- proto.RegisterType((*Book)(nil), "google.example.library.v1.Book")
- proto.RegisterType((*Shelf)(nil), "google.example.library.v1.Shelf")
- proto.RegisterType((*CreateShelfRequest)(nil), "google.example.library.v1.CreateShelfRequest")
- proto.RegisterType((*GetShelfRequest)(nil), "google.example.library.v1.GetShelfRequest")
- proto.RegisterType((*ListShelvesRequest)(nil), "google.example.library.v1.ListShelvesRequest")
- proto.RegisterType((*ListShelvesResponse)(nil), "google.example.library.v1.ListShelvesResponse")
- proto.RegisterType((*DeleteShelfRequest)(nil), "google.example.library.v1.DeleteShelfRequest")
- proto.RegisterType((*MergeShelvesRequest)(nil), "google.example.library.v1.MergeShelvesRequest")
- proto.RegisterType((*CreateBookRequest)(nil), "google.example.library.v1.CreateBookRequest")
- proto.RegisterType((*GetBookRequest)(nil), "google.example.library.v1.GetBookRequest")
- proto.RegisterType((*ListBooksRequest)(nil), "google.example.library.v1.ListBooksRequest")
- proto.RegisterType((*ListBooksResponse)(nil), "google.example.library.v1.ListBooksResponse")
- proto.RegisterType((*UpdateBookRequest)(nil), "google.example.library.v1.UpdateBookRequest")
- proto.RegisterType((*DeleteBookRequest)(nil), "google.example.library.v1.DeleteBookRequest")
- proto.RegisterType((*MoveBookRequest)(nil), "google.example.library.v1.MoveBookRequest")
- }
-
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConn
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
-
- // LibraryServiceClient is the client API for LibraryService service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type LibraryServiceClient interface {
- // Creates a shelf, and returns the new Shelf.
- CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
- // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
- GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
- // Lists shelves. The order is unspecified but deterministic. Newly created
- // shelves will not necessarily be added to the end of this list.
- ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error)
- // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
- DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- // Merges two shelves by adding all books from the shelf named
- // `other_shelf_name` to shelf `name`, and deletes
- // `other_shelf_name`. Returns the updated shelf.
- // The book ids of the moved books may not be the same as the original books.
- //
- // Returns NOT_FOUND if either shelf does not exist.
- // This call is a no-op if the specified shelves are the same.
- MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error)
- // Creates a book, and returns the new Book.
- CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
- // Gets a book. Returns NOT_FOUND if the book does not exist.
- GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error)
- // Lists books in a shelf. The order is unspecified but deterministic. Newly
- // created books will not necessarily be added to the end of this list.
- // Returns NOT_FOUND if the shelf does not exist.
- ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error)
- // Deletes a book. Returns NOT_FOUND if the book does not exist.
- DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- // Updates a book. Returns INVALID_ARGUMENT if the name of the book
- // is non-empty and does equal the previous name.
- UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
- // Moves a book to another shelf, and returns the new book. The book
- // id of the new book may not be the same as the original book.
- MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error)
- }
-
- type libraryServiceClient struct {
- cc *grpc.ClientConn
- }
-
- func NewLibraryServiceClient(cc *grpc.ClientConn) LibraryServiceClient {
- return &libraryServiceClient{cc}
- }
-
- func (c *libraryServiceClient) CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
- out := new(Shelf)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateShelf", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
- out := new(Shelf)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetShelf", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error) {
- out := new(ListShelvesResponse)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListShelves", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteShelf", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error) {
- out := new(Shelf)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/MergeShelves", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) {
- out := new(Book)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateBook", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) {
- out := new(Book)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetBook", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) {
- out := new(ListBooksResponse)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListBooks", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteBook", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) {
- out := new(Book)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/UpdateBook", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *libraryServiceClient) MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error) {
- out := new(Book)
- err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/MoveBook", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- // LibraryServiceServer is the server API for LibraryService service.
- type LibraryServiceServer interface {
- // Creates a shelf, and returns the new Shelf.
- CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
- // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
- GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
- // Lists shelves. The order is unspecified but deterministic. Newly created
- // shelves will not necessarily be added to the end of this list.
- ListShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
- // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
- DeleteShelf(context.Context, *DeleteShelfRequest) (*empty.Empty, error)
- // Merges two shelves by adding all books from the shelf named
- // `other_shelf_name` to shelf `name`, and deletes
- // `other_shelf_name`. Returns the updated shelf.
- // The book ids of the moved books may not be the same as the original books.
- //
- // Returns NOT_FOUND if either shelf does not exist.
- // This call is a no-op if the specified shelves are the same.
- MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
- // Creates a book, and returns the new Book.
- CreateBook(context.Context, *CreateBookRequest) (*Book, error)
- // Gets a book. Returns NOT_FOUND if the book does not exist.
- GetBook(context.Context, *GetBookRequest) (*Book, error)
- // Lists books in a shelf. The order is unspecified but deterministic. Newly
- // created books will not necessarily be added to the end of this list.
- // Returns NOT_FOUND if the shelf does not exist.
- ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
- // Deletes a book. Returns NOT_FOUND if the book does not exist.
- DeleteBook(context.Context, *DeleteBookRequest) (*empty.Empty, error)
- // Updates a book. Returns INVALID_ARGUMENT if the name of the book
- // is non-empty and does equal the previous name.
- UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
- // Moves a book to another shelf, and returns the new book. The book
- // id of the new book may not be the same as the original book.
- MoveBook(context.Context, *MoveBookRequest) (*Book, error)
- }
-
- func RegisterLibraryServiceServer(s *grpc.Server, srv LibraryServiceServer) {
- s.RegisterService(&_LibraryService_serviceDesc, srv)
- }
-
- func _LibraryService_CreateShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateShelfRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).CreateShelf(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/CreateShelf",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).CreateShelf(ctx, req.(*CreateShelfRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_GetShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetShelfRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).GetShelf(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/GetShelf",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).GetShelf(ctx, req.(*GetShelfRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_ListShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListShelvesRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).ListShelves(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/ListShelves",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).ListShelves(ctx, req.(*ListShelvesRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_DeleteShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteShelfRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).DeleteShelf(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/DeleteShelf",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).DeleteShelf(ctx, req.(*DeleteShelfRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_MergeShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MergeShelvesRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).MergeShelves(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/MergeShelves",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).MergeShelves(ctx, req.(*MergeShelvesRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateBookRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).CreateBook(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/CreateBook",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).CreateBook(ctx, req.(*CreateBookRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_GetBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetBookRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).GetBook(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/GetBook",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).GetBook(ctx, req.(*GetBookRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_ListBooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListBooksRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).ListBooks(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/ListBooks",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).ListBooks(ctx, req.(*ListBooksRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_DeleteBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteBookRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).DeleteBook(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/DeleteBook",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).DeleteBook(ctx, req.(*DeleteBookRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UpdateBookRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).UpdateBook(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/UpdateBook",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).UpdateBook(ctx, req.(*UpdateBookRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _LibraryService_MoveBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MoveBookRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(LibraryServiceServer).MoveBook(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.example.library.v1.LibraryService/MoveBook",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(LibraryServiceServer).MoveBook(ctx, req.(*MoveBookRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- var _LibraryService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "google.example.library.v1.LibraryService",
- HandlerType: (*LibraryServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CreateShelf",
- Handler: _LibraryService_CreateShelf_Handler,
- },
- {
- MethodName: "GetShelf",
- Handler: _LibraryService_GetShelf_Handler,
- },
- {
- MethodName: "ListShelves",
- Handler: _LibraryService_ListShelves_Handler,
- },
- {
- MethodName: "DeleteShelf",
- Handler: _LibraryService_DeleteShelf_Handler,
- },
- {
- MethodName: "MergeShelves",
- Handler: _LibraryService_MergeShelves_Handler,
- },
- {
- MethodName: "CreateBook",
- Handler: _LibraryService_CreateBook_Handler,
- },
- {
- MethodName: "GetBook",
- Handler: _LibraryService_GetBook_Handler,
- },
- {
- MethodName: "ListBooks",
- Handler: _LibraryService_ListBooks_Handler,
- },
- {
- MethodName: "DeleteBook",
- Handler: _LibraryService_DeleteBook_Handler,
- },
- {
- MethodName: "UpdateBook",
- Handler: _LibraryService_UpdateBook_Handler,
- },
- {
- MethodName: "MoveBook",
- Handler: _LibraryService_MoveBook_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "google/example/library/v1/library.proto",
- }
-
- func init() {
- proto.RegisterFile("google/example/library/v1/library.proto", fileDescriptor_library_b70933aae91bc85e)
- }
-
- var fileDescriptor_library_b70933aae91bc85e = []byte{
- // 838 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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