library

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LibraryService_CreateShelf_FullMethodName    = "/google.example.library.v1.LibraryService/CreateShelf"
	LibraryService_ListOneShelves_FullMethodName = "/google.example.library.v1.LibraryService/ListOneShelves"
	LibraryService_GetShelf_FullMethodName       = "/google.example.library.v1.LibraryService/GetShelf"
	LibraryService_DeleteShelf_FullMethodName    = "/google.example.library.v1.LibraryService/DeleteShelf"
	LibraryService_ListBooks_FullMethodName      = "/google.example.library.v1.LibraryService/ListBooks"
	LibraryService_CreateBook_FullMethodName     = "/google.example.library.v1.LibraryService/CreateBook"
	LibraryService_GetBook_FullMethodName        = "/google.example.library.v1.LibraryService/GetBook"
	LibraryService_UpdateBook_FullMethodName     = "/google.example.library.v1.LibraryService/UpdateBook"
	LibraryService_DeleteBook_FullMethodName     = "/google.example.library.v1.LibraryService/DeleteBook"
	LibraryService_MergeShelves_FullMethodName   = "/google.example.library.v1.LibraryService/MergeShelves"
	LibraryService_MoveBook_FullMethodName       = "/google.example.library.v1.LibraryService/MoveBook"
)

Variables

View Source
var File_cmd_protoc_gen_gors_examples_google_example_library_v1_library_proto protoreflect.FileDescriptor
View Source
var LibraryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.example.library.v1.LibraryService",
	HandlerType: (*LibraryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateShelf",
			Handler:    _LibraryService_CreateShelf_Handler,
		},
		{
			MethodName: "ListOneShelves",
			Handler:    _LibraryService_ListOneShelves_Handler,
		},
		{
			MethodName: "GetShelf",
			Handler:    _LibraryService_GetShelf_Handler,
		},
		{
			MethodName: "DeleteShelf",
			Handler:    _LibraryService_DeleteShelf_Handler,
		},
		{
			MethodName: "ListBooks",
			Handler:    _LibraryService_ListBooks_Handler,
		},
		{
			MethodName: "CreateBook",
			Handler:    _LibraryService_CreateBook_Handler,
		},
		{
			MethodName: "GetBook",
			Handler:    _LibraryService_GetBook_Handler,
		},
		{
			MethodName: "UpdateBook",
			Handler:    _LibraryService_UpdateBook_Handler,
		},
		{
			MethodName: "DeleteBook",
			Handler:    _LibraryService_DeleteBook_Handler,
		},
		{
			MethodName: "MergeShelves",
			Handler:    _LibraryService_MergeShelves_Handler,
		},
		{
			MethodName: "MoveBook",
			Handler:    _LibraryService_MoveBook_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cmd/protoc-gen-gors/examples/google/example/library/v1/library.proto",
}

LibraryService_ServiceDesc is the grpc.ServiceDesc for LibraryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func LibraryServiceClientRoutes

func LibraryServiceClientRoutes(cli LibraryServiceClient, opts ...gors.Option) []gors.Route

func LibraryServiceServerRoutes

func LibraryServiceServerRoutes(srv LibraryServiceServer, opts ...gors.Option) []gors.Route

func LibraryServiceServiceRoutes

func LibraryServiceServiceRoutes(svc LibraryServiceService, opts ...gors.Option) []gors.Route

func RegisterLibraryServiceServer

func RegisterLibraryServiceServer(s grpc.ServiceRegistrar, 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"`
	// The previous borrowing timestamp.
	BorrowTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=borrow_time,json=borrowTime,proto3" json:"borrow_time,omitempty"`
	// The creation date and time.
	CreatedAt *datetime.DateTime `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// The last update date and time.
	UpdatedAt *datetime.DateTime `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

A single book in the library.

func (*Book) Descriptor deprecated

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetAuthor

func (x *Book) GetAuthor() string

func (*Book) GetBorrowTime

func (x *Book) GetBorrowTime() *timestamppb.Timestamp

func (*Book) GetCreatedAt

func (x *Book) GetCreatedAt() *datetime.DateTime

func (*Book) GetName

func (x *Book) GetName() string

func (*Book) GetRead

func (x *Book) GetRead() bool

func (*Book) GetTitle

func (x *Book) GetTitle() string

func (*Book) GetUpdatedAt

func (x *Book) GetUpdatedAt() *datetime.DateTime

func (*Book) ProtoMessage

func (*Book) ProtoMessage()

func (*Book) ProtoReflect

func (x *Book) ProtoReflect() protoreflect.Message

func (*Book) Reset

func (x *Book) Reset()

func (*Book) String

func (x *Book) String() string

type CreateBookRequest

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"`
	// 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) GetName

func (x *CreateBookRequest) GetName() 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)
	// Lists shelves. The order is unspecified but deterministic. Newly created
	// shelves will not necessarily be added to the end of this list.
	ListOneShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error)
	// Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
	GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, 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)
	// 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)
	// 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)
	// 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)
	// Deletes a book. Returns NOT_FOUND if the book does not exist.
	DeleteBook(ctx context.Context, in *DeleteBookRequest, 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)
	// 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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type LibraryServiceServer

type LibraryServiceServer interface {
	// Creates a shelf, and returns the new Shelf.
	CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
	// Lists shelves. The order is unspecified but deterministic. Newly created
	// shelves will not necessarily be added to the end of this list.
	ListOneShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
	// Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
	GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
	// Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
	DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, 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)
	// 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)
	// 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)
	// Deletes a book. Returns NOT_FOUND if the book does not exist.
	DeleteBook(context.Context, *DeleteBookRequest) (*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)
	// 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)
	// contains filtered or unexported methods
}

LibraryServiceServer is the server API for LibraryService service. All implementations must embed UnimplementedLibraryServiceServer for forward compatibility

type LibraryServiceService

type LibraryServiceService interface {
	// Creates a shelf, and returns the new Shelf.
	CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
	// Lists shelves. The order is unspecified but deterministic. Newly created
	// shelves will not necessarily be added to the end of this list.
	ListOneShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
	// Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
	GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
	// Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
	DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, 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)
	// 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)
	// 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)
	// Deletes a book. Returns NOT_FOUND if the book does not exist.
	DeleteBook(context.Context, *DeleteBookRequest) (*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)
	// 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)
}

LibraryServiceService is the service API for LibraryService service.

type ListBooksRequest

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"`
	// 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) GetName

func (x *ListBooksRequest) GetName() string

func (*ListBooksRequest) GetPageSize

func (x *ListBooksRequest) GetPageSize() int32

func (*ListBooksRequest) GetPageToken

func (x *ListBooksRequest) GetPageToken() 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.
	OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName,proto3" json:"other_shelf_name,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) GetOtherShelfName

func (x *MergeShelvesRequest) GetOtherShelfName() 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"`
	// The next sorting date.
	NextSortAt *date.Date `protobuf:"bytes,3,opt,name=next_sort_at,json=nextSortAt,proto3" json:"next_sort_at,omitempty"`
	// The creation date and time.
	CreatedAt *datetime.DateTime `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// The last update date and time.
	UpdatedAt *datetime.DateTime `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

A Shelf contains a collection of books with a theme.

func (*Shelf) Descriptor deprecated

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

Deprecated: Use Shelf.ProtoReflect.Descriptor instead.

func (*Shelf) GetCreatedAt

func (x *Shelf) GetCreatedAt() *datetime.DateTime

func (*Shelf) GetName

func (x *Shelf) GetName() string

func (*Shelf) GetNextSortAt

func (x *Shelf) GetNextSortAt() *date.Date

func (*Shelf) GetTheme

func (x *Shelf) GetTheme() string

func (*Shelf) GetUpdatedAt

func (x *Shelf) GetUpdatedAt() *datetime.DateTime

func (*Shelf) ProtoMessage

func (*Shelf) ProtoMessage()

func (*Shelf) ProtoReflect

func (x *Shelf) ProtoReflect() protoreflect.Message

func (*Shelf) Reset

func (x *Shelf) Reset()

func (*Shelf) String

func (x *Shelf) String() string

type UnimplementedLibraryServiceServer

type UnimplementedLibraryServiceServer struct {
}

UnimplementedLibraryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLibraryServiceServer) CreateBook

func (UnimplementedLibraryServiceServer) CreateShelf

func (UnimplementedLibraryServiceServer) DeleteBook

func (UnimplementedLibraryServiceServer) DeleteShelf

func (UnimplementedLibraryServiceServer) GetBook

func (UnimplementedLibraryServiceServer) GetShelf

func (UnimplementedLibraryServiceServer) ListBooks

func (UnimplementedLibraryServiceServer) ListOneShelves

func (UnimplementedLibraryServiceServer) MergeShelves

func (UnimplementedLibraryServiceServer) MoveBook

func (UnimplementedLibraryServiceServer) UpdateBook

type UnsafeLibraryServiceServer

type UnsafeLibraryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLibraryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LibraryServiceServer will result in compilation errors.

type UpdateBookRequest

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"`
	// 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) GetName

func (x *UpdateBookRequest) GetName() string

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

Jump to

Keyboard shortcuts

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