protof

package
v0.0.0-...-5b0545a Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protof_product_proto protoreflect.FileDescriptor
View Source
var Product_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protof.Product",
	HandlerType: (*ProductServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "search",
			Handler:    _Product_Search_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protof/product.proto",
}

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

Functions

func RegisterProductServer

func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer)

Types

type ProductClient

type ProductClient interface {
	// Sends a product name to search for
	Search(ctx context.Context, in *ProductSearchRequest, opts ...grpc.CallOption) (*ProductSearchReply, error)
}

ProductClient is the client API for Product 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 NewProductClient

func NewProductClient(cc grpc.ClientConnInterface) ProductClient

type ProductSearchReply

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

The response message containing the search status

func (*ProductSearchReply) Descriptor deprecated

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

Deprecated: Use ProductSearchReply.ProtoReflect.Descriptor instead.

func (*ProductSearchReply) GetMessage

func (x *ProductSearchReply) GetMessage() string

func (*ProductSearchReply) ProtoMessage

func (*ProductSearchReply) ProtoMessage()

func (*ProductSearchReply) ProtoReflect

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

func (*ProductSearchReply) Reset

func (x *ProductSearchReply) Reset()

func (*ProductSearchReply) String

func (x *ProductSearchReply) String() string

type ProductSearchRequest

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

The request message containing client's search.

func (*ProductSearchRequest) Descriptor deprecated

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

Deprecated: Use ProductSearchRequest.ProtoReflect.Descriptor instead.

func (*ProductSearchRequest) GetProduct

func (x *ProductSearchRequest) GetProduct() string

func (*ProductSearchRequest) ProtoMessage

func (*ProductSearchRequest) ProtoMessage()

func (*ProductSearchRequest) ProtoReflect

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

func (*ProductSearchRequest) Reset

func (x *ProductSearchRequest) Reset()

func (*ProductSearchRequest) String

func (x *ProductSearchRequest) String() string

type ProductServer

type ProductServer interface {
	// Sends a product name to search for
	Search(context.Context, *ProductSearchRequest) (*ProductSearchReply, error)
	// contains filtered or unexported methods
}

ProductServer is the server API for Product service. All implementations must embed UnimplementedProductServer for forward compatibility

type UnimplementedProductServer

type UnimplementedProductServer struct {
}

UnimplementedProductServer must be embedded to have forward compatible implementations.

func (UnimplementedProductServer) Search

type UnsafeProductServer

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

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

Jump to

Keyboard shortcuts

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