service

package
v0.0.0-...-dfe5808 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateETag

func GenerateETag(msg proto.Message) (string, error)

GenerateETag generates an ETag for a protobuf message based on its content

func StartServer

func StartServer(targetPort int)

func UnmarshalIntoBook

func UnmarshalIntoBook(authorsSerialized, isbnSerialized string, b *bpb.Book) error

func ValidateETag

func ValidateETag(providedETag, currentETag string) bool

ValidateETag compares the provided ETag with the current resource ETag

Types

type BookstoreServer

type BookstoreServer struct {
	bpb.UnimplementedBookstoreServer
	lrpb.UnimplementedOperationsServer
	// contains filtered or unexported fields
}

func NewBookstoreServer

func NewBookstoreServer(db *sql.DB) *BookstoreServer

func (BookstoreServer) ApplyBook

func (BookstoreServer) ApplyPublisher

func (BookstoreServer) ArchiveBook

func (BookstoreServer) CreateBook

func (BookstoreServer) CreateItem

func (BookstoreServer) CreatePublisher

func (BookstoreServer) CreateStore

func (BookstoreServer) DeleteBook

func (BookstoreServer) DeleteItem

func (BookstoreServer) DeletePublisher

func (BookstoreServer) DeleteStore

func (BookstoreServer) GetBook

func (BookstoreServer) GetItem

func (BookstoreServer) GetOperation

func (BookstoreServer) GetPublisher

func (BookstoreServer) GetStore

func (BookstoreServer) ListBooks

func (BookstoreServer) ListPublishers

func (BookstoreServer) MoveItem

func (BookstoreServer) UpdateBook

func (s BookstoreServer) UpdateBook(ctx context.Context, r *bpb.UpdateBookRequest) (*bpb.Book, error)

func (BookstoreServer) UpdateItem

func (s BookstoreServer) UpdateItem(ctx context.Context, r *bpb.UpdateItemRequest) (*bpb.Item, error)

func (BookstoreServer) UpdatePublisher

func (BookstoreServer) UpdateStore

func (s BookstoreServer) UpdateStore(ctx context.Context, r *bpb.UpdateStoreRequest) (*bpb.Store, error)

type SerializableBook

type SerializableBook struct {
	*bpb.Book
	AuthorSerialized string
	IsbnSerialized   string
}

func NewSerializableBook

func NewSerializableBook(b *bpb.Book) (*SerializableBook, error)

Jump to

Keyboard shortcuts

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