Documentation ¶
Index ¶
- type BookstoreServer
- func (b *BookstoreServer) CreateBook(ctx context.Context, req *api.CreateBookRequest) (*api.Book, error)
- func (b *BookstoreServer) CreateShelf(ctx context.Context, req *api.CreateShelfRequest) (*api.Shelf, error)
- func (b *BookstoreServer) DeleteBook(ctx context.Context, req *api.DeleteBookRequest) (*empty.Empty, error)
- func (b *BookstoreServer) DeleteShelf(ctx context.Context, req *api.DeleteShelfRequest) (*empty.Empty, error)
- func (b *BookstoreServer) GetBook(ctx context.Context, req *api.GetBookRequest) (*api.Book, error)
- func (b *BookstoreServer) GetShelf(ctx context.Context, req *api.GetShelfRequest) (*api.Shelf, error)
- func (b *BookstoreServer) ListBooks(ctx context.Context, req *api.ListBooksRequest) (*api.ListBooksResponse, error)
- func (b *BookstoreServer) ListShelves(context.Context, *empty.Empty) (*api.ListShelvesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookstoreServer ¶
type BookstoreServer struct {
repository.Repository
}
BookstoreServer
func (*BookstoreServer) CreateBook ¶
func (b *BookstoreServer) CreateBook(ctx context.Context, req *api.CreateBookRequest) (*api.Book, error)
CreateBook add book to the repository
func (*BookstoreServer) CreateShelf ¶
func (b *BookstoreServer) CreateShelf(ctx context.Context, req *api.CreateShelfRequest) (*api.Shelf, error)
func (*BookstoreServer) DeleteBook ¶
func (b *BookstoreServer) DeleteBook(ctx context.Context, req *api.DeleteBookRequest) (*empty.Empty, error)
func (*BookstoreServer) DeleteShelf ¶
func (b *BookstoreServer) DeleteShelf(ctx context.Context, req *api.DeleteShelfRequest) (*empty.Empty, error)
func (*BookstoreServer) GetBook ¶
func (b *BookstoreServer) GetBook(ctx context.Context, req *api.GetBookRequest) (*api.Book, error)
GetBook get a book for given Id
func (*BookstoreServer) GetShelf ¶
func (b *BookstoreServer) GetShelf(ctx context.Context, req *api.GetShelfRequest) (*api.Shelf, error)
func (*BookstoreServer) ListBooks ¶
func (b *BookstoreServer) ListBooks(ctx context.Context, req *api.ListBooksRequest) (*api.ListBooksResponse, error)
func (*BookstoreServer) ListShelves ¶
func (b *BookstoreServer) ListShelves(context.Context, *empty.Empty) (*api.ListShelvesResponse, error)
Click to show internal directories.
Click to hide internal directories.