Documentation ¶
Index ¶
- Variables
- func RegisterLibraryServiceServer(s *grpc.Server, srv LibraryServiceServer)
- type Book
- func (*Book) Descriptor() ([]byte, []int)deprecated
- func (x *Book) GetAuthor() string
- func (x *Book) GetName() string
- func (x *Book) GetRead() bool
- func (x *Book) GetTitle() string
- func (*Book) ProtoMessage()
- func (x *Book) ProtoReflect() protoreflect.Message
- func (x *Book) Reset()
- func (x *Book) String() string
- type CreateBookRequest
- func (*CreateBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBookRequest) GetBook() *Book
- func (x *CreateBookRequest) GetParent() string
- func (*CreateBookRequest) ProtoMessage()
- func (x *CreateBookRequest) ProtoReflect() protoreflect.Message
- func (x *CreateBookRequest) Reset()
- func (x *CreateBookRequest) String() string
- type CreateShelfRequest
- func (*CreateShelfRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShelfRequest) GetShelf() *Shelf
- func (*CreateShelfRequest) ProtoMessage()
- func (x *CreateShelfRequest) ProtoReflect() protoreflect.Message
- func (x *CreateShelfRequest) Reset()
- func (x *CreateShelfRequest) String() string
- type DeleteBookRequest
- type DeleteShelfRequest
- func (*DeleteShelfRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteShelfRequest) GetName() string
- func (*DeleteShelfRequest) ProtoMessage()
- func (x *DeleteShelfRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteShelfRequest) Reset()
- func (x *DeleteShelfRequest) String() string
- type GetBookRequest
- type GetShelfRequest
- type LibraryServiceClient
- type LibraryServiceServer
- type ListBooksRequest
- func (*ListBooksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListBooksRequest) GetPageSize() int32
- func (x *ListBooksRequest) GetPageToken() string
- func (x *ListBooksRequest) GetParent() string
- func (*ListBooksRequest) ProtoMessage()
- func (x *ListBooksRequest) ProtoReflect() protoreflect.Message
- func (x *ListBooksRequest) Reset()
- func (x *ListBooksRequest) String() string
- type ListBooksResponse
- func (*ListBooksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListBooksResponse) GetBooks() []*Book
- func (x *ListBooksResponse) GetNextPageToken() string
- func (*ListBooksResponse) ProtoMessage()
- func (x *ListBooksResponse) ProtoReflect() protoreflect.Message
- func (x *ListBooksResponse) Reset()
- func (x *ListBooksResponse) String() string
- type ListShelvesRequest
- func (*ListShelvesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListShelvesRequest) GetPageSize() int32
- func (x *ListShelvesRequest) GetPageToken() string
- func (*ListShelvesRequest) ProtoMessage()
- func (x *ListShelvesRequest) ProtoReflect() protoreflect.Message
- func (x *ListShelvesRequest) Reset()
- func (x *ListShelvesRequest) String() string
- type ListShelvesResponse
- func (*ListShelvesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListShelvesResponse) GetNextPageToken() string
- func (x *ListShelvesResponse) GetShelves() []*Shelf
- func (*ListShelvesResponse) ProtoMessage()
- func (x *ListShelvesResponse) ProtoReflect() protoreflect.Message
- func (x *ListShelvesResponse) Reset()
- func (x *ListShelvesResponse) String() string
- type MergeShelvesRequest
- func (*MergeShelvesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MergeShelvesRequest) GetName() string
- func (x *MergeShelvesRequest) GetOtherShelf() string
- func (*MergeShelvesRequest) ProtoMessage()
- func (x *MergeShelvesRequest) ProtoReflect() protoreflect.Message
- func (x *MergeShelvesRequest) Reset()
- func (x *MergeShelvesRequest) String() string
- type MoveBookRequest
- func (*MoveBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MoveBookRequest) GetName() string
- func (x *MoveBookRequest) GetOtherShelfName() string
- func (*MoveBookRequest) ProtoMessage()
- func (x *MoveBookRequest) ProtoReflect() protoreflect.Message
- func (x *MoveBookRequest) Reset()
- func (x *MoveBookRequest) String() string
- type Shelf
- type UnimplementedLibraryServiceServer
- func (*UnimplementedLibraryServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error)
- func (*UnimplementedLibraryServiceServer) CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
- func (*UnimplementedLibraryServiceServer) DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error)
- func (*UnimplementedLibraryServiceServer) DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, error)
- func (*UnimplementedLibraryServiceServer) GetBook(context.Context, *GetBookRequest) (*Book, error)
- func (*UnimplementedLibraryServiceServer) GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
- func (*UnimplementedLibraryServiceServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
- func (*UnimplementedLibraryServiceServer) ListShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
- func (*UnimplementedLibraryServiceServer) MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
- func (*UnimplementedLibraryServiceServer) MoveBook(context.Context, *MoveBookRequest) (*Book, error)
- func (*UnimplementedLibraryServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
- type UpdateBookRequest
- func (*UpdateBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateBookRequest) GetBook() *Book
- func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (*UpdateBookRequest) ProtoMessage()
- func (x *UpdateBookRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateBookRequest) Reset()
- func (x *UpdateBookRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var File_google_example_library_v1_library_proto protoreflect.FileDescriptor
Functions ¶
func RegisterLibraryServiceServer ¶
func RegisterLibraryServiceServer(s *grpc.Server, srv LibraryServiceServer)
Types ¶
type Book ¶
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"` // contains filtered or unexported fields }
A single book in the library.
func (*Book) Descriptor
deprecated
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
func (*Book) ProtoReflect ¶
func (x *Book) ProtoReflect() protoreflect.Message
type CreateBookRequest ¶
type CreateBookRequest struct { // The name of the shelf in which the book is created. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // The book to create. Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.CreateBook.
func (*CreateBookRequest) Descriptor
deprecated
func (*CreateBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateBookRequest.ProtoReflect.Descriptor instead.
func (*CreateBookRequest) GetBook ¶
func (x *CreateBookRequest) GetBook() *Book
func (*CreateBookRequest) GetParent ¶
func (x *CreateBookRequest) GetParent() string
func (*CreateBookRequest) ProtoMessage ¶
func (*CreateBookRequest) ProtoMessage()
func (*CreateBookRequest) ProtoReflect ¶
func (x *CreateBookRequest) ProtoReflect() protoreflect.Message
func (*CreateBookRequest) Reset ¶
func (x *CreateBookRequest) Reset()
func (*CreateBookRequest) String ¶
func (x *CreateBookRequest) String() string
type CreateShelfRequest ¶
type CreateShelfRequest struct { // The shelf to create. Shelf *Shelf `protobuf:"bytes,1,opt,name=shelf,proto3" json:"shelf,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.CreateShelf.
func (*CreateShelfRequest) Descriptor
deprecated
func (*CreateShelfRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateShelfRequest.ProtoReflect.Descriptor instead.
func (*CreateShelfRequest) GetShelf ¶
func (x *CreateShelfRequest) GetShelf() *Shelf
func (*CreateShelfRequest) ProtoMessage ¶
func (*CreateShelfRequest) ProtoMessage()
func (*CreateShelfRequest) ProtoReflect ¶
func (x *CreateShelfRequest) ProtoReflect() protoreflect.Message
func (*CreateShelfRequest) Reset ¶
func (x *CreateShelfRequest) Reset()
func (*CreateShelfRequest) String ¶
func (x *CreateShelfRequest) String() string
type DeleteBookRequest ¶
type DeleteBookRequest struct { // The name of the book to delete. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.DeleteBook.
func (*DeleteBookRequest) Descriptor
deprecated
func (*DeleteBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBookRequest.ProtoReflect.Descriptor instead.
func (*DeleteBookRequest) GetName ¶
func (x *DeleteBookRequest) GetName() string
func (*DeleteBookRequest) ProtoMessage ¶
func (*DeleteBookRequest) ProtoMessage()
func (*DeleteBookRequest) ProtoReflect ¶
func (x *DeleteBookRequest) ProtoReflect() protoreflect.Message
func (*DeleteBookRequest) Reset ¶
func (x *DeleteBookRequest) Reset()
func (*DeleteBookRequest) String ¶
func (x *DeleteBookRequest) String() string
type DeleteShelfRequest ¶
type DeleteShelfRequest struct { // The name of the shelf to delete. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.DeleteShelf.
func (*DeleteShelfRequest) Descriptor
deprecated
func (*DeleteShelfRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteShelfRequest.ProtoReflect.Descriptor instead.
func (*DeleteShelfRequest) GetName ¶
func (x *DeleteShelfRequest) GetName() string
func (*DeleteShelfRequest) ProtoMessage ¶
func (*DeleteShelfRequest) ProtoMessage()
func (*DeleteShelfRequest) ProtoReflect ¶
func (x *DeleteShelfRequest) ProtoReflect() protoreflect.Message
func (*DeleteShelfRequest) Reset ¶
func (x *DeleteShelfRequest) Reset()
func (*DeleteShelfRequest) String ¶
func (x *DeleteShelfRequest) String() string
type GetBookRequest ¶
type GetBookRequest struct { // The name of the book to retrieve. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.GetBook.
func (*GetBookRequest) Descriptor
deprecated
func (*GetBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBookRequest.ProtoReflect.Descriptor instead.
func (*GetBookRequest) GetName ¶
func (x *GetBookRequest) GetName() string
func (*GetBookRequest) ProtoMessage ¶
func (*GetBookRequest) ProtoMessage()
func (*GetBookRequest) ProtoReflect ¶
func (x *GetBookRequest) ProtoReflect() protoreflect.Message
func (*GetBookRequest) Reset ¶
func (x *GetBookRequest) Reset()
func (*GetBookRequest) String ¶
func (x *GetBookRequest) String() string
type GetShelfRequest ¶
type GetShelfRequest struct { // The name of the shelf to retrieve. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.GetShelf.
func (*GetShelfRequest) Descriptor
deprecated
func (*GetShelfRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetShelfRequest.ProtoReflect.Descriptor instead.
func (*GetShelfRequest) GetName ¶
func (x *GetShelfRequest) GetName() string
func (*GetShelfRequest) ProtoMessage ¶
func (*GetShelfRequest) ProtoMessage()
func (*GetShelfRequest) ProtoReflect ¶
func (x *GetShelfRequest) ProtoReflect() protoreflect.Message
func (*GetShelfRequest) Reset ¶
func (x *GetShelfRequest) Reset()
func (*GetShelfRequest) String ¶
func (x *GetShelfRequest) String() string
type LibraryServiceClient ¶
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) (*emptypb.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) (*emptypb.Empty, error) // Updates a book. Returns INVALID_ARGUMENT if the name of the book // is non-empty and does not equal the existing 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) }
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.
func NewLibraryServiceClient ¶
func NewLibraryServiceClient(cc grpc.ClientConnInterface) LibraryServiceClient
type LibraryServiceServer ¶
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) (*emptypb.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) (*emptypb.Empty, error) // Updates a book. Returns INVALID_ARGUMENT if the name of the book // is non-empty and does not equal the existing 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) }
LibraryServiceServer is the server API for LibraryService service.
type ListBooksRequest ¶
type ListBooksRequest struct { // The name of the shelf whose books we'd like to list. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,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"` // contains filtered or unexported fields }
Request message for LibraryService.ListBooks.
func (*ListBooksRequest) Descriptor
deprecated
func (*ListBooksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListBooksRequest.ProtoReflect.Descriptor instead.
func (*ListBooksRequest) GetPageSize ¶
func (x *ListBooksRequest) GetPageSize() int32
func (*ListBooksRequest) GetPageToken ¶
func (x *ListBooksRequest) GetPageToken() string
func (*ListBooksRequest) GetParent ¶
func (x *ListBooksRequest) GetParent() string
func (*ListBooksRequest) ProtoMessage ¶
func (*ListBooksRequest) ProtoMessage()
func (*ListBooksRequest) ProtoReflect ¶
func (x *ListBooksRequest) ProtoReflect() protoreflect.Message
func (*ListBooksRequest) Reset ¶
func (x *ListBooksRequest) Reset()
func (*ListBooksRequest) String ¶
func (x *ListBooksRequest) String() string
type ListBooksResponse ¶
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"` // contains filtered or unexported fields }
Response message for LibraryService.ListBooks.
func (*ListBooksResponse) Descriptor
deprecated
func (*ListBooksResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListBooksResponse.ProtoReflect.Descriptor instead.
func (*ListBooksResponse) GetBooks ¶
func (x *ListBooksResponse) GetBooks() []*Book
func (*ListBooksResponse) GetNextPageToken ¶
func (x *ListBooksResponse) GetNextPageToken() string
func (*ListBooksResponse) ProtoMessage ¶
func (*ListBooksResponse) ProtoMessage()
func (*ListBooksResponse) ProtoReflect ¶
func (x *ListBooksResponse) ProtoReflect() protoreflect.Message
func (*ListBooksResponse) Reset ¶
func (x *ListBooksResponse) Reset()
func (*ListBooksResponse) String ¶
func (x *ListBooksResponse) String() string
type ListShelvesRequest ¶
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"` // contains filtered or unexported fields }
Request message for LibraryService.ListShelves.
func (*ListShelvesRequest) Descriptor
deprecated
func (*ListShelvesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListShelvesRequest.ProtoReflect.Descriptor instead.
func (*ListShelvesRequest) GetPageSize ¶
func (x *ListShelvesRequest) GetPageSize() int32
func (*ListShelvesRequest) GetPageToken ¶
func (x *ListShelvesRequest) GetPageToken() string
func (*ListShelvesRequest) ProtoMessage ¶
func (*ListShelvesRequest) ProtoMessage()
func (*ListShelvesRequest) ProtoReflect ¶
func (x *ListShelvesRequest) ProtoReflect() protoreflect.Message
func (*ListShelvesRequest) Reset ¶
func (x *ListShelvesRequest) Reset()
func (*ListShelvesRequest) String ¶
func (x *ListShelvesRequest) String() string
type ListShelvesResponse ¶
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"` // contains filtered or unexported fields }
Response message for LibraryService.ListShelves.
func (*ListShelvesResponse) Descriptor
deprecated
func (*ListShelvesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListShelvesResponse.ProtoReflect.Descriptor instead.
func (*ListShelvesResponse) GetNextPageToken ¶
func (x *ListShelvesResponse) GetNextPageToken() string
func (*ListShelvesResponse) GetShelves ¶
func (x *ListShelvesResponse) GetShelves() []*Shelf
func (*ListShelvesResponse) ProtoMessage ¶
func (*ListShelvesResponse) ProtoMessage()
func (*ListShelvesResponse) ProtoReflect ¶
func (x *ListShelvesResponse) ProtoReflect() protoreflect.Message
func (*ListShelvesResponse) Reset ¶
func (x *ListShelvesResponse) Reset()
func (*ListShelvesResponse) String ¶
func (x *ListShelvesResponse) String() string
type MergeShelvesRequest ¶
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. OtherShelf string `protobuf:"bytes,2,opt,name=other_shelf,json=otherShelf,proto3" json:"other_shelf,omitempty"` // contains filtered or unexported fields }
Describes the shelf being removed (other_shelf_name) and updated (name) in this merge.
func (*MergeShelvesRequest) Descriptor
deprecated
func (*MergeShelvesRequest) Descriptor() ([]byte, []int)
Deprecated: Use MergeShelvesRequest.ProtoReflect.Descriptor instead.
func (*MergeShelvesRequest) GetName ¶
func (x *MergeShelvesRequest) GetName() string
func (*MergeShelvesRequest) GetOtherShelf ¶
func (x *MergeShelvesRequest) GetOtherShelf() string
func (*MergeShelvesRequest) ProtoMessage ¶
func (*MergeShelvesRequest) ProtoMessage()
func (*MergeShelvesRequest) ProtoReflect ¶
func (x *MergeShelvesRequest) ProtoReflect() protoreflect.Message
func (*MergeShelvesRequest) Reset ¶
func (x *MergeShelvesRequest) Reset()
func (*MergeShelvesRequest) String ¶
func (x *MergeShelvesRequest) String() string
type MoveBookRequest ¶
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"` // contains filtered or unexported fields }
Describes what book to move (name) and what shelf we're moving it to (other_shelf_name).
func (*MoveBookRequest) Descriptor
deprecated
func (*MoveBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use MoveBookRequest.ProtoReflect.Descriptor instead.
func (*MoveBookRequest) GetName ¶
func (x *MoveBookRequest) GetName() string
func (*MoveBookRequest) GetOtherShelfName ¶
func (x *MoveBookRequest) GetOtherShelfName() string
func (*MoveBookRequest) ProtoMessage ¶
func (*MoveBookRequest) ProtoMessage()
func (*MoveBookRequest) ProtoReflect ¶
func (x *MoveBookRequest) ProtoReflect() protoreflect.Message
func (*MoveBookRequest) Reset ¶
func (x *MoveBookRequest) Reset()
func (*MoveBookRequest) String ¶
func (x *MoveBookRequest) String() string
type Shelf ¶
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"` // contains filtered or unexported fields }
A Shelf contains a collection of books with a theme.
func (*Shelf) Descriptor
deprecated
func (*Shelf) ProtoMessage ¶
func (*Shelf) ProtoMessage()
func (*Shelf) ProtoReflect ¶
func (x *Shelf) ProtoReflect() protoreflect.Message
type UnimplementedLibraryServiceServer ¶
type UnimplementedLibraryServiceServer struct { }
UnimplementedLibraryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedLibraryServiceServer) CreateBook ¶
func (*UnimplementedLibraryServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error)
func (*UnimplementedLibraryServiceServer) CreateShelf ¶
func (*UnimplementedLibraryServiceServer) CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
func (*UnimplementedLibraryServiceServer) DeleteBook ¶
func (*UnimplementedLibraryServiceServer) DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error)
func (*UnimplementedLibraryServiceServer) DeleteShelf ¶
func (*UnimplementedLibraryServiceServer) DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, error)
func (*UnimplementedLibraryServiceServer) GetBook ¶
func (*UnimplementedLibraryServiceServer) GetBook(context.Context, *GetBookRequest) (*Book, error)
func (*UnimplementedLibraryServiceServer) GetShelf ¶
func (*UnimplementedLibraryServiceServer) GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
func (*UnimplementedLibraryServiceServer) ListBooks ¶
func (*UnimplementedLibraryServiceServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
func (*UnimplementedLibraryServiceServer) ListShelves ¶
func (*UnimplementedLibraryServiceServer) ListShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
func (*UnimplementedLibraryServiceServer) MergeShelves ¶
func (*UnimplementedLibraryServiceServer) MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
func (*UnimplementedLibraryServiceServer) MoveBook ¶
func (*UnimplementedLibraryServiceServer) MoveBook(context.Context, *MoveBookRequest) (*Book, error)
func (*UnimplementedLibraryServiceServer) UpdateBook ¶
func (*UnimplementedLibraryServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
type UpdateBookRequest ¶
type UpdateBookRequest struct { // The name of the book to update. Book *Book `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"` // Required. Mask of fields to update. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
Request message for LibraryService.UpdateBook.
func (*UpdateBookRequest) Descriptor
deprecated
func (*UpdateBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateBookRequest.ProtoReflect.Descriptor instead.
func (*UpdateBookRequest) GetBook ¶
func (x *UpdateBookRequest) GetBook() *Book
func (*UpdateBookRequest) GetUpdateMask ¶
func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateBookRequest) ProtoMessage ¶
func (*UpdateBookRequest) ProtoMessage()
func (*UpdateBookRequest) ProtoReflect ¶
func (x *UpdateBookRequest) ProtoReflect() protoreflect.Message
func (*UpdateBookRequest) Reset ¶
func (x *UpdateBookRequest) Reset()
func (*UpdateBookRequest) String ¶
func (x *UpdateBookRequest) String() string