proto

package
v0.0.0-...-ba4ce30 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BookInfoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prot.BookInfoService",
	HandlerType: (*BookInfoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBookInfoWithReviews",
			Handler:    _BookInfoService_GetBookInfoWithReviews_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "books-app/internal/pkg/proto/book.proto",
}

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

View Source
var BookService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prot.BookService",
	HandlerType: (*BookServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddBook",
			Handler:    _BookService_AddBook_Handler,
		},
		{
			MethodName: "ListBooks",
			Handler:    _BookService_ListBooks_Handler,
		},
		{
			MethodName: "GetBook",
			Handler:    _BookService_GetBook_Handler,
		},
		{
			MethodName: "RemoveBook",
			Handler:    _BookService_RemoveBook_Handler,
		},
		{
			MethodName: "UpdateBook",
			Handler:    _BookService_UpdateBook_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "books-app/internal/pkg/proto/book.proto",
}

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

View Source
var File_books_app_internal_pkg_proto_book_proto protoreflect.FileDescriptor
View Source
var ReviewService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prot.ReviewService",
	HandlerType: (*ReviewServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SubmitReviews",
			Handler:    _ReviewService_SubmitReviews_Handler,
		},
		{
			MethodName: "GetBookReviews",
			Handler:    _ReviewService_GetBookReviews_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "books-app/internal/pkg/proto/book.proto",
}

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

Functions

func RegisterBookInfoServiceServer

func RegisterBookInfoServiceServer(s grpc.ServiceRegistrar, srv BookInfoServiceServer)

func RegisterBookServiceServer

func RegisterBookServiceServer(s grpc.ServiceRegistrar, srv BookServiceServer)

func RegisterReviewServiceServer

func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer)

Types

type AddBookResponse

type AddBookResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*AddBookResponse) Descriptor deprecated

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

Deprecated: Use AddBookResponse.ProtoReflect.Descriptor instead.

func (*AddBookResponse) GetStatus

func (x *AddBookResponse) GetStatus() string

func (*AddBookResponse) ProtoMessage

func (*AddBookResponse) ProtoMessage()

func (*AddBookResponse) ProtoReflect

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

func (*AddBookResponse) Reset

func (x *AddBookResponse) Reset()

func (*AddBookResponse) String

func (x *AddBookResponse) String() string

type Book

type Book struct {
	Isbn      int32  `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Publisher string `protobuf:"bytes,3,opt,name=publisher,proto3" json:"publisher,omitempty"`
	// contains filtered or unexported fields
}

func (*Book) Descriptor deprecated

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetIsbn

func (x *Book) GetIsbn() int32

func (*Book) GetName

func (x *Book) GetName() string

func (*Book) GetPublisher

func (x *Book) GetPublisher() string

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 BookInfoServiceClient

type BookInfoServiceClient interface {
	// Unary RPC to get book information with reviews by ID
	GetBookInfoWithReviews(ctx context.Context, in *GetBookInfoRequest, opts ...grpc.CallOption) (*GetBookInfoResponse, error)
}

BookInfoServiceClient is the client API for BookInfoService 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 BookInfoServiceServer

type BookInfoServiceServer interface {
	// Unary RPC to get book information with reviews by ID
	GetBookInfoWithReviews(context.Context, *GetBookInfoRequest) (*GetBookInfoResponse, error)
	// contains filtered or unexported methods
}

BookInfoServiceServer is the server API for BookInfoService service. All implementations must embed UnimplementedBookInfoServiceServer for forward compatibility

type BookServiceClient

type BookServiceClient interface {
	// Unary
	AddBook(ctx context.Context, in *Book, opts ...grpc.CallOption) (*AddBookResponse, error)
	ListBooks(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListBooksRespose, error)
	GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error)
	RemoveBook(ctx context.Context, in *RemoveBookRequest, opts ...grpc.CallOption) (*RemoveBookResponse, error)
	UpdateBook(ctx context.Context, in *Book, opts ...grpc.CallOption) (*UpdateBookResponse, error)
}

BookServiceClient is the client API for BookService 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 BookServiceServer

type BookServiceServer interface {
	// Unary
	AddBook(context.Context, *Book) (*AddBookResponse, error)
	ListBooks(context.Context, *Empty) (*ListBooksRespose, error)
	GetBook(context.Context, *GetBookRequest) (*Book, error)
	RemoveBook(context.Context, *RemoveBookRequest) (*RemoveBookResponse, error)
	UpdateBook(context.Context, *Book) (*UpdateBookResponse, error)
	// contains filtered or unexported methods
}

BookServiceServer is the server API for BookService service. All implementations must embed UnimplementedBookServiceServer for forward compatibility

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetBookInfoRequest

type GetBookInfoRequest struct {
	Isbn int32 `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookInfoRequest) Descriptor deprecated

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

Deprecated: Use GetBookInfoRequest.ProtoReflect.Descriptor instead.

func (*GetBookInfoRequest) GetIsbn

func (x *GetBookInfoRequest) GetIsbn() int32

func (*GetBookInfoRequest) ProtoMessage

func (*GetBookInfoRequest) ProtoMessage()

func (*GetBookInfoRequest) ProtoReflect

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

func (*GetBookInfoRequest) Reset

func (x *GetBookInfoRequest) Reset()

func (*GetBookInfoRequest) String

func (x *GetBookInfoRequest) String() string

type GetBookInfoResponse

type GetBookInfoResponse struct {
	Isbn      int32     `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	Name      string    `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Publisher string    `protobuf:"bytes,3,opt,name=publisher,proto3" json:"publisher,omitempty"`
	Reviews   []*Review `protobuf:"bytes,4,rep,name=reviews,proto3" json:"reviews,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookInfoResponse) Descriptor deprecated

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

Deprecated: Use GetBookInfoResponse.ProtoReflect.Descriptor instead.

func (*GetBookInfoResponse) GetIsbn

func (x *GetBookInfoResponse) GetIsbn() int32

func (*GetBookInfoResponse) GetName

func (x *GetBookInfoResponse) GetName() string

func (*GetBookInfoResponse) GetPublisher

func (x *GetBookInfoResponse) GetPublisher() string

func (*GetBookInfoResponse) GetReviews

func (x *GetBookInfoResponse) GetReviews() []*Review

func (*GetBookInfoResponse) ProtoMessage

func (*GetBookInfoResponse) ProtoMessage()

func (*GetBookInfoResponse) ProtoReflect

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

func (*GetBookInfoResponse) Reset

func (x *GetBookInfoResponse) Reset()

func (*GetBookInfoResponse) String

func (x *GetBookInfoResponse) String() string

type GetBookRequest

type GetBookRequest struct {
	Isbn int32 `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookRequest) Descriptor deprecated

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

Deprecated: Use GetBookRequest.ProtoReflect.Descriptor instead.

func (*GetBookRequest) GetIsbn

func (x *GetBookRequest) GetIsbn() int32

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 GetBookReviewsRequest

type GetBookReviewsRequest struct {
	Isbn int32 `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookReviewsRequest) Descriptor deprecated

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

Deprecated: Use GetBookReviewsRequest.ProtoReflect.Descriptor instead.

func (*GetBookReviewsRequest) GetIsbn

func (x *GetBookReviewsRequest) GetIsbn() int32

func (*GetBookReviewsRequest) ProtoMessage

func (*GetBookReviewsRequest) ProtoMessage()

func (*GetBookReviewsRequest) ProtoReflect

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

func (*GetBookReviewsRequest) Reset

func (x *GetBookReviewsRequest) Reset()

func (*GetBookReviewsRequest) String

func (x *GetBookReviewsRequest) String() string

type GetBookReviewsResponse

type GetBookReviewsResponse struct {
	Reviews []*Review `protobuf:"bytes,1,rep,name=reviews,proto3" json:"reviews,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookReviewsResponse) Descriptor deprecated

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

Deprecated: Use GetBookReviewsResponse.ProtoReflect.Descriptor instead.

func (*GetBookReviewsResponse) GetReviews

func (x *GetBookReviewsResponse) GetReviews() []*Review

func (*GetBookReviewsResponse) ProtoMessage

func (*GetBookReviewsResponse) ProtoMessage()

func (*GetBookReviewsResponse) ProtoReflect

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

func (*GetBookReviewsResponse) Reset

func (x *GetBookReviewsResponse) Reset()

func (*GetBookReviewsResponse) String

func (x *GetBookReviewsResponse) String() string

type ListBooksRespose

type ListBooksRespose struct {
	Books []*Book `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"`
	// contains filtered or unexported fields
}

func (*ListBooksRespose) Descriptor deprecated

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

Deprecated: Use ListBooksRespose.ProtoReflect.Descriptor instead.

func (*ListBooksRespose) GetBooks

func (x *ListBooksRespose) GetBooks() []*Book

func (*ListBooksRespose) ProtoMessage

func (*ListBooksRespose) ProtoMessage()

func (*ListBooksRespose) ProtoReflect

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

func (*ListBooksRespose) Reset

func (x *ListBooksRespose) Reset()

func (*ListBooksRespose) String

func (x *ListBooksRespose) String() string

type RemoveBookRequest

type RemoveBookRequest struct {
	Isbn int32 `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveBookRequest) Descriptor deprecated

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

Deprecated: Use RemoveBookRequest.ProtoReflect.Descriptor instead.

func (*RemoveBookRequest) GetIsbn

func (x *RemoveBookRequest) GetIsbn() int32

func (*RemoveBookRequest) ProtoMessage

func (*RemoveBookRequest) ProtoMessage()

func (*RemoveBookRequest) ProtoReflect

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

func (*RemoveBookRequest) Reset

func (x *RemoveBookRequest) Reset()

func (*RemoveBookRequest) String

func (x *RemoveBookRequest) String() string

type RemoveBookResponse

type RemoveBookResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveBookResponse) Descriptor deprecated

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

Deprecated: Use RemoveBookResponse.ProtoReflect.Descriptor instead.

func (*RemoveBookResponse) GetStatus

func (x *RemoveBookResponse) GetStatus() string

func (*RemoveBookResponse) ProtoMessage

func (*RemoveBookResponse) ProtoMessage()

func (*RemoveBookResponse) ProtoReflect

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

func (*RemoveBookResponse) Reset

func (x *RemoveBookResponse) Reset()

func (*RemoveBookResponse) String

func (x *RemoveBookResponse) String() string

type Review

type Review struct {
	Reviewer string `protobuf:"bytes,1,opt,name=reviewer,proto3" json:"reviewer,omitempty"`
	Comment  string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
	Rating   int32  `protobuf:"varint,3,opt,name=rating,proto3" json:"rating,omitempty"`
	// contains filtered or unexported fields
}

func (*Review) Descriptor deprecated

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

Deprecated: Use Review.ProtoReflect.Descriptor instead.

func (*Review) GetComment

func (x *Review) GetComment() string

func (*Review) GetRating

func (x *Review) GetRating() int32

func (*Review) GetReviewer

func (x *Review) GetReviewer() string

func (*Review) ProtoMessage

func (*Review) ProtoMessage()

func (*Review) ProtoReflect

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

func (*Review) Reset

func (x *Review) Reset()

func (*Review) String

func (x *Review) String() string

type ReviewServiceClient

type ReviewServiceClient interface {
	// Unary RPC to submit a book review
	SubmitReviews(ctx context.Context, in *SubmitReviewRequest, opts ...grpc.CallOption) (*SubmitReviewResponse, error)
	// Unary RPC to fetch all book reviews
	GetBookReviews(ctx context.Context, in *GetBookReviewsRequest, opts ...grpc.CallOption) (*GetBookReviewsResponse, error)
}

ReviewServiceClient is the client API for ReviewService 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 ReviewServiceServer

type ReviewServiceServer interface {
	// Unary RPC to submit a book review
	SubmitReviews(context.Context, *SubmitReviewRequest) (*SubmitReviewResponse, error)
	// Unary RPC to fetch all book reviews
	GetBookReviews(context.Context, *GetBookReviewsRequest) (*GetBookReviewsResponse, error)
	// contains filtered or unexported methods
}

ReviewServiceServer is the server API for ReviewService service. All implementations must embed UnimplementedReviewServiceServer for forward compatibility

type SubmitReviewRequest

type SubmitReviewRequest struct {
	Isbn     int32  `protobuf:"varint,1,opt,name=isbn,proto3" json:"isbn,omitempty"`
	Reviewer string `protobuf:"bytes,2,opt,name=reviewer,proto3" json:"reviewer,omitempty"`
	Comment  string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
	Rating   int32  `protobuf:"varint,4,opt,name=rating,proto3" json:"rating,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitReviewRequest) Descriptor deprecated

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

Deprecated: Use SubmitReviewRequest.ProtoReflect.Descriptor instead.

func (*SubmitReviewRequest) GetComment

func (x *SubmitReviewRequest) GetComment() string

func (*SubmitReviewRequest) GetIsbn

func (x *SubmitReviewRequest) GetIsbn() int32

func (*SubmitReviewRequest) GetRating

func (x *SubmitReviewRequest) GetRating() int32

func (*SubmitReviewRequest) GetReviewer

func (x *SubmitReviewRequest) GetReviewer() string

func (*SubmitReviewRequest) ProtoMessage

func (*SubmitReviewRequest) ProtoMessage()

func (*SubmitReviewRequest) ProtoReflect

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

func (*SubmitReviewRequest) Reset

func (x *SubmitReviewRequest) Reset()

func (*SubmitReviewRequest) String

func (x *SubmitReviewRequest) String() string

type SubmitReviewResponse

type SubmitReviewResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitReviewResponse) Descriptor deprecated

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

Deprecated: Use SubmitReviewResponse.ProtoReflect.Descriptor instead.

func (*SubmitReviewResponse) GetStatus

func (x *SubmitReviewResponse) GetStatus() string

func (*SubmitReviewResponse) ProtoMessage

func (*SubmitReviewResponse) ProtoMessage()

func (*SubmitReviewResponse) ProtoReflect

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

func (*SubmitReviewResponse) Reset

func (x *SubmitReviewResponse) Reset()

func (*SubmitReviewResponse) String

func (x *SubmitReviewResponse) String() string

type UnimplementedBookInfoServiceServer

type UnimplementedBookInfoServiceServer struct {
}

UnimplementedBookInfoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBookInfoServiceServer) GetBookInfoWithReviews

type UnimplementedBookServiceServer

type UnimplementedBookServiceServer struct {
}

UnimplementedBookServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBookServiceServer) AddBook

func (UnimplementedBookServiceServer) GetBook

func (UnimplementedBookServiceServer) ListBooks

func (UnimplementedBookServiceServer) RemoveBook

func (UnimplementedBookServiceServer) UpdateBook

type UnimplementedReviewServiceServer

type UnimplementedReviewServiceServer struct {
}

UnimplementedReviewServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedReviewServiceServer) GetBookReviews

func (UnimplementedReviewServiceServer) SubmitReviews

type UnsafeBookInfoServiceServer

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

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

type UnsafeBookServiceServer

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

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

type UnsafeReviewServiceServer

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

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

type UpdateBookResponse

type UpdateBookResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateBookResponse) Descriptor deprecated

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

Deprecated: Use UpdateBookResponse.ProtoReflect.Descriptor instead.

func (*UpdateBookResponse) GetStatus

func (x *UpdateBookResponse) GetStatus() string

func (*UpdateBookResponse) ProtoMessage

func (*UpdateBookResponse) ProtoMessage()

func (*UpdateBookResponse) ProtoReflect

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

func (*UpdateBookResponse) Reset

func (x *UpdateBookResponse) Reset()

func (*UpdateBookResponse) String

func (x *UpdateBookResponse) String() string

Jump to

Keyboard shortcuts

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