Documentation ¶
Index ¶
- Variables
- func RegisterBookerServer(s grpc.ServiceRegistrar, srv BookerServer)
- type AddBook
- func (*AddBook) Descriptor() ([]byte, []int)deprecated
- func (x *AddBook) GetAuthorId() int64
- func (x *AddBook) GetDescription() string
- func (x *AddBook) GetTitle() string
- func (*AddBook) ProtoMessage()
- func (x *AddBook) ProtoReflect() protoreflect.Message
- func (x *AddBook) Reset()
- func (x *AddBook) String() string
- type Author
- type Book
- type BookerClient
- type BookerServer
- type Books
- type ResponceID
- type UnimplementedBookerServer
- func (UnimplementedBookerServer) AddAuthor(context.Context, *Author) (*ResponceID, error)
- func (UnimplementedBookerServer) AddBook(context.Context, *AddBook) (*ResponceID, error)
- func (UnimplementedBookerServer) GetAuthor(context.Context, *Book) (*Author, error)
- func (UnimplementedBookerServer) GetBooks(context.Context, *Author) (*Books, error)
- type UnsafeBookerServer
Constants ¶
This section is empty.
Variables ¶
var Booker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.Booker", HandlerType: (*BookerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBooks", Handler: _Booker_GetBooks_Handler, }, { MethodName: "GetAuthor", Handler: _Booker_GetAuthor_Handler, }, { MethodName: "addBook", Handler: _Booker_AddBook_Handler, }, { MethodName: "addAuthor", Handler: _Booker_AddAuthor_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "books.proto", }
Booker_ServiceDesc is the grpc.ServiceDesc for Booker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_books_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBookerServer ¶
func RegisterBookerServer(s grpc.ServiceRegistrar, srv BookerServer)
Types ¶
type AddBook ¶
type AddBook struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` AuthorId int64 `protobuf:"varint,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` // contains filtered or unexported fields }
func (*AddBook) Descriptor
deprecated
func (*AddBook) GetAuthorId ¶
func (*AddBook) GetDescription ¶
func (*AddBook) ProtoMessage ¶
func (*AddBook) ProtoMessage()
func (*AddBook) ProtoReflect ¶
func (x *AddBook) ProtoReflect() protoreflect.Message
type Author ¶
type Author struct { FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` SecondName string `protobuf:"bytes,2,opt,name=second_name,json=secondName,proto3" json:"second_name,omitempty"` // contains filtered or unexported fields }
func (*Author) Descriptor
deprecated
func (*Author) GetFirstName ¶
func (*Author) GetSecondName ¶
func (*Author) ProtoMessage ¶
func (*Author) ProtoMessage()
func (*Author) ProtoReflect ¶
func (x *Author) ProtoReflect() protoreflect.Message
type Book ¶
type Book struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*Book) Descriptor
deprecated
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
func (*Book) ProtoReflect ¶
func (x *Book) ProtoReflect() protoreflect.Message
type BookerClient ¶
type BookerClient interface { GetBooks(ctx context.Context, in *Author, opts ...grpc.CallOption) (*Books, error) GetAuthor(ctx context.Context, in *Book, opts ...grpc.CallOption) (*Author, error) AddBook(ctx context.Context, in *AddBook, opts ...grpc.CallOption) (*ResponceID, error) AddAuthor(ctx context.Context, in *Author, opts ...grpc.CallOption) (*ResponceID, error) }
BookerClient is the client API for Booker 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 NewBookerClient ¶
func NewBookerClient(cc grpc.ClientConnInterface) BookerClient
type BookerServer ¶
type BookerServer interface { GetBooks(context.Context, *Author) (*Books, error) GetAuthor(context.Context, *Book) (*Author, error) AddBook(context.Context, *AddBook) (*ResponceID, error) AddAuthor(context.Context, *Author) (*ResponceID, error) // contains filtered or unexported methods }
BookerServer is the server API for Booker service. All implementations must embed UnimplementedBookerServer for forward compatibility
type Books ¶
type Books struct { Title []string `protobuf:"bytes,1,rep,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*Books) Descriptor
deprecated
func (*Books) ProtoMessage ¶
func (*Books) ProtoMessage()
func (*Books) ProtoReflect ¶
func (x *Books) ProtoReflect() protoreflect.Message
type ResponceID ¶
type ResponceID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ResponceID) Descriptor
deprecated
func (*ResponceID) Descriptor() ([]byte, []int)
Deprecated: Use ResponceID.ProtoReflect.Descriptor instead.
func (*ResponceID) GetValue ¶
func (x *ResponceID) GetValue() string
func (*ResponceID) ProtoMessage ¶
func (*ResponceID) ProtoMessage()
func (*ResponceID) ProtoReflect ¶
func (x *ResponceID) ProtoReflect() protoreflect.Message
func (*ResponceID) Reset ¶
func (x *ResponceID) Reset()
func (*ResponceID) String ¶
func (x *ResponceID) String() string
type UnimplementedBookerServer ¶
type UnimplementedBookerServer struct { }
UnimplementedBookerServer must be embedded to have forward compatible implementations.
func (UnimplementedBookerServer) AddAuthor ¶
func (UnimplementedBookerServer) AddAuthor(context.Context, *Author) (*ResponceID, error)
func (UnimplementedBookerServer) AddBook ¶
func (UnimplementedBookerServer) AddBook(context.Context, *AddBook) (*ResponceID, error)
type UnsafeBookerServer ¶
type UnsafeBookerServer interface {
// contains filtered or unexported methods
}
UnsafeBookerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BookerServer will result in compilation errors.