Documentation ¶
Overview ¶
Package book is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBookServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBookServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BookServiceClient) error
- func RegisterBookServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBookServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BookServiceServer) error
- func RegisterBookServiceServer(s grpc.ServiceRegistrar, srv BookServiceServer)
- type Author
- type BatchGetBookRequest
- func (*BatchGetBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetBookRequest) GetBookIds() []string
- func (x *BatchGetBookRequest) GetFieldMask() *field_mask.FieldMask
- func (*BatchGetBookRequest) ProtoMessage()
- func (x *BatchGetBookRequest) ProtoReflect() protoreflect.Message
- func (x *BatchGetBookRequest) Reset()
- func (x *BatchGetBookRequest) String() string
- type BatchGetBookResponse
- func (*BatchGetBookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetBookResponse) GetBooks() []*Book
- func (*BatchGetBookResponse) ProtoMessage()
- func (x *BatchGetBookResponse) ProtoReflect() protoreflect.Message
- func (x *BatchGetBookResponse) Reset()
- func (x *BatchGetBookResponse) String() string
- type Book
- func (*Book) Descriptor() ([]byte, []int)deprecated
- func (x *Book) GetAuthor() *Author
- func (x *Book) GetCreateTime() int64
- func (x *Book) GetName() string
- func (x *Book) GetPublishDuration() int64
- func (x *Book) GetPublisher() string
- func (x *Book) GetRate() float32
- func (x *Book) GetSNIC() string
- func (x *Book) GetVersion() string
- func (*Book) ProtoMessage()
- func (x *Book) ProtoReflect() protoreflect.Message
- func (x *Book) Reset()
- func (x *Book) String() string
- type BookServiceClient
- type BookServiceServer
- type CreateBookRequest
- type CreateBookResponse
- func (*CreateBookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBookResponse) GetBookId() string
- func (*CreateBookResponse) ProtoMessage()
- func (x *CreateBookResponse) ProtoReflect() protoreflect.Message
- func (x *CreateBookResponse) Reset()
- func (x *CreateBookResponse) String() string
- type DeleteBookRequest
- type DeleteBookResponse
- func (*DeleteBookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteBookResponse) GetSuccess() bool
- func (*DeleteBookResponse) ProtoMessage()
- func (x *DeleteBookResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteBookResponse) Reset()
- func (x *DeleteBookResponse) String() string
- type GetBookRequest
- func (*GetBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetBookRequest) GetBookId() string
- func (x *GetBookRequest) GetFieldMask() *field_mask.FieldMask
- func (*GetBookRequest) ProtoMessage()
- func (x *GetBookRequest) ProtoReflect() protoreflect.Message
- func (x *GetBookRequest) Reset()
- func (x *GetBookRequest) String() string
- type ListBooksRequest
- func (*ListBooksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListBooksRequest) GetOrder() string
- func (x *ListBooksRequest) GetPageSize() int32
- func (x *ListBooksRequest) GetPageToken() string
- func (x *ListBooksRequest) GetParent() string
- func (*ListBooksRequest) ProtoMessage()
- func (x *ListBooksRequest) ProtoReflect() protoreflect.Message
- func (x *ListBooksRequest) Reset()
- func (x *ListBooksRequest) String() string
- type ListBooksResponse
- func (*ListBooksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListBooksResponse) GetBooks() []*Book
- func (x *ListBooksResponse) GetNextPageToken() string
- func (*ListBooksResponse) ProtoMessage()
- func (x *ListBooksResponse) ProtoReflect() protoreflect.Message
- func (x *ListBooksResponse) Reset()
- func (x *ListBooksResponse) String() string
- type SearchBookRequest
- type SearchBookResponse
- type UndeleteBookRequest
- func (*UndeleteBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UndeleteBookRequest) GetBookId() string
- func (*UndeleteBookRequest) ProtoMessage()
- func (x *UndeleteBookRequest) ProtoReflect() protoreflect.Message
- func (x *UndeleteBookRequest) Reset()
- func (x *UndeleteBookRequest) String() string
- type UndeleteBookResponse
- func (*UndeleteBookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UndeleteBookResponse) GetSuccess() bool
- func (*UndeleteBookResponse) ProtoMessage()
- func (x *UndeleteBookResponse) ProtoReflect() protoreflect.Message
- func (x *UndeleteBookResponse) Reset()
- func (x *UndeleteBookResponse) String() string
- type UnimplementedBookServiceServer
- func (UnimplementedBookServiceServer) BatchGetBook(context.Context, *BatchGetBookRequest) (*BatchGetBookResponse, error)
- func (UnimplementedBookServiceServer) CreateBook(context.Context, *CreateBookRequest) (*CreateBookResponse, error)
- func (UnimplementedBookServiceServer) DeleteBook(context.Context, *DeleteBookRequest) (*DeleteBookResponse, error)
- func (UnimplementedBookServiceServer) GetBook(context.Context, *GetBookRequest) (*Book, error)
- func (UnimplementedBookServiceServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
- func (UnimplementedBookServiceServer) SearchBook(context.Context, *SearchBookRequest) (*SearchBookResponse, error)
- func (UnimplementedBookServiceServer) UndeleteBook(context.Context, *UndeleteBookRequest) (*UndeleteBookResponse, error)
- func (UnimplementedBookServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*UpdateBookResponse, error)
- type UnsafeBookServiceServer
- type UpdateBookRequest
- func (*UpdateBookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateBookRequest) GetFieldMask() *field_mask.FieldMask
- func (x *UpdateBookRequest) GetUserId() string
- func (*UpdateBookRequest) ProtoMessage()
- func (x *UpdateBookRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateBookRequest) Reset()
- func (x *UpdateBookRequest) String() string
- type UpdateBookResponse
- func (*UpdateBookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateBookResponse) GetSuccess() bool
- func (*UpdateBookResponse) ProtoMessage()
- func (x *UpdateBookResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateBookResponse) Reset()
- func (x *UpdateBookResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var BookService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "book.v1.BookService", HandlerType: (*BookServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateBook", Handler: _BookService_CreateBook_Handler, }, { MethodName: "DeleteBook", Handler: _BookService_DeleteBook_Handler, }, { MethodName: "GetBook", Handler: _BookService_GetBook_Handler, }, { MethodName: "UpdateBook", Handler: _BookService_UpdateBook_Handler, }, { MethodName: "ListBooks", Handler: _BookService_ListBooks_Handler, }, { MethodName: "UndeleteBook", Handler: _BookService_UndeleteBook_Handler, }, { MethodName: "SearchBook", Handler: _BookService_SearchBook_Handler, }, { MethodName: "BatchGetBook", Handler: _BookService_BatchGetBook_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "book/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)
var File_book_book_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBookServiceHandler ¶
func RegisterBookServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBookServiceHandler registers the http handlers for service BookService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBookServiceHandlerClient ¶
func RegisterBookServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BookServiceClient) error
RegisterBookServiceHandlerClient registers the http handlers for service BookService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BookServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BookServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BookServiceClient" to call the correct interceptors.
func RegisterBookServiceHandlerFromEndpoint ¶
func RegisterBookServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBookServiceHandlerFromEndpoint is same as RegisterBookServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBookServiceHandlerServer ¶
func RegisterBookServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BookServiceServer) error
RegisterBookServiceHandlerServer registers the http handlers for service BookService to "mux". UnaryRPC :call BookServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBookServiceHandlerFromEndpoint instead.
func RegisterBookServiceServer ¶
func RegisterBookServiceServer(s grpc.ServiceRegistrar, srv BookServiceServer)
Types ¶
type Author ¶
type Author struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` EnglishName string `protobuf:"bytes,2,opt,name=english_name,json=englishName,proto3" json:"english_name,omitempty"` // contains filtered or unexported fields }
func (*Author) Descriptor
deprecated
func (*Author) GetEnglishName ¶
func (*Author) ProtoMessage ¶
func (*Author) ProtoMessage()
func (*Author) ProtoReflect ¶
func (x *Author) ProtoReflect() protoreflect.Message
type BatchGetBookRequest ¶
type BatchGetBookRequest struct { BookIds []string `protobuf:"bytes,1,rep,name=book_ids,json=bookIds,proto3" json:"book_ids,omitempty"` FieldMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // contains filtered or unexported fields }
func (*BatchGetBookRequest) Descriptor
deprecated
func (*BatchGetBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetBookRequest.ProtoReflect.Descriptor instead.
func (*BatchGetBookRequest) GetBookIds ¶
func (x *BatchGetBookRequest) GetBookIds() []string
func (*BatchGetBookRequest) GetFieldMask ¶
func (x *BatchGetBookRequest) GetFieldMask() *field_mask.FieldMask
func (*BatchGetBookRequest) ProtoMessage ¶
func (*BatchGetBookRequest) ProtoMessage()
func (*BatchGetBookRequest) ProtoReflect ¶
func (x *BatchGetBookRequest) ProtoReflect() protoreflect.Message
func (*BatchGetBookRequest) Reset ¶
func (x *BatchGetBookRequest) Reset()
func (*BatchGetBookRequest) String ¶
func (x *BatchGetBookRequest) String() string
type BatchGetBookResponse ¶
type BatchGetBookResponse struct { Books []*Book `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"` // contains filtered or unexported fields }
func (*BatchGetBookResponse) Descriptor
deprecated
func (*BatchGetBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetBookResponse.ProtoReflect.Descriptor instead.
func (*BatchGetBookResponse) GetBooks ¶
func (x *BatchGetBookResponse) GetBooks() []*Book
func (*BatchGetBookResponse) ProtoMessage ¶
func (*BatchGetBookResponse) ProtoMessage()
func (*BatchGetBookResponse) ProtoReflect ¶
func (x *BatchGetBookResponse) ProtoReflect() protoreflect.Message
func (*BatchGetBookResponse) Reset ¶
func (x *BatchGetBookResponse) Reset()
func (*BatchGetBookResponse) String ¶
func (x *BatchGetBookResponse) String() string
type Book ¶
type Book struct { SNIC string `protobuf:"bytes,1,opt,name=SNIC,proto3" json:"SNIC,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"` // 出版社 PublishDuration int64 `protobuf:"varint,4,opt,name=publish_duration,json=publishDuration,proto3" json:"publish_duration,omitempty"` // 出版日期 Author *Author `protobuf:"bytes,5,opt,name=author,proto3" json:"author,omitempty"` // 作者 Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` // 版本 Rate float32 `protobuf:"fixed32,8,opt,name=rate,proto3" json:"rate,omitempty"` //评分 CreateTime int64 `protobuf:"varint,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // contains filtered or unexported fields }
func (*Book) Descriptor
deprecated
func (*Book) GetCreateTime ¶
func (*Book) GetPublishDuration ¶
func (*Book) GetPublisher ¶
func (*Book) GetVersion ¶
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
func (*Book) ProtoReflect ¶
func (x *Book) ProtoReflect() protoreflect.Message
type BookServiceClient ¶
type BookServiceClient interface { // 标准方法 CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*CreateBookResponse, error) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*DeleteBookResponse, error) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) // 如何保证原子更新? UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*UpdateBookResponse, error) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) // 非标准方法 // 撤销删除,如果支持标记删除 UndeleteBook(ctx context.Context, in *UndeleteBookRequest, opts ...grpc.CallOption) (*UndeleteBookResponse, error) SearchBook(ctx context.Context, in *SearchBookRequest, opts ...grpc.CallOption) (*SearchBookResponse, error) BatchGetBook(ctx context.Context, in *BatchGetBookRequest, opts ...grpc.CallOption) (*BatchGetBookResponse, 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.
func NewBookServiceClient ¶
func NewBookServiceClient(cc grpc.ClientConnInterface) BookServiceClient
type BookServiceServer ¶
type BookServiceServer interface { // 标准方法 CreateBook(context.Context, *CreateBookRequest) (*CreateBookResponse, error) DeleteBook(context.Context, *DeleteBookRequest) (*DeleteBookResponse, error) GetBook(context.Context, *GetBookRequest) (*Book, error) // 如何保证原子更新? UpdateBook(context.Context, *UpdateBookRequest) (*UpdateBookResponse, error) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error) // 非标准方法 // 撤销删除,如果支持标记删除 UndeleteBook(context.Context, *UndeleteBookRequest) (*UndeleteBookResponse, error) SearchBook(context.Context, *SearchBookRequest) (*SearchBookResponse, error) BatchGetBook(context.Context, *BatchGetBookRequest) (*BatchGetBookResponse, error) // contains filtered or unexported methods }
BookServiceServer is the server API for BookService service. All implementations must embed UnimplementedBookServiceServer for forward compatibility
type CreateBookRequest ¶
type CreateBookRequest struct { Book *Book `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"` // contains filtered or unexported fields }
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) 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 CreateBookResponse ¶
type CreateBookResponse struct { BookId string `protobuf:"bytes,1,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` // contains filtered or unexported fields }
func (*CreateBookResponse) Descriptor
deprecated
func (*CreateBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateBookResponse.ProtoReflect.Descriptor instead.
func (*CreateBookResponse) GetBookId ¶
func (x *CreateBookResponse) GetBookId() string
func (*CreateBookResponse) ProtoMessage ¶
func (*CreateBookResponse) ProtoMessage()
func (*CreateBookResponse) ProtoReflect ¶
func (x *CreateBookResponse) ProtoReflect() protoreflect.Message
func (*CreateBookResponse) Reset ¶
func (x *CreateBookResponse) Reset()
func (*CreateBookResponse) String ¶
func (x *CreateBookResponse) String() string
type DeleteBookRequest ¶
type DeleteBookRequest struct { BookId string `protobuf:"bytes,1,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteBookRequest) Descriptor
deprecated
func (*DeleteBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBookRequest.ProtoReflect.Descriptor instead.
func (*DeleteBookRequest) GetBookId ¶
func (x *DeleteBookRequest) GetBookId() 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 DeleteBookResponse ¶
type DeleteBookResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*DeleteBookResponse) Descriptor
deprecated
func (*DeleteBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBookResponse.ProtoReflect.Descriptor instead.
func (*DeleteBookResponse) GetSuccess ¶
func (x *DeleteBookResponse) GetSuccess() bool
func (*DeleteBookResponse) ProtoMessage ¶
func (*DeleteBookResponse) ProtoMessage()
func (*DeleteBookResponse) ProtoReflect ¶
func (x *DeleteBookResponse) ProtoReflect() protoreflect.Message
func (*DeleteBookResponse) Reset ¶
func (x *DeleteBookResponse) Reset()
func (*DeleteBookResponse) String ¶
func (x *DeleteBookResponse) String() string
type GetBookRequest ¶
type GetBookRequest struct { BookId string `protobuf:"bytes,1,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` FieldMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // contains filtered or unexported fields }
func (*GetBookRequest) Descriptor
deprecated
func (*GetBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBookRequest.ProtoReflect.Descriptor instead.
func (*GetBookRequest) GetBookId ¶
func (x *GetBookRequest) GetBookId() string
func (*GetBookRequest) GetFieldMask ¶
func (x *GetBookRequest) GetFieldMask() *field_mask.FieldMask
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 ListBooksRequest ¶
type ListBooksRequest struct { Order string `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // 和sql 语句的 一样 PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"` // 父资源 // contains filtered or unexported fields }
func (*ListBooksRequest) Descriptor
deprecated
func (*ListBooksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListBooksRequest.ProtoReflect.Descriptor instead.
func (*ListBooksRequest) GetOrder ¶
func (x *ListBooksRequest) GetOrder() string
func (*ListBooksRequest) GetPageSize ¶
func (x *ListBooksRequest) GetPageSize() int32
func (*ListBooksRequest) GetPageToken ¶
func (x *ListBooksRequest) GetPageToken() string
func (*ListBooksRequest) GetParent ¶
func (x *ListBooksRequest) GetParent() 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 { Books []*Book `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
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 SearchBookRequest ¶
type SearchBookRequest struct {
// contains filtered or unexported fields
}
func (*SearchBookRequest) Descriptor
deprecated
func (*SearchBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchBookRequest.ProtoReflect.Descriptor instead.
func (*SearchBookRequest) ProtoMessage ¶
func (*SearchBookRequest) ProtoMessage()
func (*SearchBookRequest) ProtoReflect ¶
func (x *SearchBookRequest) ProtoReflect() protoreflect.Message
func (*SearchBookRequest) Reset ¶
func (x *SearchBookRequest) Reset()
func (*SearchBookRequest) String ¶
func (x *SearchBookRequest) String() string
type SearchBookResponse ¶
type SearchBookResponse struct {
// contains filtered or unexported fields
}
func (*SearchBookResponse) Descriptor
deprecated
func (*SearchBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchBookResponse.ProtoReflect.Descriptor instead.
func (*SearchBookResponse) ProtoMessage ¶
func (*SearchBookResponse) ProtoMessage()
func (*SearchBookResponse) ProtoReflect ¶
func (x *SearchBookResponse) ProtoReflect() protoreflect.Message
func (*SearchBookResponse) Reset ¶
func (x *SearchBookResponse) Reset()
func (*SearchBookResponse) String ¶
func (x *SearchBookResponse) String() string
type UndeleteBookRequest ¶
type UndeleteBookRequest struct { BookId string `protobuf:"bytes,1,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` // contains filtered or unexported fields }
func (*UndeleteBookRequest) Descriptor
deprecated
func (*UndeleteBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use UndeleteBookRequest.ProtoReflect.Descriptor instead.
func (*UndeleteBookRequest) GetBookId ¶
func (x *UndeleteBookRequest) GetBookId() string
func (*UndeleteBookRequest) ProtoMessage ¶
func (*UndeleteBookRequest) ProtoMessage()
func (*UndeleteBookRequest) ProtoReflect ¶
func (x *UndeleteBookRequest) ProtoReflect() protoreflect.Message
func (*UndeleteBookRequest) Reset ¶
func (x *UndeleteBookRequest) Reset()
func (*UndeleteBookRequest) String ¶
func (x *UndeleteBookRequest) String() string
type UndeleteBookResponse ¶
type UndeleteBookResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UndeleteBookResponse) Descriptor
deprecated
func (*UndeleteBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use UndeleteBookResponse.ProtoReflect.Descriptor instead.
func (*UndeleteBookResponse) GetSuccess ¶
func (x *UndeleteBookResponse) GetSuccess() bool
func (*UndeleteBookResponse) ProtoMessage ¶
func (*UndeleteBookResponse) ProtoMessage()
func (*UndeleteBookResponse) ProtoReflect ¶
func (x *UndeleteBookResponse) ProtoReflect() protoreflect.Message
func (*UndeleteBookResponse) Reset ¶
func (x *UndeleteBookResponse) Reset()
func (*UndeleteBookResponse) String ¶
func (x *UndeleteBookResponse) String() string
type UnimplementedBookServiceServer ¶
type UnimplementedBookServiceServer struct { }
UnimplementedBookServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBookServiceServer) BatchGetBook ¶
func (UnimplementedBookServiceServer) BatchGetBook(context.Context, *BatchGetBookRequest) (*BatchGetBookResponse, error)
func (UnimplementedBookServiceServer) CreateBook ¶
func (UnimplementedBookServiceServer) CreateBook(context.Context, *CreateBookRequest) (*CreateBookResponse, error)
func (UnimplementedBookServiceServer) DeleteBook ¶
func (UnimplementedBookServiceServer) DeleteBook(context.Context, *DeleteBookRequest) (*DeleteBookResponse, error)
func (UnimplementedBookServiceServer) GetBook ¶
func (UnimplementedBookServiceServer) GetBook(context.Context, *GetBookRequest) (*Book, error)
func (UnimplementedBookServiceServer) ListBooks ¶
func (UnimplementedBookServiceServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
func (UnimplementedBookServiceServer) SearchBook ¶
func (UnimplementedBookServiceServer) SearchBook(context.Context, *SearchBookRequest) (*SearchBookResponse, error)
func (UnimplementedBookServiceServer) UndeleteBook ¶
func (UnimplementedBookServiceServer) UndeleteBook(context.Context, *UndeleteBookRequest) (*UndeleteBookResponse, error)
func (UnimplementedBookServiceServer) UpdateBook ¶
func (UnimplementedBookServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*UpdateBookResponse, error)
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 UpdateBookRequest ¶
type UpdateBookRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` FieldMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateBookRequest) Descriptor
deprecated
func (*UpdateBookRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateBookRequest.ProtoReflect.Descriptor instead.
func (*UpdateBookRequest) GetFieldMask ¶
func (x *UpdateBookRequest) GetFieldMask() *field_mask.FieldMask
func (*UpdateBookRequest) GetUserId ¶
func (x *UpdateBookRequest) GetUserId() 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
type UpdateBookResponse ¶
type UpdateBookResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UpdateBookResponse) Descriptor
deprecated
func (*UpdateBookResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateBookResponse.ProtoReflect.Descriptor instead.
func (*UpdateBookResponse) GetSuccess ¶
func (x *UpdateBookResponse) GetSuccess() bool
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