server

package
v0.0.0-...-ae82b8f Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Min

func Min(x, y int) int

Min returns the smaller of x or y.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend implements the protobuf interface

func New

func New() *Backend

New initializes a new Backend struct.

func (*Backend) CreateBook

func (b *Backend) CreateBook(ctx context.Context, request *protos.CreateBookRequest) (*protos.Book, error)

func (*Backend) CreateShelf

func (b *Backend) CreateShelf(ctx context.Context, request *protos.CreateShelfRequest) (*protos.Shelf, error)

func (*Backend) DeleteBook

func (b *Backend) DeleteBook(ctx context.Context, request *protos.DeleteBookRequest) (*emptypb.Empty, error)

func (*Backend) DeleteShelf

func (b *Backend) DeleteShelf(ctx context.Context, request *protos.DeleteShelfRequest) (*emptypb.Empty, error)

func (*Backend) GetBook

func (b *Backend) GetBook(ctx context.Context, request *protos.GetBookRequest) (*protos.Book, error)

func (*Backend) GetShelf

func (b *Backend) GetShelf(ctx context.Context, request *protos.GetShelfRequest) (*protos.Shelf, error)

func (*Backend) ListBooks

func (b *Backend) ListBooks(ctx context.Context, request *protos.ListBooksRequest) (*protos.ListBooksResponse, error)

func (*Backend) ListShelves

func (b *Backend) ListShelves(ctx context.Context, request *protos.ListShelvesRequest) (*protos.ListShelvesResponse, error)

func (*Backend) MergeShelves

func (b *Backend) MergeShelves(ctx context.Context, request *protos.MergeShelvesRequest) (*protos.Shelf, error)

func (*Backend) MoveBook

func (b *Backend) MoveBook(ctx context.Context, request *protos.MoveBookRequest) (*protos.Book, error)

func (*Backend) UpdateBook

func (b *Backend) UpdateBook(ctx context.Context, request *protos.UpdateBookRequest) (*protos.Book, error)

Jump to

Keyboard shortcuts

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