proto

package
v0.0.0-...-ecf25e1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BookService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "books.BookService",
	HandlerType: (*BookServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBook",
			Handler:    _BookService_GetBook_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/books.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_proto_books_proto protoreflect.FileDescriptor

Functions

func RegisterBookServiceServer

func RegisterBookServiceServer(s grpc.ServiceRegistrar, srv BookServiceServer)

Types

type Book

type Book struct {
	Id      string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title   string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Authors []string `protobuf:"bytes,3,rep,name=authors,proto3" json:"authors,omitempty"`
	// contains filtered or unexported fields
}

func (*Book) Descriptor deprecated

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetAuthors

func (x *Book) GetAuthors() []string

func (*Book) GetId

func (x *Book) GetId() string

func (*Book) GetTitle

func (x *Book) GetTitle() 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 BookServiceClient

type BookServiceClient interface {
	GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, 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 {
	GetBook(context.Context, *GetBookRequest) (*Book, error)
	// contains filtered or unexported methods
}

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

type GetBookRequest

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

func (*GetBookRequest) Descriptor deprecated

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

Deprecated: Use GetBookRequest.ProtoReflect.Descriptor instead.

func (*GetBookRequest) GetId

func (x *GetBookRequest) GetId() string

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 UnimplementedBookServiceServer

type UnimplementedBookServiceServer struct {
}

UnimplementedBookServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBookServiceServer) GetBook

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.

Jump to

Keyboard shortcuts

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